Commit a0045dbc37581c6b611d0ab37bc937472df20c98

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

Rubocop: strip out newlines around block bodies

.rubocop_todo.yml
... ... @@ -159,12 +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: 28
163   -# Cop supports --auto-correct.
164   -# Configuration parameters: EnforcedStyle, SupportedStyles.
165   -Style/EmptyLinesAroundBlockBody:
166   - Enabled: false
167   -
168 162 # Offense count: 9
169 163 # Cop supports --auto-correct.
170 164 # Configuration parameters: EnforcedStyle, SupportedStyles.
... ...
app/controllers/problems_searcher.rb
... ... @@ -5,7 +5,6 @@ module ProblemsSearcher
5 5 extend ActiveSupport::Concern
6 6  
7 7 included do
8   -
9 8 expose(:params_sort) {
10 9 unless %w{app message last_notice_at last_deploy_at count}.member?(params[:sort])
11 10 "last_notice_at"
... ... @@ -29,6 +28,5 @@ module ProblemsSearcher
29 28 expose(:err_ids) {
30 29 (params[:problems] || []).compact
31 30 }
32   -
33 31 end
34 32 end
... ...
app/helpers/hash_helper.rb
... ... @@ -13,7 +13,6 @@ module HashHelper
13 13 pretty += "\n#{' '*nesting*tab_size}"
14 14 pretty += "#{key.inspect} => #{val}"
15 15 pretty += "," unless key == sorted_keys.last
16   -
17 16 end
18 17 nesting -= 1
19 18 pretty += "\n#{' '*nesting*tab_size}}"
... ...
config/routes.rb
1 1 Rails.application.routes.draw do
2   -
3 2 devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" }
4 3  
5 4 # Hoptoad Notifier Routes
... ...
spec/acceptance/app_regenerate_api_key_spec.rb
... ... @@ -35,7 +35,6 @@ feature "Regeneration api_Key" do
35 35 end
36 36  
37 37 feature "Create an application" do
38   -
39 38 let(:admin) { Fabricate(:admin) }
40 39 let(:user) {
41 40 Fabricate(:user_watcher, :app => app).user
... ... @@ -63,7 +62,6 @@ feature "Create an application" do
63 62 page.has_content?(I18n.t('controllers.apps.flash.update.success'))
64 63 expect(App.where(:name => 'My new app').count).to eq 0
65 64 expect(App.where(:name => 'My new app 2').count).to eq 1
66   -
67 65 end
68 66  
69 67 scenario "create an apps with issue tracker and edit it", :js => true do
... ...
spec/acceptance/sign_in_with_github_spec.rb
1 1 require 'acceptance/acceptance_helper'
2 2  
3 3 feature 'Sign in with GitHub' do
4   -
5 4 background do
6 5 allow(Errbit::Config).to receive(:github_authentication).and_return(true)
7 6 Fabricate(:user, :github_login => 'nashby')
... ...
spec/controllers/api/v1/notices_controller_spec.rb
... ... @@ -28,14 +28,12 @@ describe Api::V1::NoticesController, type: 'controller' do
28 28 end
29 29  
30 30 describe "given a date range" do
31   -
32 31 it "should return only the notices created during the date range" do
33 32 get :index, {:auth_token => @user.authentication_token, :start_date => "2012-08-01", :end_date => "2012-08-27"}
34 33 expect(response).to be_success
35 34 notices = JSON.load response.body
36 35 expect(notices.length).to eq 3
37 36 end
38   -
39 37 end
40 38  
41 39 it "should return all notices" do
... ... @@ -44,7 +42,6 @@ describe Api::V1::NoticesController, type: 'controller' do
44 42 notices = JSON.load response.body
45 43 expect(notices.length).to eq 4
46 44 end
47   -
48 45 end
49 46 end
50 47 end
... ...
spec/controllers/apps_controller_spec.rb
... ... @@ -330,7 +330,6 @@ describe AppsController, type: 'controller' do
330 330 end
331 331  
332 332 describe "POST /apps/:id/regenerate_api_key" do
333   -
334 333 context "like watcher" do
335 334 before do
336 335 sign_in watcher.user
... ... @@ -340,7 +339,6 @@ describe AppsController, type: 'controller' do
340 339 post :regenerate_api_key, :id => 'foo'
341 340 expect(request).to redirect_to root_path
342 341 end
343   -
344 342 end
345 343  
346 344 context "like admin" do
... ...
spec/controllers/notices_controller_spec.rb
... ... @@ -34,7 +34,6 @@ describe NoticesController, type: 'controller' do
34 34 expect(response.body).to match(%r{<id[^>]*>#{notice.id}</id>})
35 35 expect(response.body).to match(%r{<url[^>]*>(.+)#{locate_path(notice.id)}</url>})
36 36 end
37   -
38 37 end
39 38  
40 39 it "generates a notice from xml in a data param [POST]" do
... ...
spec/controllers/problems_controller_spec.rb
... ... @@ -318,7 +318,6 @@ describe ProblemsController, type: &#39;controller&#39; do
318 318 end
319 319  
320 320 context "POST /problems/unmerge_several" do
321   -
322 321 it "should require at least one problem" do
323 322 post :unmerge_several, :problems => []
324 323 expect(request.flash[:notice]).to eql I18n.t('controllers.problems.flash.no_select_problem')
... ... @@ -332,11 +331,9 @@ describe ProblemsController, type: &#39;controller&#39; do
332 331 expect(merged_problem.reload.errs.length).to eq 1
333 332 }.to change(Problem, :count).by(1)
334 333 end
335   -
336 334 end
337 335  
338 336 context "POST /problems/resolve_several" do
339   -
340 337 it "should require at least one problem" do
341 338 post :resolve_several, :problems => []
342 339 expect(request.flash[:notice]).to eql I18n.t('controllers.problems.flash.no_select_problem')
... ... @@ -360,7 +357,6 @@ describe ProblemsController, type: &#39;controller&#39; do
360 357 end
361 358  
362 359 context "POST /problems/unresolve_several" do
363   -
364 360 it "should require at least one problem" do
365 361 post :unresolve_several, :problems => []
366 362 expect(request.flash[:notice]).to eql I18n.t('controllers.problems.flash.no_select_problem')
... ...
spec/controllers/users_controller_spec.rb
... ... @@ -34,7 +34,6 @@ describe UsersController, type: &#39;controller&#39; do
34 34 expect(controller.user).to eq(user)
35 35 expect(response).to render_template 'edit'
36 36 end
37   -
38 37 end
39 38  
40 39 context "PUT /users/:other_id" do
... ... @@ -188,7 +187,6 @@ describe UsersController, type: &#39;controller&#39; do
188 187 end
189 188 end
190 189 context "when the update is unsuccessful" do
191   -
192 190 it "renders the edit page" do
193 191 put :update, :id => user.to_param, :user => {:name => nil}
194 192 expect(response).to render_template(:edit)
... ...
spec/interactors/problem_destroy_spec.rb
... ... @@ -44,7 +44,6 @@ describe ProblemDestroy do
44 44 problem_destroy.execute
45 45 end
46 46 end
47   -
48 47 end
49 48  
50 49 context "in integration way" do
... ...
spec/models/error_report_spec.rb
... ... @@ -292,7 +292,6 @@ describe ErrorReport do
292 292 it 'return the notice' do
293 293 expect(error_report.notice).to be_a Notice
294 294 end
295   -
296 295 end
297 296 end
298 297  
... ...
spec/models/notice_observer_spec.rb
... ... @@ -129,7 +129,6 @@ describe &quot;Callback on Notice&quot;, type: &#39;model&#39; do
129 129  
130 130 describe 'should not send a notification if a notification service is not' \
131 131 'configured' do
132   -
133 132 let(:notification_service) { Fabricate(:notification_service) }
134 133 let(:app) { Fabricate(:app, notification_service: notification_service )}
135 134 let(:notice_attrs) { notice_attrs_for.call(app.api_key) }
... ...
spec/models/notification_service/gtalk_service_spec.rb
... ... @@ -88,7 +88,6 @@ describe NotificationServices::GtalkService, type: &#39;model&#39; do
88 88 @notification_service.room_id = ""
89 89 @notification_service.create_notification(@problem)
90 90 end
91   -
92 91 end
93 92  
94 93 it "it should send a notification to room only" do
... ...
spec/models/notification_service/notification_service_spec.rb
1 1 describe NotificationServices, type: 'model' do
2   -
3 2 let(:notice) { Fabricate :notice }
4 3 let(:notification_service) { Fabricate :notification_service, :app => notice.app }
5 4 let(:problem) { notice.problem }
... ...
spec/views/apps/new.html.haml_spec.rb
... ... @@ -18,7 +18,6 @@ describe &quot;apps/new.html.haml&quot;, type: &#39;view&#39; do
18 18  
19 19 expect(action_bar).to have_selector('a.button', :text => 'cancel')
20 20 end
21   -
22 21 end
23 22  
24 23 context "with unvalid app" do
... ...
spec/views/problems/show.html.haml_spec.rb
... ... @@ -104,7 +104,6 @@ describe &quot;problems/show.html.haml&quot;, type: &#39;view&#39; do
104 104 render
105 105 expect(view.content_for(:action_bar)).to_not match(/create issue/)
106 106 end
107   -
108 107 end
109 108  
110 109 context "with tracker associate on app" do
... ... @@ -138,7 +137,6 @@ describe &quot;problems/show.html.haml&quot;, type: &#39;view&#39; do
138 137 render
139 138 expect(view.content_for(:action_bar)).to match(/create issue/)
140 139 end
141   -
142 140 end
143 141  
144 142 context "with problem with issue link" do
... ...
spec/views/users/show.html.haml_spec.rb
... ... @@ -55,7 +55,6 @@ describe &#39;users/show.html.haml&#39;, type: &#39;view&#39; do
55 55 render
56 56 expect(view.content_for(:action_bar)).to have_selector('a.delete[data-confirm="%s"]' % I18n.t('.users.confirm_delete'))
57 57 end
58   -
59 58 end
60 59 end
61 60 end
... ...