Commit c14a3293c025ccc2e31fa98e89e8d305bb65a42d
1 parent
6dfc9570
Exists in
master
and in
1 other branch
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.
Showing
6 changed files
with
13 additions
and
23 deletions
Show diff stats
.rubocop_todo.yml
@@ -116,17 +116,6 @@ Style/SingleLineBlockParams: | @@ -116,17 +116,6 @@ Style/SingleLineBlockParams: | ||
116 | Exclude: | 116 | Exclude: |
117 | - 'lib/hoptoad/v2.rb' | 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 | # Offense count: 873 | 119 | # Offense count: 873 |
131 | # Cop supports --auto-correct. | 120 | # Cop supports --auto-correct. |
132 | # Configuration parameters: EnforcedStyle, SupportedStyles. | 121 | # Configuration parameters: EnforcedStyle, SupportedStyles. |
app/models/comment.rb
@@ -12,7 +12,8 @@ class Comment | @@ -12,7 +12,8 @@ class Comment | ||
12 | 12 | ||
13 | belongs_to :err, class_name: "Problem" | 13 | belongs_to :err, class_name: "Problem" |
14 | belongs_to :user | 14 | belongs_to :user |
15 | - delegate :app, to: :err | 15 | + |
16 | + delegate :app, to: :err | ||
16 | 17 | ||
17 | validates :body, presence: true | 18 | validates :body, presence: true |
18 | 19 |
config/application.rb
@@ -37,9 +37,9 @@ module Errbit | @@ -37,9 +37,9 @@ module Errbit | ||
37 | 37 | ||
38 | # > rails generate - config | 38 | # > rails generate - config |
39 | config.generators do |g| | 39 | config.generators do |g| |
40 | - g.orm :mongoid | 40 | + g.orm :mongoid |
41 | g.template_engine :haml | 41 | g.template_engine :haml |
42 | - g.test_framework :rspec, fixture: false | 42 | + g.test_framework :rspec, fixture: false |
43 | g.fixture_replacement :fabrication | 43 | g.fixture_replacement :fabrication |
44 | end | 44 | end |
45 | 45 |
spec/fabricators/app_fabricator.rb
@@ -22,8 +22,8 @@ end | @@ -22,8 +22,8 @@ end | ||
22 | 22 | ||
23 | Fabricator(:deploy) do | 23 | Fabricator(:deploy) do |
24 | app | 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 | end | 29 | end |
spec/fabricators/notice_fabricator.rb
1 | Fabricator :notice do | 1 | Fabricator :notice do |
2 | app | 2 | app |
3 | err | 3 | err |
4 | - error_class 'FooError' | ||
5 | - message 'Too Much Bar' | 4 | + error_class 'FooError' |
5 | + message 'Too Much Bar' | ||
6 | backtrace | 6 | backtrace |
7 | server_environment { { 'environment-name' => 'production' } } | 7 | server_environment { { 'environment-name' => 'production' } } |
8 | request { { 'component' => 'foo', 'action' => 'bar' } } | 8 | request { { 'component' => 'foo', 'action' => 'bar' } } |
spec/fabricators/user_fabricator.rb
1 | Fabricator :user do | 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 | password_confirmation 'password' | 5 | password_confirmation 'password' |
6 | end | 6 | end |
7 | 7 |