Commit c14a3293c025ccc2e31fa98e89e8d305bb65a42d

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

Rubocop: collapsing duplicate whitespace before first argument

This gains a bit of consistency and ease of updating these values, at the cost of a bit of readability. I find this new version perfectly readable, personally.
.rubocop_todo.yml
... ... @@ -116,17 +116,6 @@ Style/SingleLineBlockParams:
116 116 Exclude:
117 117 - 'lib/hoptoad/v2.rb'
118 118  
119   -# Offense count: 11
120   -# Cop supports --auto-correct.
121   -Style/SingleSpaceBeforeFirstArg:
122   - Exclude:
123   - - 'app/models/comment.rb'
124   - - 'config/application.rb'
125   - - 'spec/fabricators/app_fabricator.rb'
126   - - 'spec/fabricators/comment_fabricator.rb'
127   - - 'spec/fabricators/notice_fabricator.rb'
128   - - 'spec/fabricators/user_fabricator.rb'
129   -
130 119 # Offense count: 873
131 120 # Cop supports --auto-correct.
132 121 # Configuration parameters: EnforcedStyle, SupportedStyles.
... ...
app/models/comment.rb
... ... @@ -12,7 +12,8 @@ class Comment
12 12  
13 13 belongs_to :err, class_name: "Problem"
14 14 belongs_to :user
15   - delegate :app, to: :err
  15 +
  16 + delegate :app, to: :err
16 17  
17 18 validates :body, presence: true
18 19  
... ...
config/application.rb
... ... @@ -37,9 +37,9 @@ module Errbit
37 37  
38 38 # > rails generate - config
39 39 config.generators do |g|
40   - g.orm :mongoid
  40 + g.orm :mongoid
41 41 g.template_engine :haml
42   - g.test_framework :rspec, fixture: false
  42 + g.test_framework :rspec, fixture: false
43 43 g.fixture_replacement :fabrication
44 44 end
45 45  
... ...
spec/fabricators/app_fabricator.rb
... ... @@ -22,8 +22,8 @@ end
22 22  
23 23 Fabricator(:deploy) do
24 24 app
25   - username 'clyde.frog'
26   - repository 'git@github.com/errbit/errbit.git'
27   - environment 'production'
28   - revision { SecureRandom.hex(10) }
  25 + username 'clyde.frog'
  26 + repository 'git@github.com/errbit/errbit.git'
  27 + environment 'production'
  28 + revision { SecureRandom.hex(10) }
29 29 end
... ...
spec/fabricators/notice_fabricator.rb
1 1 Fabricator :notice do
2 2 app
3 3 err
4   - error_class 'FooError'
5   - message 'Too Much Bar'
  4 + error_class 'FooError'
  5 + message 'Too Much Bar'
6 6 backtrace
7 7 server_environment { { 'environment-name' => 'production' } }
8 8 request { { 'component' => 'foo', 'action' => 'bar' } }
... ...
spec/fabricators/user_fabricator.rb
1 1 Fabricator :user do
2   - name 'Clyde Frog'
3   - email { sequence(:user_email) { |n| "user.#{n}@example.com" } }
4   - password 'password'
  2 + name 'Clyde Frog'
  3 + email { sequence(:user_email) { |n| "user.#{n}@example.com" } }
  4 + password 'password'
5 5 password_confirmation 'password'
6 6 end
7 7  
... ...