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