Commit ba41f88b73f2376f35674fe018862a6b2a18b6ac
1 parent
d9624a37
Exists in
master
and in
1 other branch
Rubocop: remove blank lines at the start/end of class bodies
Tiny addition to overall consistency
Showing
23 changed files
with
0 additions
and
41 deletions
Show diff stats
.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
app/controllers/api/v1/problems_controller.rb
app/controllers/api/v1/stats_controller.rb
app/controllers/apps_controller.rb
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 < ApplicationController | @@ -40,6 +39,5 @@ class DeploysController < 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 < ApplicationController | @@ -48,5 +47,4 @@ class NoticesController < 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 < ApplicationController | @@ -72,6 +72,5 @@ class UsersController < 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 < Draper::Decorator | @@ -15,5 +14,4 @@ class AppDecorator < 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
app/decorators/watcher_decorator.rb
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
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
app/models/deploy.rb
app/models/err.rb
app/models/notification_services/hoiio_service.rb
@@ -37,6 +37,5 @@ class NotificationServices::HoiioService < NotificationService | @@ -37,6 +37,5 @@ class NotificationServices::HoiioService < 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 < NotificationService | @@ -27,6 +27,5 @@ class NotificationServices::PushoverService < 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
lib/configurator.rb
@@ -4,7 +4,6 @@ require 'ostruct' | @@ -4,7 +4,6 @@ require 'ostruct' | ||
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 |