diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 47111c0..663a4ce 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -159,19 +159,6 @@ Style/EmptyLineBetweenDefs: - 'spec/decorators/issue_tracker_type_decorator_spec.rb' - 'spec/views/problems/show.html.haml_spec.rb' -# Offense count: 12 -# Cop supports --auto-correct. -Style/EmptyLines: - Exclude: - - 'app/controllers/api/v1/stats_controller.rb' - - 'app/decorators/issue_tracker_field_decorator.rb' - - 'app/models/app.rb' - - 'app/models/problem.rb' - - 'config/deploy/production.example.rb' - - 'lib/tasks/errbit/demo.rake' - - 'script/rspec-queue-mongoid.rb' - - 'spec/acceptance/app_regenerate_api_key_spec.rb' - # Offense count: 28 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. diff --git a/app/controllers/api/v1/stats_controller.rb b/app/controllers/api/v1/stats_controller.rb index ec2b755..e51c11e 100644 --- a/app/controllers/api/v1/stats_controller.rb +++ b/app/controllers/api/v1/stats_controller.rb @@ -23,7 +23,6 @@ class Api::V1::StatsController < ApplicationController end end - protected def require_api_key_or_authenticate_user! diff --git a/app/decorators/issue_tracker_field_decorator.rb b/app/decorators/issue_tracker_field_decorator.rb index e3e40aa..3975b57 100644 --- a/app/decorators/issue_tracker_field_decorator.rb +++ b/app/decorators/issue_tracker_field_decorator.rb @@ -12,7 +12,6 @@ class IssueTrackerFieldDecorator < Draper::Decorator field_info[:label] || object.to_s.titleize end - def input(form, issue_tracker) form.send(input_field, key.to_s, :placeholder => field_info[:placeholder], diff --git a/app/models/app.rb b/app/models/app.rb index e0d9002..8e7a480 100644 --- a/app/models/app.rb +++ b/app/models/app.rb @@ -89,7 +89,6 @@ class App (last_deploy = deploys.last) && last_deploy.created_at end - # Legacy apps don't have notify_on_errs and notify_on_deploys params def notify_on_errs !(super == false) @@ -133,7 +132,6 @@ class App "#{bitbucket_url}/src/#{repo_branch}/#{file}" end - def issue_tracker_configured? issue_tracker.present? && issue_tracker.configured? end @@ -143,7 +141,6 @@ class App notification_service.configured? end - def notification_recipients if notify_all_users (User.all.map(&:email).reject(&:blank?) + watchers.map(&:address)).uniq diff --git a/app/models/problem.rb b/app/models/problem.rb index 4b00edd..d02d08f 100644 --- a/app/models/problem.rb +++ b/app/models/problem.rb @@ -12,7 +12,6 @@ class Problem user_agents: :user_agent_string }.freeze - field :last_notice_at, :type => ActiveSupport::TimeWithZone, :default => Proc.new { Time.zone.now } field :first_notice_at, :type => ActiveSupport::TimeWithZone, :default => Proc.new { Time.zone.now } field :last_deploy_at, :type => Time @@ -186,7 +185,6 @@ class Problem !resolved? end - def self.merge!(*problems) ProblemMerge.new(problems).merge end diff --git a/config/deploy/production.example.rb b/config/deploy/production.example.rb index ff72d7a..a0d03e6 100644 --- a/config/deploy/production.example.rb +++ b/config/deploy/production.example.rb @@ -8,7 +8,6 @@ role :app, %w(deploy@example.com) role :web, %w(deploy@example.com) role :db, %w(deploy@example.com) - # Extended Server Syntax # ====================== # This can be used to drop a more detailed server definition into the @@ -17,7 +16,6 @@ role :db, %w(deploy@example.com) server 'example.com', user: 'deploy', roles: %w(web app), my_property: :my_value - # Custom SSH Options # ================== # You may pass any option but keep in mind that net/ssh understands a diff --git a/lib/tasks/errbit/demo.rake b/lib/tasks/errbit/demo.rake index 1d319d4..c809581 100644 --- a/lib/tasks/errbit/demo.rake +++ b/lib/tasks/errbit/demo.rake @@ -64,7 +64,6 @@ namespace :errbit do end end - Fabricate(:notice, :err => Fabricate(:err, :problem => Fabricate(:problem, :app => app))) puts "=== Created demo app: '#{app.name}', with example errors." end diff --git a/script/rspec-queue-mongoid.rb b/script/rspec-queue-mongoid.rb index 3b444f0..9cc994f 100755 --- a/script/rspec-queue-mongoid.rb +++ b/script/rspec-queue-mongoid.rb @@ -5,7 +5,6 @@ require 'bundler' Bundler.setup(:default, :development, :test) require 'test_queue/runner/rspec' - class MongoidRspecRunner < TestQueue::Runner::RSpec def after_fork(num) super diff --git a/spec/acceptance/app_regenerate_api_key_spec.rb b/spec/acceptance/app_regenerate_api_key_spec.rb index a3077df..14b803c 100644 --- a/spec/acceptance/app_regenerate_api_key_spec.rb +++ b/spec/acceptance/app_regenerate_api_key_spec.rb @@ -55,7 +55,6 @@ feature "Create an application" do expect(App.where(:name => 'My new app').count).to eq 1 expect(App.where(:name => 'My new app 2').count).to eq 0 - click_on I18n.t('shared.navigation.apps') click_on 'My new app' click_link I18n.t('apps.show.edit') -- libgit2 0.21.2