diff --git a/.rubocop.yml b/.rubocop.yml index b70d99a..e6a3a1e 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,30 +2,35 @@ AllCops: TargetRubyVersion: 2.3 Exclude: - 'bin/**/*' -Documentation: - Enabled: false -LineLength: - Enabled: true - Max: 128 -MethodLength: - Max: 20 -IndentHash: - Enabled: false + - 'vendor/**/*' -Layout/AlignHash: - Enabled: false Layout/EmptyLineAfterGuardClause: Enabled: false +Layout/FirstHashElementIndentation: + Enabled: false +Layout/HashAlignment: + Enabled: false +Layout/LineLength: + Max: 128 Layout/MultilineMethodCallIndentation: EnforcedStyle: indented -Naming/AccessorMethodName: - Enabled: false + +Metrics/AbcSize: + Max: 17 Metrics/BlockLength: Exclude: - 'spec/**/*' +Metrics/MethodLength: + Max: 20 Metrics/ParameterLists: Max: 6 + +Naming/AccessorMethodName: + Enabled: false + Style/ClassAndModuleChildren: Enabled: false +Style/Documentation: + Enabled: false Style/FrozenStringLiteralComment: Enabled: false diff --git a/.travis.yml b/.travis.yml index 87d5fde..2429f4a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,5 +17,6 @@ before_script: - ./cc-test-reporter before-build script: - bundle exec rspec + - bundle exec rubocop after_script: - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT diff --git a/Gemfile.lock b/Gemfile.lock index 1d8a855..c615999 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -27,7 +27,7 @@ GEM method_source (0.9.2) multipart-post (2.1.1) parallel (1.19.1) - parser (2.6.5.0) + parser (2.7.0.1) ast (~> 2.4.0) pry (0.12.2) coderay (~> 1.1.0) @@ -35,31 +35,29 @@ GEM pry-byebug (3.7.0) byebug (~> 11.0) pry (~> 0.10) - psych (3.1.0) - public_suffix (4.0.1) + public_suffix (4.0.2) rainbow (3.0.0) rake (12.3.3) rspec (3.9.0) rspec-core (~> 3.9.0) rspec-expectations (~> 3.9.0) rspec-mocks (~> 3.9.0) - rspec-core (3.9.0) - rspec-support (~> 3.9.0) + rspec-core (3.9.1) + rspec-support (~> 3.9.1) rspec-expectations (3.9.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) - rspec-mocks (3.9.0) + rspec-mocks (3.9.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) - rspec-support (3.9.0) - rubocop (0.66.0) + rspec-support (3.9.2) + rubocop (0.78.0) jaro_winkler (~> 1.5.1) parallel (~> 1.10) - parser (>= 2.5, != 2.5.1.1) - psych (>= 3.1.0) + parser (>= 2.6) rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 1.6) + unicode-display_width (>= 1.4.0, < 1.7) ruby-progressbar (1.10.1) safe_yaml (1.0.5) simplecov (0.17.1) @@ -67,7 +65,7 @@ GEM json (>= 1.8, < 3) simplecov-html (~> 0.10.0) simplecov-html (0.10.2) - unicode-display_width (1.5.0) + unicode-display_width (1.6.0) webmock (3.7.6) addressable (>= 2.3.6) crack (>= 0.3.2) @@ -82,7 +80,7 @@ DEPENDENCIES pry-byebug (~> 3.7) rake (~> 12.3) rspec (~> 3.2) - rubocop (~> 0.66.0) + rubocop (~> 0.78.0) simplecov (~> 0.17.1) webmock (~> 3.1) diff --git a/mrkt.gemspec b/mrkt.gemspec index 0c2b9ca..a74712e 100644 --- a/mrkt.gemspec +++ b/mrkt.gemspec @@ -23,10 +23,10 @@ Gem::Specification.new do |spec| spec.add_dependency 'faraday_middleware', '> 0.9.0', '< 0.16.0' spec.add_development_dependency 'bundler', '~> 1.3' - spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'pry-byebug', '~> 3.7' spec.add_development_dependency 'rake', '~> 12.3' spec.add_development_dependency 'rspec', '~> 3.2' - spec.add_development_dependency 'rubocop', '~> 0.66.0' + spec.add_development_dependency 'rubocop', '~> 0.78.0' + spec.add_development_dependency 'simplecov', '~> 0.17.1' spec.add_development_dependency 'webmock', '~> 3.1' end diff --git a/spec/concerns/import_leads_spec.rb b/spec/concerns/import_leads_spec.rb index b990eb8..b8c222a 100644 --- a/spec/concerns/import_leads_spec.rb +++ b/spec/concerns/import_leads_spec.rb @@ -5,7 +5,7 @@ include_context 'initialized client' describe '#import_lead' do - let(:tempfile) { Tempfile.new(['import-leads', 'csv']) } + let(:tempfile) { Tempfile.new(%w[import-leads csv]) } let(:response_stub) do { requestId: 'c245#14cd6830ae2', diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 298c23c..c163195 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -8,7 +8,9 @@ require 'mrkt' -Dir[File.expand_path('spec/support/**/*.rb')].each { |f| require f } +Dir[File.expand_path('spec/support/**/*.rb')].sort.each do |file| + require file +end RSpec.configure do |config| config.default_formatter = :doc if config.files_to_run.one? diff --git a/spec/support/webmock.rb b/spec/support/webmock.rb index f85d57f..06157ca 100644 --- a/spec/support/webmock.rb +++ b/spec/support/webmock.rb @@ -1,6 +1,6 @@ require 'webmock/rspec' -RSpec.configure do |config| +RSpec.configure do def json_stub(content_stub) { headers: { content_type: 'application/json' },