From ba41f88b73f2376f35674fe018862a6b2a18b6ac Mon Sep 17 00:00:00 2001 From: Laust Rud Jacobsen Date: Thu, 15 Oct 2015 21:25:25 +0200 Subject: [PATCH] Rubocop: remove blank lines at the start/end of class bodies --- .rubocop_todo.yml | 13 ------------- app/controllers/api/v1/notices_controller.rb | 1 - app/controllers/api/v1/problems_controller.rb | 1 - app/controllers/api/v1/stats_controller.rb | 1 - app/controllers/apps_controller.rb | 1 - app/controllers/deploys_controller.rb | 2 -- app/controllers/notices_controller.rb | 2 -- app/controllers/problems_controller.rb | 1 - app/controllers/users_controller.rb | 1 - app/decorators/app_decorator.rb | 2 -- app/decorators/issue_tracker_field_decorator.rb | 1 - app/decorators/watcher_decorator.rb | 2 -- app/interactors/problem_destroy.rb | 2 -- app/interactors/resolved_problem_clearer.rb | 1 - app/models/app.rb | 1 - app/models/comment.rb | 1 - app/models/deploy.rb | 1 - app/models/err.rb | 1 - app/models/notification_services/hoiio_service.rb | 1 - app/models/notification_services/pushover_service.rb | 1 - app/models/watcher.rb | 1 - lib/configurator.rb | 1 - lib/recurse.rb | 2 -- 23 files changed, 0 insertions(+), 41 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 663a4ce..1b152a7 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -165,19 +165,6 @@ Style/EmptyLineBetweenDefs: Style/EmptyLinesAroundBlockBody: Enabled: false -# Offense count: 26 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -Style/EmptyLinesAroundClassBody: - Enabled: false - -# Offense count: 2 -# Cop supports --auto-correct. -Style/EmptyLinesAroundMethodBody: - Exclude: - - 'app/models/notification_services/hoiio_service.rb' - - 'app/models/notification_services/pushover_service.rb' - # Offense count: 9 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. diff --git a/app/controllers/api/v1/notices_controller.rb b/app/controllers/api/v1/notices_controller.rb index 125465a..8c208b5 100644 --- a/app/controllers/api/v1/notices_controller.rb +++ b/app/controllers/api/v1/notices_controller.rb @@ -20,5 +20,4 @@ class Api::V1::NoticesController < ApplicationController format.xml { render :xml => results } end end - end diff --git a/app/controllers/api/v1/problems_controller.rb b/app/controllers/api/v1/problems_controller.rb index 76f6282..e506276 100644 --- a/app/controllers/api/v1/problems_controller.rb +++ b/app/controllers/api/v1/problems_controller.rb @@ -36,5 +36,4 @@ class Api::V1::ProblemsController < ApplicationController format.xml { render :xml => results } end end - end diff --git a/app/controllers/api/v1/stats_controller.rb b/app/controllers/api/v1/stats_controller.rb index e51c11e..8f9409d 100644 --- a/app/controllers/api/v1/stats_controller.rb +++ b/app/controllers/api/v1/stats_controller.rb @@ -34,5 +34,4 @@ class Api::V1::StatsController < ApplicationController authenticate_user! end - end diff --git a/app/controllers/apps_controller.rb b/app/controllers/apps_controller.rb index 65da197..ac07272 100644 --- a/app/controllers/apps_controller.rb +++ b/app/controllers/apps_controller.rb @@ -1,5 +1,4 @@ class AppsController < ApplicationController - include ProblemsSearcher before_action :require_admin!, :except => [:index, :show] diff --git a/app/controllers/deploys_controller.rb b/app/controllers/deploys_controller.rb index da8d9d3..320988d 100644 --- a/app/controllers/deploys_controller.rb +++ b/app/controllers/deploys_controller.rb @@ -1,5 +1,4 @@ class DeploysController < ApplicationController - protect_from_forgery :except => :create skip_before_action :verify_authenticity_token, :only => :create @@ -40,6 +39,5 @@ class DeploysController < ApplicationController :revision => params[:head], } end - end diff --git a/app/controllers/notices_controller.rb b/app/controllers/notices_controller.rb index 16d90a1..b902422 100644 --- a/app/controllers/notices_controller.rb +++ b/app/controllers/notices_controller.rb @@ -1,5 +1,4 @@ class NoticesController < ApplicationController - class ParamsError < StandardError; end skip_before_action :authenticate_user!, only: :create @@ -48,5 +47,4 @@ class NoticesController < ApplicationController def bad_params(exception) render :text => exception.message, :status => :bad_request end - end diff --git a/app/controllers/problems_controller.rb b/app/controllers/problems_controller.rb index 801f8a7..e7a136f 100644 --- a/app/controllers/problems_controller.rb +++ b/app/controllers/problems_controller.rb @@ -5,7 +5,6 @@ # MEMBER => :show, :edit, :update, :create, :destroy, :resolve, :unresolve, :create_issue, :unlink_issue # COLLECTION => :index, :all, :destroy_several, :resolve_several, :unresolve_several, :merge_several, :unmerge_several, :search class ProblemsController < ApplicationController - include ProblemsSearcher before_action :need_selected_problem, :only => [ diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index b95a234..a35fc27 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -72,6 +72,5 @@ class UsersController < ApplicationController def user_password_params @user_password_params ||= params[:user] ? params.require(:user).permit(:password, :password_confirmation) : {} end - end diff --git a/app/decorators/app_decorator.rb b/app/decorators/app_decorator.rb index bc6e131..4f662cb 100644 --- a/app/decorators/app_decorator.rb +++ b/app/decorators/app_decorator.rb @@ -1,5 +1,4 @@ class AppDecorator < Draper::Decorator - decorates_association :watchers decorates_association :issue_tracker, :with => IssueTrackerDecorator delegate_all @@ -15,5 +14,4 @@ class AppDecorator < Draper::Decorator def notify_err_display object.notify_on_errs ? '' : 'display: none;' end - end diff --git a/app/decorators/issue_tracker_field_decorator.rb b/app/decorators/issue_tracker_field_decorator.rb index 3975b57..41ee9ea 100644 --- a/app/decorators/issue_tracker_field_decorator.rb +++ b/app/decorators/issue_tracker_field_decorator.rb @@ -1,5 +1,4 @@ class IssueTrackerFieldDecorator < Draper::Decorator - def initialize(field, field_info) @object = field @field_info = field_info diff --git a/app/decorators/watcher_decorator.rb b/app/decorators/watcher_decorator.rb index 092ce41..8616d45 100644 --- a/app/decorators/watcher_decorator.rb +++ b/app/decorators/watcher_decorator.rb @@ -1,9 +1,7 @@ class WatcherDecorator < Draper::Decorator - delegate_all def email_choosen object.email.blank? ? 'chosen' : '' end - end diff --git a/app/interactors/problem_destroy.rb b/app/interactors/problem_destroy.rb index 2f89415..ecdc837 100644 --- a/app/interactors/problem_destroy.rb +++ b/app/interactors/problem_destroy.rb @@ -1,5 +1,4 @@ class ProblemDestroy - attr_reader :problem def initialize(problem) @@ -44,5 +43,4 @@ class ProblemDestroy def delete_comments Comment.delete_all(:_id => { '$in' => comments_id }) end - end diff --git a/app/interactors/resolved_problem_clearer.rb b/app/interactors/resolved_problem_clearer.rb index a78ada5..d950d37 100644 --- a/app/interactors/resolved_problem_clearer.rb +++ b/app/interactors/resolved_problem_clearer.rb @@ -1,7 +1,6 @@ require 'problem_destroy' class ResolvedProblemClearer - ## # Clear all problem already resolved # diff --git a/app/models/app.rb b/app/models/app.rb index 8e7a480..19e89b5 100644 --- a/app/models/app.rb +++ b/app/models/app.rb @@ -217,6 +217,5 @@ class App github_repo.sub!(/(git@|https?:\/\/)#{github_host}(\/|:)/, '') github_repo.sub!(/\.git$/, '') end - end diff --git a/app/models/comment.rb b/app/models/comment.rb index a1cde17..c49c267 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -37,5 +37,4 @@ class Comment def decrease_counter_cache err.inc(comments_count: -1) if err end - end diff --git a/app/models/deploy.rb b/app/models/deploy.rb index 9d74757..49734a3 100644 --- a/app/models/deploy.rb +++ b/app/models/deploy.rb @@ -43,6 +43,5 @@ class Deploy Mailer.deploy_notification(self).deliver_now end end - end diff --git a/app/models/err.rb b/app/models/err.rb index 1df99cd..4be899a 100644 --- a/app/models/err.rb +++ b/app/models/err.rb @@ -17,5 +17,4 @@ class Err validates_presence_of :problem_id, :fingerprint delegate :app, :resolved?, :to => :problem - end diff --git a/app/models/notification_services/hoiio_service.rb b/app/models/notification_services/hoiio_service.rb index 8f6471b..f0625ef 100644 --- a/app/models/notification_services/hoiio_service.rb +++ b/app/models/notification_services/hoiio_service.rb @@ -37,6 +37,5 @@ class NotificationServices::HoiioService < NotificationService room_id.split(',').each do |number| sms.send :dest => number, :msg => "#{Errbit::Config.protocol}://#{Errbit::Config.host}/apps/#{problem.app.id} #{notification_description problem}" end - end end diff --git a/app/models/notification_services/pushover_service.rb b/app/models/notification_services/pushover_service.rb index f581f72..76bffcd 100644 --- a/app/models/notification_services/pushover_service.rb +++ b/app/models/notification_services/pushover_service.rb @@ -27,6 +27,5 @@ class NotificationServices::PushoverService < NotificationService # send push notification to pushover 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") - end end diff --git a/app/models/watcher.rb b/app/models/watcher.rb index 1170304..c993862 100644 --- a/app/models/watcher.rb +++ b/app/models/watcher.rb @@ -39,6 +39,5 @@ class Watcher self.user = self.user_id = nil end end - end diff --git a/lib/configurator.rb b/lib/configurator.rb index 901f3cf..fc1b7c0 100644 --- a/lib/configurator.rb +++ b/lib/configurator.rb @@ -4,7 +4,6 @@ require 'ostruct' # order to provide a consistent way to use configuration throughout your # application class Configurator - # Run the configurator and return the processed values # # @example Simple mapping diff --git a/lib/recurse.rb b/lib/recurse.rb index a943ba8..9304823 100644 --- a/lib/recurse.rb +++ b/lib/recurse.rb @@ -1,5 +1,4 @@ class Hash - # Apply a block to hash, and recursively apply that block # to each sub-hash or +types+. # @@ -20,6 +19,5 @@ class Hash end yield h end - end -- libgit2 0.21.2