Rubocop: Auto-correct Style/TrailingBlankLines offences

This commit is contained in:
Rob Harrington
2017-05-19 12:02:36 +10:00
parent 5061d0c4cd
commit b277ff03ea
34 changed files with 27 additions and 41 deletions

View File

@@ -1320,13 +1320,6 @@ Style/TernaryParentheses:
- 'app/controllers/spree/admin/payment_methods_controller_decorator.rb'
- 'app/controllers/spree/admin/shipping_methods_controller_decorator.rb'
# Offense count: 34
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: final_newline, final_blank_line
Style/TrailingBlankLines:
Enabled: false
# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleForMultiline, SupportedStylesForMultiline.

View File

@@ -47,4 +47,3 @@ end
#watch(%r{^spec/acceptance/(.+)\.feature$})
#watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
#end

View File

@@ -59,4 +59,4 @@ class Admin::ProductImportController < Spree::Admin::BaseController
def model_class
ProductImporter
end
end
end

View File

@@ -2,4 +2,4 @@ Deface::Override.new(:virtual_path => "spree/products/show",
:insert_after => "[data-hook='product_show']",
:text => "<%= javascript_include_tag main_app.distributors_enterprises_path(:format => :js) %>",
:name => "add_distributor_details_js_to_product",
:original => 'b05ac497efeeebd4464f29891fd2c4a0f60c24d9')
:original => 'b05ac497efeeebd4464f29891fd2c4a0f60c24d9')

View File

@@ -2,4 +2,4 @@ Deface::Override.new(:virtual_path => "spree/admin/products/_form",
:insert_top => "[data-hook='admin_product_form_right']",
:partial => "spree/admin/products/group_buy_form",
:name => "add_group_buy_to_admin_product_edit",
:original => '0c0e8d714989e48ee246a8253fb2b362f108621a')
:original => '0c0e8d714989e48ee246a8253fb2b362f108621a')

View File

@@ -1,4 +1,4 @@
Deface::Override.new(:virtual_path => "spree/admin/orders/index",
:name => "add_orders_admin_sub_menu",
:insert_before => "code[erb-silent]:contains('content_for :table_filter_title do')",
:text => "<%= render :partial => 'spree/admin/shared/order_sub_menu' %>")
:text => "<%= render :partial => 'spree/admin/shared/order_sub_menu' %>")

View File

@@ -1,3 +1,3 @@
Deface::Override.new(:virtual_path => "spree/shared/_nav_bar",
:remove => "#search-bar",
:name => "search_removal")
:name => "search_removal")

View File

@@ -1,4 +1,3 @@
Deface::Override.new(:virtual_path => "spree/shared/_sidebar",
:remove => "#sidebar",
:name => "sidebar_removal")

View File

@@ -2,4 +2,4 @@ Deface::Override.new(:virtual_path => "spree/shared/_order_details",
:replace => "div.row.steps-data",
:partial => "spree/shared/order_details_steps_data",
:name => "replace_order_details_steps_data",
:original => '1a68aa5db3fee7f7bbb2b6b826749aeb69168cee')
:original => '1a68aa5db3fee7f7bbb2b6b826749aeb69168cee')

View File

@@ -2,4 +2,4 @@ Deface::Override.new(:virtual_path => "spree/payments/_payment",
:replace => "code[erb-loud]:contains('content_tag(:span, payment.payment_method.name)')",
:text => "<%= content_tag( :span, ( payment.payment_method.description || payment.payment_method.name ).html_safe ) %>",
:name => "replace_payment_name_with_description",
:original => 'dff62efcadc0f9e6513b0f81a51ebbda035f78f6')
:original => 'dff62efcadc0f9e6513b0f81a51ebbda035f78f6')

View File

@@ -2,4 +2,4 @@ Deface::Override.new(:virtual_path => "spree/layouts/admin",
:insert_bottom => "[data-hook='admin_inside_head']",
:partial => "layouts/auth_token_script",
:name => "set_auth_token_in_backend",
:original => '6bc2c5de1c8f7542d033548557437c9fe4b3ba02')
:original => '6bc2c5de1c8f7542d033548557437c9fe4b3ba02')

