Commit 7f626d1d010e8bf55b9b357e897be60f2bcf1818
1 parent
6e99f8ee
Exists in
master
and in
1 other branch
Rubocop: multiline blocks are now indented
Showing
6 changed files
with
29 additions
and
35 deletions
Show diff stats
.rubocop_todo.yml
... | ... | @@ -180,17 +180,6 @@ Style/LeadingCommentSpace: |
180 | 180 | - 'spec/models/notification_service/hoiio_service_spec.rb' |
181 | 181 | - 'spec/models/notification_service/pushover_service_spec.rb' |
182 | 182 | |
183 | -# Offense count: 7 | |
184 | -# Cop supports --auto-correct. | |
185 | -Style/MultilineBlockLayout: | |
186 | - Exclude: | |
187 | - - 'lib/tasks/errbit/demo.rake' | |
188 | - - 'spec/fabricators/issue_tracker_fabricator.rb' | |
189 | - - 'spec/interactors/user_destroy_spec.rb' | |
190 | - - 'spec/models/app_spec.rb' | |
191 | - - 'spec/models/error_report_spec.rb' | |
192 | - - 'spec/views/apps/show.atom.builder_spec.rb' | |
193 | - | |
194 | 183 | # Offense count: 10 |
195 | 184 | # Cop supports --auto-correct. |
196 | 185 | # Configuration parameters: EnforcedStyle, SupportedStyles. | ... | ... |
app/models/notice.rb
... | ... | @@ -28,7 +28,7 @@ class Notice |
28 | 28 | |
29 | 29 | scope :ordered, -> { order_by(:created_at.asc) } |
30 | 30 | scope :reverse_ordered, -> { order_by(:created_at.desc) } |
31 | - scope :for_errs, -> (errs) { | |
31 | + scope :for_errs, lambda { |errs| | |
32 | 32 | where(:err_id.in => errs.all.map(&:id)) |
33 | 33 | } |
34 | 34 | ... | ... |
lib/tasks/errbit/demo.rake
... | ... | @@ -32,11 +32,12 @@ namespace :errbit do |
32 | 32 | |
33 | 33 | def random_backtrace |
34 | 34 | backtrace = [] |
35 | - 99.times {|t| backtrace << { | |
36 | - 'number' => t.hash % 1000, | |
37 | - 'file' => "/path/to/file.rb", | |
38 | - 'method' => RANDOM_METHODS.sample.to_s | |
39 | - }} | |
35 | + 99.times {|t| | |
36 | + backtrace << { | |
37 | + 'number' => t.hash % 1000, | |
38 | + 'file' => "/path/to/file.rb", | |
39 | + 'method' => RANDOM_METHODS.sample.to_s | |
40 | + }} | |
40 | 41 | backtrace |
41 | 42 | end |
42 | 43 | ... | ... |
spec/fabricators/issue_tracker_fabricator.rb
spec/interactors/user_destroy_spec.rb
1 | 1 | describe UserDestroy do |
2 | - let(:app) { Fabricate( | |
3 | - :app, | |
4 | - :watchers => [ | |
5 | - Fabricate.build(:user_watcher, :user => user) | |
6 | - ]) | |
2 | + let(:app) { | |
3 | + Fabricate( | |
4 | + :app, | |
5 | + :watchers => [ | |
6 | + Fabricate.build(:user_watcher, :user => user) | |
7 | + ]) | |
7 | 8 | } |
8 | 9 | |
9 | 10 | describe "#destroy" do | ... | ... |
spec/models/app_spec.rb
... | ... | @@ -164,11 +164,12 @@ describe App, type: 'model' do |
164 | 164 | |
165 | 165 | context '#find_or_create_err!' do |
166 | 166 | let(:app) { Fabricate(:app) } |
167 | - let(:conditions) { { | |
168 | - :error_class => 'Whoops', | |
169 | - :environment => 'production', | |
170 | - :fingerprint => 'some-finger-print' | |
171 | - } | |
167 | + let(:conditions) { | |
168 | + { | |
169 | + :error_class => 'Whoops', | |
170 | + :environment => 'production', | |
171 | + :fingerprint => 'some-finger-print' | |
172 | + } | |
172 | 173 | } |
173 | 174 | |
174 | 175 | it 'returns the correct err if one already exists' do |
... | ... | @@ -192,10 +193,11 @@ describe App, type: 'model' do |
192 | 193 | end |
193 | 194 | |
194 | 195 | context "without error_class" do |
195 | - let(:conditions) { { | |
196 | - :environment => 'production', | |
197 | - :fingerprint => 'some-finger-print' | |
198 | - } | |
196 | + let(:conditions) { | |
197 | + { | |
198 | + :environment => 'production', | |
199 | + :fingerprint => 'some-finger-print' | |
200 | + } | |
199 | 201 | } |
200 | 202 | it 'save the err' do |
201 | 203 | expect(Err.where(conditions).first).to be_nil | ... | ... |