Auto correct Rubocop's Layout/EmptyLinesAroundAccessModifier cop

This commit is contained in:
Pau Perez
2018-04-09 17:31:20 +02:00
parent 9da33b4e82
commit 746fcd5802
6 changed files with 9 additions and 1 deletions

View File

@@ -107,6 +107,7 @@ module Admin
protected
def collection
return Enterprise.where("1=0") unless json_request?
ocs = if params[:as] == "distributor"
@@ -130,6 +131,7 @@ module Admin
end
private
def load_data_for_index
if json_request?
# Split ransack params into all those that currently exist and new ones to limit returned ocs to recent or undated

View File

@@ -44,6 +44,7 @@ module Spree
end
private
def load_hubs
@hubs = Enterprise.managed_by(spree_current_user).is_distributor.sort_by!{ |d| [(@shipping_method.has_distributor? d) ? 0 : 1, d.name] }
end

View File

@@ -36,6 +36,7 @@ class AngularFormBuilder < ActionView::Helpers::FormBuilder
end
private
def angular_name(method)
"#{@object_name}[#{@fields_for_record_name}_attributes][{{ $index }}][#{method}]"
end

View File

@@ -1,6 +1,8 @@
#!/bin/sh
$COP=$1
set -e
COP="$1"
bundle exec rubocop -a --only "$COP"
git add -A

View File

@@ -14,6 +14,7 @@ module Spree
end
private
def make_variant_stub(product_price, variant_price)
product = double(:product, price: product_price)
variant = double(:variant, product: product, price: variant_price)

View File

@@ -199,6 +199,7 @@ module WebHelper
end
private
def wait_for_ajax
wait_until { page.evaluate_script("$.active") == 0 }
end