diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..04500c0 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,45 @@ +version: 2.1 +orbs: + ruby: circleci/ruby@0.1.2 + +jobs: + build: + docker: + - image: circleci/ruby:2.7-node + executor: ruby/default + steps: + - checkout + - run: + name: Bundle install + command: | + gem install bundler:2.1.4 + bundle install --path vendor/bundle + - run: + name: Test + command: bundle exec rspec + - run: + name: Coding style + command: | + gem install rubocop + mkdir -p rubocop + rubocop --format html -o rubocop/rubocop.html || true + - run: + name: Notation + command: | + gem install sexp_processor -v 4.13.0 + gem install rubycritic -v 4.3.2 + rubycritic app --no-browser || true + - run: + name: "Axe d'optimisation" + command: | + gem install fasterer + fasterer || true + - run: + name: "Audit Securité du Gemfile" + command: | + gem install bundler-audit + bundle audit --update + - store_artifacts: + path: rubocop/rubocop.html + - store_artifacts: + path: tmp/rubycritic diff --git a/.rubocop.yml b/.rubocop.yml index c74d08e..4433cbe 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -12,7 +12,7 @@ Metrics/BlockLength: Exclude: - spec/**/* -Metrics/LineLength: +Layout/LineLength: Max: 120 Metrics/MethodLength: diff --git a/lib/loan_creator/in_fine.rb b/lib/loan_creator/in_fine.rb index cd35569..2ebe0a3 100644 --- a/lib/loan_creator/in_fine.rb +++ b/lib/loan_creator/in_fine.rb @@ -4,7 +4,7 @@ class InFine < LoanCreator::Common # Thus we're generating a Linear loan instead of rewriting already existing code. def lender_timetable options = @options.merge(deferred_in_periods: duration_in_periods - 1) - LoanCreator::Linear.new(options).lender_timetable + LoanCreator::Linear.new(**options).lender_timetable end end end diff --git a/loan_creator.gemspec b/loan_creator.gemspec index 88f4baf..849ea34 100644 --- a/loan_creator.gemspec +++ b/loan_creator.gemspec @@ -20,7 +20,7 @@ Gem::Specification.new do |spec| spec.require_paths = ['lib'] spec.add_development_dependency 'bundler', '~> 2.1.4' - spec.add_development_dependency 'rake', '~> 10.0' + spec.add_development_dependency 'rake', '~> 12.0' spec.add_development_dependency 'rspec', '~> 3.0' spec.add_development_dependency 'simplecov', '~> 0.16' spec.add_development_dependency 'byebug', '~> 11.0'