diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 471fb4e..1300aa3 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -88,15 +88,6 @@ Style/FileName: - 'config/initializers/cve-2013-0156.rb' - 'script/rspec-queue-mongoid.rb' -# Offense count: 4 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -Style/FirstParameterIndentation: - Exclude: - - 'app/models/issue_tracker.rb' - - 'spec/decorators/backtrace_decorator_spec.rb' - - 'spec/decorators/issue_tracker_type_decorator_spec.rb' - # Offense count: 8 # Configuration parameters: EnforcedStyle, SupportedStyles. Style/FormatString: diff --git a/app/models/issue_tracker.rb b/app/models/issue_tracker.rb index 7d0a43e..0cc7c11 100644 --- a/app/models/issue_tracker.rb +++ b/app/models/issue_tracker.rb @@ -14,10 +14,12 @@ class IssueTracker begin klass = ErrbitPlugin::Registry.issue_trackers[type_tracker] || ErrbitPlugin::NoneIssueTracker # TODO: we need to find out a better way to pass those config to the issue tracker - klass.new(options.merge( - github_repo: app.try(:github_repo), - bitbucket_repo: app.try(:bitbucket_repo) - )) + klass.new( + options.merge( + github_repo: app.try(:github_repo), + bitbucket_repo: app.try(:bitbucket_repo) + ) + ) end end diff --git a/spec/decorators/backtrace_decorator_spec.rb b/spec/decorators/backtrace_decorator_spec.rb index e028564..cef6434 100644 --- a/spec/decorators/backtrace_decorator_spec.rb +++ b/spec/decorators/backtrace_decorator_spec.rb @@ -1,27 +1,29 @@ describe BacktraceDecorator, type: :decorator do let(:backtrace) do - described_class.new(Backtrace.new( - lines: [ - { number: 131, - file: '[PROJECT_ROOT]app/controllers/accounts_controller.rb', - method: :update_preferences }, - { number: 61, - file: '[PROJECT_ROOT]app/controllers/application_controller.rb', - method: :call }, - { number: 182, - file: '[GEM_ROOT]activesupport-2.3.18/lib/active_support/callbacks.rb', - method: :call }, - { number: 384, - file: '[PROJECT_ROOT]app/models/account.rb', - method: :update_server_tag_scope }, - { number: 182, - file: '[GEM_ROOT]activesupport-2.3.18/lib/active_support/callbacks.rb', - method: :evaluate_method }, - { number: 23, - file: '/home/rails/library/current/vendor/bundle/ruby/2.1.0/bin/rainbows', - method: '
' } - ] - )) + described_class.new( + Backtrace.new( + lines: [ + { number: 131, + file: '[PROJECT_ROOT]app/controllers/accounts_controller.rb', + method: :update_preferences }, + { number: 61, + file: '[PROJECT_ROOT]app/controllers/application_controller.rb', + method: :call }, + { number: 182, + file: '[GEM_ROOT]activesupport-2.3.18/lib/active_support/callbacks.rb', + method: :call }, + { number: 384, + file: '[PROJECT_ROOT]app/models/account.rb', + method: :update_server_tag_scope }, + { number: 182, + file: '[GEM_ROOT]activesupport-2.3.18/lib/active_support/callbacks.rb', + method: :evaluate_method }, + { number: 23, + file: '/home/rails/library/current/vendor/bundle/ruby/2.1.0/bin/rainbows', + method: '
' } + ] + ) + ) end describe '#grouped_lines' do diff --git a/spec/decorators/issue_tracker_type_decorator_spec.rb b/spec/decorators/issue_tracker_type_decorator_spec.rb index a58994d..f3adcce 100644 --- a/spec/decorators/issue_tracker_type_decorator_spec.rb +++ b/spec/decorators/issue_tracker_type_decorator_spec.rb @@ -50,15 +50,21 @@ describe IssueTrackerDecorator do describe "#params_class" do it 'adds the label in class' do - tracker = IssueTrackerDecorator.new(IssueTracker.new( - type_tracker: 'none')) + tracker = IssueTrackerDecorator.new( + IssueTracker.new(type_tracker: 'none') + ) expect(decorator.params_class(tracker)).to eql 'fake' end it 'adds chosen class if type is same' do - expect(decorator.params_class( - IssueTracker.new(type_tracker: 'fake').decorate - )).to eql 'chosen fake' + expect( + decorator. + params_class( + IssueTracker.new( + type_tracker: 'fake' + ).decorate + ) + ).to eql 'chosen fake' end end end -- libgit2 0.21.2