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