diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 42029f4..451ab40 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -282,19 +282,6 @@ Style/SpaceBeforeBlockBraces: Style/SpaceInsideBlockBraces: Enabled: false -# Offense count: 26 -# Cop supports --auto-correct. -Style/SpaceInsideBrackets: - Exclude: - - 'app/helpers/apps_helper.rb' - - 'app/models/issue.rb' - - 'app/models/notice_fingerprinter.rb' - - 'app/models/notification_services/gtalk_service.rb' - - 'config/initializers/devise.rb' - - 'lib/tasks/errbit/database.rake' - - 'spec/lib/configurator_spec.rb' - - 'spec/models/issue_spec.rb' - # Offense count: 873 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles. diff --git a/app/helpers/apps_helper.rb b/app/helpers/apps_helper.rb index 15b3c0f..fe89c3b 100644 --- a/app/helpers/apps_helper.rb +++ b/app/helpers/apps_helper.rb @@ -5,7 +5,7 @@ module AppsHelper :class => 'button copy_config') html << select("duplicate", "app", App.all.asc(:name).reject{|a| a == @app }. - collect{|p| [ p.name, p.id ] }, { :include_blank => "[choose app]" }, + collect{|p| [p.name, p.id] }, { :include_blank => "[choose app]" }, { :class => "choose_other_app", :style => "display: none;" }) return html end diff --git a/app/models/issue.rb b/app/models/issue.rb index 726cbe4..80a6933 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -14,7 +14,7 @@ class Issue if tracker.respond_to?(:render_body_args) tracker.render_body_args else - [ 'issue_trackers/issue', formats: [:md] ] + ['issue_trackers/issue', formats: [:md]] end end diff --git a/app/models/notice_fingerprinter.rb b/app/models/notice_fingerprinter.rb index 34fe17c..141771a 100644 --- a/app/models/notice_fingerprinter.rb +++ b/app/models/notice_fingerprinter.rb @@ -14,7 +14,7 @@ class NoticeFingerprinter embedded_in :site_config def generate(api_key, notice, backtrace) - material = [ api_key ] + material = [api_key] material << notice.error_class if error_class material << notice.filtered_message if message material << notice.component if component diff --git a/app/models/notification_services/gtalk_service.rb b/app/models/notification_services/gtalk_service.rb index c9966e5..b8daa0f 100644 --- a/app/models/notification_services/gtalk_service.rb +++ b/app/models/notification_services/gtalk_service.rb @@ -17,11 +17,11 @@ class NotificationServices::GtalkService < NotificationService :placeholder => "toroom@conference.example.com", :label => "Send To Room (one only)" }, :user_id], - [ :service, { + [:service, { :placeholder => "talk.google.com", :label => "Jabber Service" }], - [ :service_url, { + [:service_url, { :placeholder => "http://www.google.com/talk/", :label => "Link To Jabber Service" }] diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index 79ed32d..d30f961 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -29,7 +29,7 @@ Devise.setup do |config| # session. If you need permissions, you should implement that in a before filter. # You can also supply a hash where the value is a boolean determining whether # or not authentication should be aborted when the value is not present. - config.authentication_keys = [ Errbit::Config.user_has_username ? :username : :email ] + config.authentication_keys = [Errbit::Config.user_has_username ? :username : :email] # Configure parameters from the request object used for authentication. Each entry # given should be a request method and it will automatically be passed to the @@ -41,12 +41,12 @@ Devise.setup do |config| # Configure which authentication keys should be case-insensitive. # These keys will be downcased upon creating or modifying a user and when used # to authenticate or find a user. Default is :email. - config.case_insensitive_keys = [ Errbit::Config.user_has_username ? :username : :email ] + config.case_insensitive_keys = [Errbit::Config.user_has_username ? :username : :email] # Configure which authentication keys should have whitespace stripped. # These keys will have whitespace before and after removed upon creating or # modifying a user and when used to authenticate or find a user. Default is :email. - config.strip_whitespace_keys = [ Errbit::Config.user_has_username ? :username : :email ] + config.strip_whitespace_keys = [Errbit::Config.user_has_username ? :username : :email] # Tell if authentication through request.params is enabled. True by default. # It can be set to an array that will enable params authentication only for the diff --git a/lib/tasks/errbit/database.rake b/lib/tasks/errbit/database.rake index b26c05f..6d30d7c 100644 --- a/lib/tasks/errbit/database.rake +++ b/lib/tasks/errbit/database.rake @@ -17,7 +17,7 @@ namespace :errbit do end desc "Remove notices in batch" - task :notices_delete, [ :problem_id ] => [ :environment ] do + task :notices_delete, [:problem_id] => [:environment] do BATCH_SIZE = 1000 if args[:problem_id] item_count = Problem.find(args[:problem_id]).notices.count diff --git a/spec/lib/configurator_spec.rb b/spec/lib/configurator_spec.rb index 7d834b9..bd6383d 100644 --- a/spec/lib/configurator_spec.rb +++ b/spec/lib/configurator_spec.rb @@ -22,15 +22,15 @@ describe Configurator do it 'overrides existing variables' do result = Configurator.run({ - one: ['VARONE', ->(_values) { 'oveRIIIDE' } ] + one: ['VARONE', ->(_values) { 'oveRIIIDE' }] }) expect(result.one).to eq('oveRIIIDE') end it 'overrides can refer to other values' do result = Configurator.run({ - one: ['VARONE', ->(values) { values[:one] } ], - three: ['VARTHREE' ] + one: ['VARONE', ->(values) { values[:one] }], + three: ['VARTHREE'] }) expect(result.one).to eq('zoom') end diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb index 05abafe..08a9144 100644 --- a/spec/models/issue_spec.rb +++ b/spec/models/issue_spec.rb @@ -51,14 +51,14 @@ describe Issue, type: 'model' do context "#render_body_args" do it "returns custom args if they exist" do allow(issue.tracker).to receive(:render_body_args).and_return( - [ 'my', { custom: 'args' } ] + ['my', { custom: 'args' }] ) - expect(issue.render_body_args).to eq [ 'my', { custom: 'args' } ] + expect(issue.render_body_args).to eq ['my', { custom: 'args' }] end it "returns default args if none exist" do expect(issue.render_body_args).to eq [ - 'issue_trackers/issue', formats: [:md] ] + 'issue_trackers/issue', formats: [:md]] end end -- libgit2 0.21.2