From 06e1d93d894e2414cc868cf80a9b792380072150 Mon Sep 17 00:00:00 2001 From: Leif Gensert Date: Fri, 31 Mar 2017 14:57:41 +0200 Subject: [PATCH 1/2] reconcile dependencies make sure the gem still works on ruby 2.0 --- .travis.yml | 2 ++ Gemfile | 10 ++++++---- morfo.gemspec | 10 +++++----- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 366319d..3bf09bb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,13 @@ sudo: false language: ruby cache: bundler +bundler_args: --without development rvm: - 2.0.0 - 2.1.8 - 2.2.4 - 2.3.0 + - 2.4.0 - jruby-9.0.5.0 - ruby-head - jruby-head diff --git a/Gemfile b/Gemfile index c07214c..a68a905 100644 --- a/Gemfile +++ b/Gemfile @@ -4,16 +4,18 @@ source "https://rubygems.org" gemspec group :test, :development do + gem "rspec", ">= 2.14", "< 4.0" gem "coveralls", require: false + gem "simplecov" + gem "rubinius-coverage", platform: :rbx +end + +group :development do gem "guard" gem "guard-rspec" - gem "simplecov" gem "pry" - gem "rubinius-coverage", platform: :rbx gem "rb-inotify", require: false gem "rb-fsevent", require: false gem "rb-fchange", require: false end - -gem "json" diff --git a/morfo.gemspec b/morfo.gemspec index 3f1b46a..fa541ea 100644 --- a/morfo.gemspec +++ b/morfo.gemspec @@ -17,12 +17,12 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } spec.test_files = spec.files.grep(%r{^(test|spec|features|benchmarks)/}) spec.require_paths = ["lib"] + spec.required_ruby_version = '>= 2.0.0' - spec.add_dependency "rake" - spec.add_dependency "json" - spec.add_dependency "activesupport", "< 5.1" - spec.add_dependency "rubysl" if RUBY_ENGINE == "rbx" + spec.add_runtime_dependency "json" + spec.add_runtime_dependency "activesupport", "< 5.1" + spec.add_runtime_dependency "rubysl" if RUBY_ENGINE == "rbx" + spec.add_development_dependency "rake" spec.add_development_dependency "bundler", "~> 1.3" - spec.add_development_dependency "rspec", ">= 2.14", "< 4.0" end From 704b51a28354d72cfc39fd2b503d7d8d463adfc7 Mon Sep 17 00:00:00 2001 From: Leif Gensert Date: Fri, 31 Mar 2017 15:20:40 +0200 Subject: [PATCH 2/2] downgrade activesupport just to make the tests pass --- morfo.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/morfo.gemspec b/morfo.gemspec index fa541ea..67a6c2d 100644 --- a/morfo.gemspec +++ b/morfo.gemspec @@ -20,7 +20,7 @@ Gem::Specification.new do |spec| spec.required_ruby_version = '>= 2.0.0' spec.add_runtime_dependency "json" - spec.add_runtime_dependency "activesupport", "< 5.1" + spec.add_runtime_dependency "activesupport", "< 5.0" spec.add_runtime_dependency "rubysl" if RUBY_ENGINE == "rbx" spec.add_development_dependency "rake"