diff --git a/.rubocop.yml b/.rubocop.yml index 59b273ce..59058280 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,2 +1,5 @@ Metrics/LineLength: Max: 120 + +Style/FrozenStringLiteralComment: + EnforcedStyle: never diff --git a/.ruby-version b/.ruby-version index 85076ae9..a2abb12e 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -ruby-2.2.2 \ No newline at end of file +ruby-2.4.5 diff --git a/.travis.yml b/.travis.yml index 45bd3810..6adc7ea2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,7 +56,8 @@ matrix: - rvm: 2.6.0 gemfile: gemfiles/rails_4.1.gemfile before_install: - - gem install bundler -v '<2' + - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true + - gem install bundler -v '< 2' script: - bundle exec rspec addons: diff --git a/Appraisals b/Appraisals index 2ed8e9d8..888158c3 100644 --- a/Appraisals +++ b/Appraisals @@ -1,34 +1,42 @@ appraise 'rails-3' do + gem 'sqlite3', '< 1.4.0' gem 'rails', '3.2.22.5' end appraise 'rails-4' do + gem 'sqlite3', '< 1.4.0' gem 'rails', '4.0.13' end appraise 'rails-4.1' do + gem 'sqlite3', '< 1.4.0' gem 'rails', '4.1.16' gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw] end appraise 'rails-4.2' do + gem 'sqlite3', '< 1.4.0' gem 'rails', '4.2.11' gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw] end appraise 'rails-5' do + gem 'sqlite3', '< 1.4.0' gem 'rails', '5.0.7.1' end appraise 'rails-5.1' do + gem 'sqlite3', '< 1.4.0' gem 'rails', '5.1.6.1' end appraise 'rails-5.2' do + gem 'sqlite3', '< 1.4.0' gem 'rails', '5.2.2' gem 'bootsnap' end appraise 'sinatra' do + gem 'sqlite3', '< 1.4.0' gem 'sinatra', '2.0.5' end diff --git a/CHANGELOG.md b/CHANGELOG.md index c82e1485..1805e5b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## Unreleased -... +* Lock max version of dry-validation depending on the ruby version ([#223](https://github.com/railsconfig/config/pull/223)) ## 1.7.1 diff --git a/config.gemspec b/config.gemspec index 4ac448e8..8cca4bc2 100644 --- a/config.gemspec +++ b/config.gemspec @@ -23,18 +23,30 @@ Gem::Specification.new do |s| s.require_paths = ['lib'] s.required_ruby_version = '>= 2.0.0' - s.add_dependency 'activesupport', '>= 3.0' - s.add_dependency 'deep_merge', '~> 1.2', '>= 1.2.1' + s.add_dependency 'deep_merge', '~> 1.2', '>= 1.2.1' - s.add_dependency 'dry-validation', '~> 0.10', '>= 0.10.7' if RUBY_VERSION >= '2.1' && RUBY_VERSION < '2.2' - s.add_dependency 'dry-validation', '~> 0.12', '>= 0.12.2' if RUBY_VERSION >= '2.2' + if RUBY_VERSION >= '2.2' + s.add_dependency 'activesupport', '>= 3.0' + s.add_dependency 'dry-validation', '~> 0.12', '>= 0.12.2', '< 1.0.0' + + s.add_development_dependency 'rails', '~> 5.2', '>= 5.2.2' + end + + if RUBY_VERSION >= '2.1' && RUBY_VERSION < '2.2' + s.add_dependency 'activesupport', '>= 3.0', '< 5.0.0' + s.add_dependency 'dry-configurable', '~> 0.5.0' + s.add_dependency 'dry-logic', '~> 0.5.0' + s.add_dependency 'dry-validation', '~> 0.10', '>= 0.10.7', '< 1.0.0' + s.add_dependency 'i18n', '~> 0.9.0' + + s.add_development_dependency 'rails', '< 5.0.0' + end s.add_development_dependency 'bundler', '~> 1.13', '>= 1.13.6' s.add_development_dependency 'rake', '~> 12.0', '>= 12.0.0' # Testing s.add_development_dependency 'appraisal', '~> 2.2', '>= 2.2.0' - s.add_development_dependency 'rails', '~> 5.2', '>= 5.2.2' s.add_development_dependency 'rspec', '~> 3.7', '>= 3.7.0' s.add_development_dependency 'rspec-rails', '~> 3.7', '>= 3.7.2' s.add_development_dependency 'test-unit', '~> 3.2', '>= 3.2.7' diff --git a/gemfiles/rails_3.gemfile b/gemfiles/rails_3.gemfile index 3758377c..1e85775e 100644 --- a/gemfiles/rails_3.gemfile +++ b/gemfiles/rails_3.gemfile @@ -2,6 +2,7 @@ source "https://rubygems.org" +gem "sqlite3", "< 1.4.0" gem "rails", "3.2.22.5" gemspec path: "../" diff --git a/gemfiles/rails_4.1.gemfile b/gemfiles/rails_4.1.gemfile index 48e3d1c3..a99f82dd 100644 --- a/gemfiles/rails_4.1.gemfile +++ b/gemfiles/rails_4.1.gemfile @@ -2,6 +2,7 @@ source "https://rubygems.org" +gem "sqlite3", "< 1.4.0" gem "rails", "4.1.16" gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw] diff --git a/gemfiles/rails_4.2.gemfile b/gemfiles/rails_4.2.gemfile index dfcdeccb..db7ad302 100644 --- a/gemfiles/rails_4.2.gemfile +++ b/gemfiles/rails_4.2.gemfile @@ -2,6 +2,7 @@ source "https://rubygems.org" +gem "sqlite3", "< 1.4.0" gem "rails", "4.2.11" gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw] diff --git a/gemfiles/rails_4.gemfile b/gemfiles/rails_4.gemfile index 4a024493..d4793372 100644 --- a/gemfiles/rails_4.gemfile +++ b/gemfiles/rails_4.gemfile @@ -2,6 +2,7 @@ source "https://rubygems.org" +gem "sqlite3", "< 1.4.0" gem "rails", "4.0.13" gemspec path: "../" diff --git a/gemfiles/rails_5.1.gemfile b/gemfiles/rails_5.1.gemfile index f5740b4f..bf4a704b 100644 --- a/gemfiles/rails_5.1.gemfile +++ b/gemfiles/rails_5.1.gemfile @@ -2,6 +2,7 @@ source "https://rubygems.org" +gem "sqlite3", "< 1.4.0" gem "rails", "5.1.6.1" gemspec path: "../" diff --git a/gemfiles/rails_5.2.gemfile b/gemfiles/rails_5.2.gemfile index a3a5f0d8..9dfe2661 100644 --- a/gemfiles/rails_5.2.gemfile +++ b/gemfiles/rails_5.2.gemfile @@ -2,6 +2,7 @@ source "https://rubygems.org" +gem "sqlite3", "< 1.4.0" gem "rails", "5.2.2" gem "bootsnap" diff --git a/gemfiles/rails_5.gemfile b/gemfiles/rails_5.gemfile index c29b6da1..af85d82c 100644 --- a/gemfiles/rails_5.gemfile +++ b/gemfiles/rails_5.gemfile @@ -2,6 +2,7 @@ source "https://rubygems.org" +gem "sqlite3", "< 1.4.0" gem "rails", "5.0.7.1" gemspec path: "../" diff --git a/gemfiles/sinatra.gemfile b/gemfiles/sinatra.gemfile index 053f96d6..3a1f81dc 100644 --- a/gemfiles/sinatra.gemfile +++ b/gemfiles/sinatra.gemfile @@ -2,6 +2,7 @@ source "https://rubygems.org" +gem "sqlite3", "< 1.4.0" gem "sinatra", "2.0.5" gemspec path: "../" diff --git a/lib/config/version.rb b/lib/config/version.rb index 40750c21..5b5d5e29 100644 --- a/lib/config/version.rb +++ b/lib/config/version.rb @@ -1,3 +1,3 @@ module Config - VERSION = '1.7.1' + VERSION = '1.7.1'.freeze end