Commit d9624a37a07ba7eca9b76da9fa8b39e52c0e5adf

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

Rubocop: stripping out duplicate empty lines

.rubocop_todo.yml
@@ -159,19 +159,6 @@ Style/EmptyLineBetweenDefs: @@ -159,19 +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: 12  
163 -# Cop supports --auto-correct.  
164 -Style/EmptyLines:  
165 - Exclude:  
166 - - 'app/controllers/api/v1/stats_controller.rb'  
167 - - 'app/decorators/issue_tracker_field_decorator.rb'  
168 - - 'app/models/app.rb'  
169 - - 'app/models/problem.rb'  
170 - - 'config/deploy/production.example.rb'  
171 - - 'lib/tasks/errbit/demo.rake'  
172 - - 'script/rspec-queue-mongoid.rb'  
173 - - 'spec/acceptance/app_regenerate_api_key_spec.rb'  
174 -  
175 # Offense count: 28 162 # Offense count: 28
176 # Cop supports --auto-correct. 163 # Cop supports --auto-correct.
177 # Configuration parameters: EnforcedStyle, SupportedStyles. 164 # Configuration parameters: EnforcedStyle, SupportedStyles.
app/controllers/api/v1/stats_controller.rb
@@ -23,7 +23,6 @@ class Api::V1::StatsController < ApplicationController @@ -23,7 +23,6 @@ class Api::V1::StatsController < ApplicationController
23 end 23 end
24 end 24 end
25 25
26 -  
27 protected 26 protected
28 27
29 def require_api_key_or_authenticate_user! 28 def require_api_key_or_authenticate_user!
app/decorators/issue_tracker_field_decorator.rb
@@ -12,7 +12,6 @@ class IssueTrackerFieldDecorator < Draper::Decorator @@ -12,7 +12,6 @@ class IssueTrackerFieldDecorator < Draper::Decorator
12 field_info[:label] || object.to_s.titleize 12 field_info[:label] || object.to_s.titleize
13 end 13 end
14 14
15 -  
16 def input(form, issue_tracker) 15 def input(form, issue_tracker)
17 form.send(input_field, key.to_s, 16 form.send(input_field, key.to_s,
18 :placeholder => field_info[:placeholder], 17 :placeholder => field_info[:placeholder],
app/models/app.rb
@@ -89,7 +89,6 @@ class App @@ -89,7 +89,6 @@ class App
89 (last_deploy = deploys.last) && last_deploy.created_at 89 (last_deploy = deploys.last) && last_deploy.created_at
90 end 90 end
91 91
92 -  
93 # Legacy apps don't have notify_on_errs and notify_on_deploys params 92 # Legacy apps don't have notify_on_errs and notify_on_deploys params
94 def notify_on_errs 93 def notify_on_errs
95 !(super == false) 94 !(super == false)
@@ -133,7 +132,6 @@ class App @@ -133,7 +132,6 @@ class App
133 "#{bitbucket_url}/src/#{repo_branch}/#{file}" 132 "#{bitbucket_url}/src/#{repo_branch}/#{file}"
134 end 133 end
135 134
136 -  
137 def issue_tracker_configured? 135 def issue_tracker_configured?
138 issue_tracker.present? && issue_tracker.configured? 136 issue_tracker.present? && issue_tracker.configured?
139 end 137 end
@@ -143,7 +141,6 @@ class App @@ -143,7 +141,6 @@ class App
143 notification_service.configured? 141 notification_service.configured?
144 end 142 end
145 143
146 -  
147 def notification_recipients 144 def notification_recipients
148 if notify_all_users 145 if notify_all_users
149 (User.all.map(&:email).reject(&:blank?) + watchers.map(&:address)).uniq 146 (User.all.map(&:email).reject(&:blank?) + watchers.map(&:address)).uniq
app/models/problem.rb
@@ -12,7 +12,6 @@ class Problem @@ -12,7 +12,6 @@ class Problem
12 user_agents: :user_agent_string 12 user_agents: :user_agent_string
13 }.freeze 13 }.freeze
14 14
15 -  
16 field :last_notice_at, :type => ActiveSupport::TimeWithZone, :default => Proc.new { Time.zone.now } 15 field :last_notice_at, :type => ActiveSupport::TimeWithZone, :default => Proc.new { Time.zone.now }
17 field :first_notice_at, :type => ActiveSupport::TimeWithZone, :default => Proc.new { Time.zone.now } 16 field :first_notice_at, :type => ActiveSupport::TimeWithZone, :default => Proc.new { Time.zone.now }
18 field :last_deploy_at, :type => Time 17 field :last_deploy_at, :type => Time
@@ -186,7 +185,6 @@ class Problem @@ -186,7 +185,6 @@ class Problem
186 !resolved? 185 !resolved?
187 end 186 end
188 187
189 -  
190 def self.merge!(*problems) 188 def self.merge!(*problems)
191 ProblemMerge.new(problems).merge 189 ProblemMerge.new(problems).merge
192 end 190 end
config/deploy/production.example.rb
@@ -8,7 +8,6 @@ role :app, %w(deploy@example.com) @@ -8,7 +8,6 @@ role :app, %w(deploy@example.com)
8 role :web, %w(deploy@example.com) 8 role :web, %w(deploy@example.com)
9 role :db, %w(deploy@example.com) 9 role :db, %w(deploy@example.com)
10 10
11 -  
12 # Extended Server Syntax 11 # Extended Server Syntax
13 # ====================== 12 # ======================
14 # This can be used to drop a more detailed server definition into the 13 # This can be used to drop a more detailed server definition into the
@@ -17,7 +16,6 @@ role :db, %w(deploy@example.com) @@ -17,7 +16,6 @@ role :db, %w(deploy@example.com)
17 16
18 server 'example.com', user: 'deploy', roles: %w(web app), my_property: :my_value 17 server 'example.com', user: 'deploy', roles: %w(web app), my_property: :my_value
19 18
20 -  
21 # Custom SSH Options 19 # Custom SSH Options
22 # ================== 20 # ==================
23 # You may pass any option but keep in mind that net/ssh understands a 21 # You may pass any option but keep in mind that net/ssh understands a
lib/tasks/errbit/demo.rake
@@ -64,7 +64,6 @@ namespace :errbit do @@ -64,7 +64,6 @@ namespace :errbit do
64 end 64 end
65 end 65 end
66 66
67 -  
68 Fabricate(:notice, :err => Fabricate(:err, :problem => Fabricate(:problem, :app => app))) 67 Fabricate(:notice, :err => Fabricate(:err, :problem => Fabricate(:problem, :app => app)))
69 puts "=== Created demo app: '#{app.name}', with example errors." 68 puts "=== Created demo app: '#{app.name}', with example errors."
70 end 69 end
script/rspec-queue-mongoid.rb
@@ -5,7 +5,6 @@ require 'bundler' @@ -5,7 +5,6 @@ require 'bundler'
5 Bundler.setup(:default, :development, :test) 5 Bundler.setup(:default, :development, :test)
6 require 'test_queue/runner/rspec' 6 require 'test_queue/runner/rspec'
7 7
8 -  
9 class MongoidRspecRunner < TestQueue::Runner::RSpec 8 class MongoidRspecRunner < TestQueue::Runner::RSpec
10 def after_fork(num) 9 def after_fork(num)
11 super 10 super
spec/acceptance/app_regenerate_api_key_spec.rb
@@ -55,7 +55,6 @@ feature &quot;Create an application&quot; do @@ -55,7 +55,6 @@ feature &quot;Create an application&quot; do
55 expect(App.where(:name => 'My new app').count).to eq 1 55 expect(App.where(:name => 'My new app').count).to eq 1
56 expect(App.where(:name => 'My new app 2').count).to eq 0 56 expect(App.where(:name => 'My new app 2').count).to eq 0
57 57
58 -  
59 click_on I18n.t('shared.navigation.apps') 58 click_on I18n.t('shared.navigation.apps')
60 click_on 'My new app' 59 click_on 'My new app'
61 click_link I18n.t('apps.show.edit') 60 click_link I18n.t('apps.show.edit')