View File

@@ -2,4 +2,4 @@ Deface::Override.new(:virtual_path => "spree/layouts/spree_application",
:insert_bottom => "[data-hook='inside_head']",
:partial => "layouts/auth_token_script",
:name => "set_auth_token_in_frontend",
:original => '5659ac7dbf6ac6469907b005b85285b894677815')
:original => '5659ac7dbf6ac6469907b005b85285b894677815')

View File

@@ -1,3 +1,3 @@
class Api::Admin::IdNameSerializer < ActiveModel::Serializer
attributes :id, :name
end
end

View File

@@ -1,3 +1,3 @@
class Api::Admin::TaxonSerializer < ActiveModel::Serializer
attributes :id, :name, :pretty_name
end
end

View File

@@ -2,4 +2,4 @@ class Api::CountrySerializer < ActiveModel::Serializer
attributes :id, :name, :states
has_many :states, serializer: Api::StateSerializer
end
end

View File

@@ -1,3 +1,3 @@
class Api::IdSerializer < ActiveModel::Serializer
attributes :id
end
end

View File

@@ -4,4 +4,4 @@ class Api::StateSerializer < ActiveModel::Serializer
def abbr
object.abbr.upcase
end
end
end

View File

@@ -1,3 +1,3 @@
object @enterprise
attributes :id, :name
attributes :id, :name

View File

@@ -10,4 +10,3 @@ if current_order
cart_count
end
end

View File

@@ -1,4 +1,3 @@
collection Enterprise.is_distributor.visible
extends 'json/partials/enterprise'
extends 'json/partials/hub'

View File

@@ -1,3 +1,3 @@
collection @line_items
extends "open_food_network/line_items/show"
extends "open_food_network/line_items/show"

View File

@@ -1,3 +1,3 @@
collection @orders
extends "open_food_network/orders/show"
extends "open_food_network/orders/show"

View File

@@ -4,4 +4,4 @@ attributes :id
node( :distributor ) { |p| p.distributor.blank? ? "" : p.distributor.name }
node( :line_items ) do |p|
partial '/open_food_network/line_items/index', object: p.line_items
end
end

View File

@@ -1,2 +1,2 @@
collection @products.order('id ASC')
extends "spree/api/products/bulk_show"
extends "spree/api/products/bulk_show"

View File

@@ -1,2 +1,2 @@
object false
node(:success) { "Use of API Authorised" }
node(:success) { "Use of API Authorised" }

View File

@@ -5,4 +5,4 @@ module OpenFoodNetwork
self.class.to_s.sub("Controller", "").underscore.split('/').last.singularize.to_sym
end
end
end
end

View File

@@ -28,5 +28,3 @@ namespace :openfoodnetwork do
end
end
end

View File

@@ -340,4 +340,4 @@ feature "Product Import", js: true do
potatoes.available_on.should be_within(1.day).of(Time.zone.local(2020, 1, 1))
end
end
end
end

View File

@@ -149,4 +149,4 @@ module OpenFoodNetwork
end
end
end
end
end

View File

@@ -4,4 +4,4 @@ describe Api::Admin::EnterpriseSerializer do
serializer = Api::Admin::EnterpriseSerializer.new enterprise
serializer.to_json.should match enterprise.name
end
end
end

View File

@@ -30,4 +30,4 @@ module Spree
"have ability #{ability_hash.keys.join(", ")} for #{target.class.name}"
end
end
end
end

View File

@@ -37,4 +37,4 @@ RSpec::Matchers.define :delegate do |method|
chain(:to) { |receiver| @to = receiver }
chain(:with_prefix) { @prefix = true }
end
end

View File

@@ -4,4 +4,4 @@ module Spree
Spree::Core::Engine.routes.url_helpers
end
end
end
end

View File

@@ -10,4 +10,3 @@ module RablHelper
include ActionView::Helpers::AssetTagHelper
end
end