Commit ba41f88b73f2376f35674fe018862a6b2a18b6ac

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

Rubocop: remove blank lines at the start/end of class bodies

Tiny addition to overall consistency
.rubocop_todo.yml
@@ -165,19 +165,6 @@ Style/EmptyLineBetweenDefs: @@ -165,19 +165,6 @@ Style/EmptyLineBetweenDefs:
165 Style/EmptyLinesAroundBlockBody: 165 Style/EmptyLinesAroundBlockBody:
166 Enabled: false 166 Enabled: false
167 167
168 -# Offense count: 26  
169 -# Cop supports --auto-correct.  
170 -# Configuration parameters: EnforcedStyle, SupportedStyles.  
171 -Style/EmptyLinesAroundClassBody:  
172 - Enabled: false  
173 -  
174 -# Offense count: 2  
175 -# Cop supports --auto-correct.  
176 -Style/EmptyLinesAroundMethodBody:  
177 - Exclude:  
178 - - 'app/models/notification_services/hoiio_service.rb'  
179 - - 'app/models/notification_services/pushover_service.rb'  
180 -  
181 # Offense count: 9 168 # Offense count: 9
182 # Cop supports --auto-correct. 169 # Cop supports --auto-correct.
183 # Configuration parameters: EnforcedStyle, SupportedStyles. 170 # Configuration parameters: EnforcedStyle, SupportedStyles.
app/controllers/api/v1/notices_controller.rb
@@ -20,5 +20,4 @@ class Api::V1::NoticesController < ApplicationController @@ -20,5 +20,4 @@ class Api::V1::NoticesController < ApplicationController
20 format.xml { render :xml => results } 20 format.xml { render :xml => results }
21 end 21 end
22 end 22 end
23 -  
24 end 23 end
app/controllers/api/v1/problems_controller.rb
@@ -36,5 +36,4 @@ class Api::V1::ProblemsController < ApplicationController @@ -36,5 +36,4 @@ class Api::V1::ProblemsController < ApplicationController
36 format.xml { render :xml => results } 36 format.xml { render :xml => results }
37 end 37 end
38 end 38 end
39 -  
40 end 39 end
app/controllers/api/v1/stats_controller.rb
@@ -34,5 +34,4 @@ class Api::V1::StatsController < ApplicationController @@ -34,5 +34,4 @@ class Api::V1::StatsController < ApplicationController
34 34
35 authenticate_user! 35 authenticate_user!
36 end 36 end
37 -  
38 end 37 end
app/controllers/apps_controller.rb
1 class AppsController < ApplicationController 1 class AppsController < ApplicationController
2 -  
3 include ProblemsSearcher 2 include ProblemsSearcher
4 3
5 before_action :require_admin!, :except => [:index, :show] 4 before_action :require_admin!, :except => [:index, :show]
app/controllers/deploys_controller.rb
1 class DeploysController < ApplicationController 1 class DeploysController < ApplicationController
2 -  
3 protect_from_forgery :except => :create 2 protect_from_forgery :except => :create
4 3
5 skip_before_action :verify_authenticity_token, :only => :create 4 skip_before_action :verify_authenticity_token, :only => :create
@@ -40,6 +39,5 @@ class DeploysController &lt; ApplicationController @@ -40,6 +39,5 @@ class DeploysController &lt; ApplicationController
40 :revision => params[:head], 39 :revision => params[:head],
41 } 40 }
42 end 41 end
43 -  
44 end 42 end
45 43
app/controllers/notices_controller.rb
1 class NoticesController < ApplicationController 1 class NoticesController < ApplicationController
2 -  
3 class ParamsError < StandardError; end 2 class ParamsError < StandardError; end
4 3
5 skip_before_action :authenticate_user!, only: :create 4 skip_before_action :authenticate_user!, only: :create
@@ -48,5 +47,4 @@ class NoticesController &lt; ApplicationController @@ -48,5 +47,4 @@ class NoticesController &lt; ApplicationController
48 def bad_params(exception) 47 def bad_params(exception)
49 render :text => exception.message, :status => :bad_request 48 render :text => exception.message, :status => :bad_request
50 end 49 end
51 -  
52 end 50 end
app/controllers/problems_controller.rb
@@ -5,7 +5,6 @@ @@ -5,7 +5,6 @@
5 # MEMBER => :show, :edit, :update, :create, :destroy, :resolve, :unresolve, :create_issue, :unlink_issue 5 # MEMBER => :show, :edit, :update, :create, :destroy, :resolve, :unresolve, :create_issue, :unlink_issue
6 # COLLECTION => :index, :all, :destroy_several, :resolve_several, :unresolve_several, :merge_several, :unmerge_several, :search 6 # COLLECTION => :index, :all, :destroy_several, :resolve_several, :unresolve_several, :merge_several, :unmerge_several, :search
7 class ProblemsController < ApplicationController 7 class ProblemsController < ApplicationController
8 -  
9 include ProblemsSearcher 8 include ProblemsSearcher
10 9
11 before_action :need_selected_problem, :only => [ 10 before_action :need_selected_problem, :only => [
app/controllers/users_controller.rb
@@ -72,6 +72,5 @@ class UsersController &lt; ApplicationController @@ -72,6 +72,5 @@ class UsersController &lt; ApplicationController
72 def user_password_params 72 def user_password_params
73 @user_password_params ||= params[:user] ? params.require(:user).permit(:password, :password_confirmation) : {} 73 @user_password_params ||= params[:user] ? params.require(:user).permit(:password, :password_confirmation) : {}
74 end 74 end
75 -  
76 end 75 end
77 76
app/decorators/app_decorator.rb
1 class AppDecorator < Draper::Decorator 1 class AppDecorator < Draper::Decorator
2 -  
3 decorates_association :watchers 2 decorates_association :watchers
4 decorates_association :issue_tracker, :with => IssueTrackerDecorator 3 decorates_association :issue_tracker, :with => IssueTrackerDecorator
5 delegate_all 4 delegate_all
@@ -15,5 +14,4 @@ class AppDecorator &lt; Draper::Decorator @@ -15,5 +14,4 @@ class AppDecorator &lt; Draper::Decorator
15 def notify_err_display 14 def notify_err_display
16 object.notify_on_errs ? '' : 'display: none;' 15 object.notify_on_errs ? '' : 'display: none;'
17 end 16 end
18 -  
19 end 17 end
app/decorators/issue_tracker_field_decorator.rb
1 class IssueTrackerFieldDecorator < Draper::Decorator 1 class IssueTrackerFieldDecorator < Draper::Decorator
2 -  
3 def initialize(field, field_info) 2 def initialize(field, field_info)
4 @object = field 3 @object = field
5 @field_info = field_info 4 @field_info = field_info
app/decorators/watcher_decorator.rb
1 class WatcherDecorator < Draper::Decorator 1 class WatcherDecorator < Draper::Decorator
2 -  
3 delegate_all 2 delegate_all
4 3
5 def email_choosen 4 def email_choosen
6 object.email.blank? ? 'chosen' : '' 5 object.email.blank? ? 'chosen' : ''
7 end 6 end
8 -  
9 end 7 end
app/interactors/problem_destroy.rb
1 class ProblemDestroy 1 class ProblemDestroy
2 -  
3 attr_reader :problem 2 attr_reader :problem
4 3
5 def initialize(problem) 4 def initialize(problem)
@@ -44,5 +43,4 @@ class ProblemDestroy @@ -44,5 +43,4 @@ class ProblemDestroy
44 def delete_comments 43 def delete_comments
45 Comment.delete_all(:_id => { '$in' => comments_id }) 44 Comment.delete_all(:_id => { '$in' => comments_id })
46 end 45 end
47 -  
48 end 46 end
app/interactors/resolved_problem_clearer.rb
1 require 'problem_destroy' 1 require 'problem_destroy'
2 2
3 class ResolvedProblemClearer 3 class ResolvedProblemClearer
4 -  
5 ## 4 ##
6 # Clear all problem already resolved 5 # Clear all problem already resolved
7 # 6 #
app/models/app.rb
@@ -217,6 +217,5 @@ class App @@ -217,6 +217,5 @@ class App
217 github_repo.sub!(/(git@|https?:\/\/)#{github_host}(\/|:)/, '') 217 github_repo.sub!(/(git@|https?:\/\/)#{github_host}(\/|:)/, '')
218 github_repo.sub!(/\.git$/, '') 218 github_repo.sub!(/\.git$/, '')
219 end 219 end
220 -  
221 end 220 end
222 221
app/models/comment.rb
@@ -37,5 +37,4 @@ class Comment @@ -37,5 +37,4 @@ class Comment
37 def decrease_counter_cache 37 def decrease_counter_cache
38 err.inc(comments_count: -1) if err 38 err.inc(comments_count: -1) if err
39 end 39 end
40 -  
41 end 40 end
app/models/deploy.rb
@@ -43,6 +43,5 @@ class Deploy @@ -43,6 +43,5 @@ class Deploy
43 Mailer.deploy_notification(self).deliver_now 43 Mailer.deploy_notification(self).deliver_now
44 end 44 end
45 end 45 end
46 -  
47 end 46 end
48 47
app/models/err.rb
@@ -17,5 +17,4 @@ class Err @@ -17,5 +17,4 @@ class Err
17 validates_presence_of :problem_id, :fingerprint 17 validates_presence_of :problem_id, :fingerprint
18 18
19 delegate :app, :resolved?, :to => :problem 19 delegate :app, :resolved?, :to => :problem
20 -  
21 end 20 end
app/models/notification_services/hoiio_service.rb
@@ -37,6 +37,5 @@ class NotificationServices::HoiioService &lt; NotificationService @@ -37,6 +37,5 @@ class NotificationServices::HoiioService &lt; NotificationService
37 room_id.split(',').each do |number| 37 room_id.split(',').each do |number|
38 sms.send :dest => number, :msg => "#{Errbit::Config.protocol}://#{Errbit::Config.host}/apps/#{problem.app.id} #{notification_description problem}" 38 sms.send :dest => number, :msg => "#{Errbit::Config.protocol}://#{Errbit::Config.host}/apps/#{problem.app.id} #{notification_description problem}"
39 end 39 end
40 -  
41 end 40 end
42 end 41 end
app/models/notification_services/pushover_service.rb
@@ -27,6 +27,5 @@ class NotificationServices::PushoverService &lt; NotificationService @@ -27,6 +27,5 @@ class NotificationServices::PushoverService &lt; NotificationService
27 27
28 # send push notification to pushover 28 # send push notification to pushover
29 notification.notify(api_token, "#{notification_description problem}", :priority => 1, :title => "Errbit Notification", :url => "#{Errbit::Config.protocol}://#{Errbit::Config.host}/apps/#{problem.app.id}", :url_title => "Link to error") 29 notification.notify(api_token, "#{notification_description problem}", :priority => 1, :title => "Errbit Notification", :url => "#{Errbit::Config.protocol}://#{Errbit::Config.host}/apps/#{problem.app.id}", :url_title => "Link to error")
30 -  
31 end 30 end
32 end 31 end
app/models/watcher.rb
@@ -39,6 +39,5 @@ class Watcher @@ -39,6 +39,5 @@ class Watcher
39 self.user = self.user_id = nil 39 self.user = self.user_id = nil
40 end 40 end
41 end 41 end
42 -  
43 end 42 end
44 43
lib/configurator.rb
@@ -4,7 +4,6 @@ require &#39;ostruct&#39; @@ -4,7 +4,6 @@ require &#39;ostruct&#39;
4 # order to provide a consistent way to use configuration throughout your 4 # order to provide a consistent way to use configuration throughout your
5 # application 5 # application
6 class Configurator 6 class Configurator
7 -  
8 # Run the configurator and return the processed values 7 # Run the configurator and return the processed values
9 # 8 #
10 # @example Simple mapping 9 # @example Simple mapping
lib/recurse.rb
1 class Hash 1 class Hash
2 -  
3 # Apply a block to hash, and recursively apply that block 2 # Apply a block to hash, and recursively apply that block
4 # to each sub-hash or +types+. 3 # to each sub-hash or +types+.
5 # 4 #
@@ -20,6 +19,5 @@ class Hash @@ -20,6 +19,5 @@ class Hash
20 end 19 end
21 yield h 20 yield h
22 end 21 end
23 -  
24 end 22 end
25 23