Commit bf4b315efebc4609df8d3458956639a31d8b1e6d

Authored by Laust Rud Jacobsen
1 parent a0045dbc
Exists in master and in 1 other branch production

Rubocop: strip out extra newlines around module body

.rubocop_todo.yml
... ... @@ -159,17 +159,6 @@ Style/EmptyLineBetweenDefs:
159 159 - 'spec/decorators/issue_tracker_type_decorator_spec.rb'
160 160 - 'spec/views/problems/show.html.haml_spec.rb'
161 161  
162   -# Offense count: 9
163   -# Cop supports --auto-correct.
164   -# Configuration parameters: EnforcedStyle, SupportedStyles.
165   -Style/EmptyLinesAroundModuleBody:
166   - Exclude:
167   - - 'app/helpers/application_helper.rb'
168   - - 'app/helpers/form_helper.rb'
169   - - 'app/helpers/hash_helper.rb'
170   - - 'app/helpers/navigation_helper.rb'
171   - - 'app/helpers/sort_helper.rb'
172   -
173 162 # Offense count: 22
174 163 # Cop supports --auto-correct.
175 164 # Configuration parameters: AllowForAlignment.
... ...
app/helpers/application_helper.rb
... ... @@ -84,5 +84,4 @@ module ApplicationHelper
84 84 def head_size
85 85 4
86 86 end
87   -
88 87 end
... ...
app/helpers/form_helper.rb
1 1 module FormHelper
2   -
3 2 def errors_for(document)
4 3 return unless document.errors.any?
5 4  
... ... @@ -14,5 +13,4 @@ module FormHelper
14 13 def label_for_attr(builder, field)
15 14 (builder.object_name + field).gsub(/[\[\]]/,'_').squeeze('_')
16 15 end
17   -
18 16 end
... ...
app/helpers/hash_helper.rb
1 1 module HashHelper
2   -
3 2 def pretty_hash(hash, nesting = 0)
4 3 return '{}' if hash.empty?
5 4  
... ... @@ -17,5 +16,4 @@ module HashHelper
17 16 nesting -= 1
18 17 pretty += "\n#{' '*nesting*tab_size}}"
19 18 end
20   -
21 19 end
... ...
app/helpers/navigation_helper.rb
1 1 module NavigationHelper
2   -
3 2 # Returns ' active' if you are on a given controller
4 3 # - active_if_here(:users) => ' active' if users controller
5 4 # Or on one of a list of controllers
... ... @@ -44,5 +43,4 @@ module NavigationHelper
44 43 def page_count_from_end(current_page, total_pages)
45 44 (total_pages.to_i - current_page.to_i) + 1
46 45 end
47   -
48 46 end
... ...
app/helpers/sort_helper.rb
1 1 # encoding: utf-8
2 2 module SortHelper
3   -
4 3 def link_for_sort(name, field=nil)
5 4 field ||= name.underscore
6 5 current = (params_sort == field)
... ... @@ -10,5 +9,4 @@ module SortHelper
10 9 options.merge!(:class => "current #{order}") if current
11 10 link_to(name, url, options)
12 11 end
13   -
14 12 end
... ...