From 6f1e765f007ac4fe700c7f210666a26bbe1173cf Mon Sep 17 00:00:00 2001 From: Salahutdinov Dmitry Date: Thu, 15 Nov 2018 13:06:12 +0500 Subject: [PATCH] Allow Rails from 5.0 --- .gitignore | 1 + .rubocop.yml | 1 + .travis.yml | 9 +++++++++ Appraisals | 13 +++++++++++++ logux_rails.gemspec | 3 ++- 5 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 Appraisals diff --git a/.gitignore b/.gitignore index b82bfae..9bb3737 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ coverage Gemfile.lock spec/dummy/db/*.sqlite3 +/gemfiles/* diff --git a/.rubocop.yml b/.rubocop.yml index 02372ea..7f5d23d 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -6,6 +6,7 @@ AllCops: Exclude: - 'spec/dummy/db/**/*.rb' - 'vendor/**/*' + - 'gemfiles/*' TargetRubyVersion: 2.4 Metrics/BlockLength: diff --git a/.travis.yml b/.travis.yml index f7cf6df..b2e61f3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,4 +2,13 @@ sudo: false language: ruby rvm: - 2.4.2 + before_install: gem install bundler -v 1.16.0 + +before_script: + - bundle install + - bundle exec appraisal + +script: + - bundle exec appraisal rspec + - bundle exec rubocop diff --git a/Appraisals b/Appraisals new file mode 100644 index 0000000..5894052 --- /dev/null +++ b/Appraisals @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +appraise '5.0' do + gem 'activerecord', '~> 5.0' +end + +appraise '5.1' do + gem 'activerecord', '~> 5.1' +end + +appraise '5.2' do + gem 'activerecord', '~> 5.2' +end diff --git a/logux_rails.gemspec b/logux_rails.gemspec index 25b755f..8e3a0fd 100644 --- a/logux_rails.gemspec +++ b/logux_rails.gemspec @@ -26,8 +26,9 @@ Gem::Specification.new do |spec| spec.add_dependency 'configurations' spec.add_dependency 'hashie' spec.add_dependency 'nanoid' - spec.add_dependency 'rails', '~> 5' + spec.add_dependency 'rails', '>= 5.0' spec.add_dependency 'rest-client' + spec.add_development_dependency 'appraisal', '~> 2.2' spec.add_development_dependency 'bundler', '~> 1.16' spec.add_development_dependency 'combustion', '~> 1.0.0' spec.add_development_dependency 'coveralls'