diff --git a/.gitignore b/.gitignore index d87d4be..6372741 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ spec/reports test/tmp test/version_tmp tmp +*.gemfile.lock diff --git a/.travis.yml b/.travis.yml index 6beb99a..ab82c3a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,25 @@ language: ruby +sudo: false + +cache: + bundler: true + rvm: - 2.2 - 2.3 - 2.4 - jruby-19mode # JRuby in 1.9 mode -# uncomment this line if your project needs to run something other than `rake`: -script: bundle exec rspec spec + +script: bundle exec rake + gemfile: - - Gemfile.activesupport51 + - gemfiles/activesupport_5.1.gemfile + - gemfiles/activesupport_5.2.gemfile + +matrix: + fast_finish: true + allow_failures: + - rvm: jruby-19mode before_install: - - gem install bundler \ No newline at end of file + - gem update --system diff --git a/Appraisals b/Appraisals new file mode 100644 index 0000000..94dbf56 --- /dev/null +++ b/Appraisals @@ -0,0 +1,7 @@ +appraise "activesupport-5.1" do + gem "activesupport", "~> 5.1.0" +end + +appraise "activesupport-5.2" do + gem "activesupport", "~> 5.2.0" +end diff --git a/Gemfile.activesupport51 b/Gemfile.activesupport51 deleted file mode 100644 index 65b4cf0..0000000 --- a/Gemfile.activesupport51 +++ /dev/null @@ -1,4 +0,0 @@ -source "https://rubygems.org" -gemspec - -gem 'activesupport', '~> 5.1' \ No newline at end of file diff --git a/Rakefile b/Rakefile index 16069ae..e621d06 100644 --- a/Rakefile +++ b/Rakefile @@ -4,4 +4,7 @@ require "bundler/gem_tasks" require 'rspec/core/rake_task' task :default => :spec -RSpec::Core::RakeTask.new('spec') \ No newline at end of file +if !ENV["APPRAISAL_INITIALIZED"] && !ENV["TRAVIS"] + task :default => :appraisal +end +RSpec::Core::RakeTask.new('spec') diff --git a/gemfiles/activesupport_5.1.gemfile b/gemfiles/activesupport_5.1.gemfile new file mode 100644 index 0000000..a218404 --- /dev/null +++ b/gemfiles/activesupport_5.1.gemfile @@ -0,0 +1,7 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "activesupport", "~> 5.1.0" + +gemspec path: "../" diff --git a/gemfiles/activesupport_5.1.gemfile.lock b/gemfiles/activesupport_5.1.gemfile.lock new file mode 100644 index 0000000..a2cbc8b --- /dev/null +++ b/gemfiles/activesupport_5.1.gemfile.lock @@ -0,0 +1,54 @@ +PATH + remote: .. + specs: + time_difference (0.7.0) + activesupport + +GEM + remote: https://rubygems.org/ + specs: + activesupport (5.1.5) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (~> 0.7) + minitest (~> 5.1) + tzinfo (~> 1.1) + appraisal (2.2.0) + bundler + rake + thor (>= 0.14.0) + concurrent-ruby (1.0.5) + diff-lcs (1.3) + i18n (0.9.5) + concurrent-ruby (~> 1.0) + minitest (5.11.3) + rake (12.3.1) + rspec (3.7.0) + rspec-core (~> 3.7.0) + rspec-expectations (~> 3.7.0) + rspec-mocks (~> 3.7.0) + rspec-core (3.7.1) + rspec-support (~> 3.7.0) + rspec-expectations (3.7.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.7.0) + rspec-mocks (3.7.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.7.0) + rspec-support (3.7.1) + thor (0.20.0) + thread_safe (0.3.6) + tzinfo (1.2.5) + thread_safe (~> 0.1) + +PLATFORMS + ruby + +DEPENDENCIES + activesupport (~> 5.1.0) + appraisal + rake + rspec (~> 3.7.0) + time_difference! + +BUNDLED WITH + 1.16.1 diff --git a/gemfiles/activesupport_5.2.gemfile b/gemfiles/activesupport_5.2.gemfile new file mode 100644 index 0000000..61c3cca --- /dev/null +++ b/gemfiles/activesupport_5.2.gemfile @@ -0,0 +1,7 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "activesupport", "~> 5.2.0" + +gemspec path: "../" diff --git a/gemfiles/activesupport_5.2.gemfile.lock b/gemfiles/activesupport_5.2.gemfile.lock new file mode 100644 index 0000000..a1b3a6d --- /dev/null +++ b/gemfiles/activesupport_5.2.gemfile.lock @@ -0,0 +1,54 @@ +PATH + remote: .. + specs: + time_difference (0.7.0) + activesupport + +GEM + remote: https://rubygems.org/ + specs: + activesupport (5.2.0) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) + minitest (~> 5.1) + tzinfo (~> 1.1) + appraisal (2.2.0) + bundler + rake + thor (>= 0.14.0) + concurrent-ruby (1.0.5) + diff-lcs (1.3) + i18n (1.0.1) + concurrent-ruby (~> 1.0) + minitest (5.11.3) + rake (12.3.1) + rspec (3.7.0) + rspec-core (~> 3.7.0) + rspec-expectations (~> 3.7.0) + rspec-mocks (~> 3.7.0) + rspec-core (3.7.1) + rspec-support (~> 3.7.0) + rspec-expectations (3.7.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.7.0) + rspec-mocks (3.7.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.7.0) + rspec-support (3.7.1) + thor (0.20.0) + thread_safe (0.3.6) + tzinfo (1.2.5) + thread_safe (~> 0.1) + +PLATFORMS + ruby + +DEPENDENCIES + activesupport (~> 5.2.0) + appraisal + rake + rspec (~> 3.7.0) + time_difference! + +BUNDLED WITH + 1.16.1 diff --git a/time_difference.gemspec b/time_difference.gemspec index 5ece9c4..8b4a0b2 100644 --- a/time_difference.gemspec +++ b/time_difference.gemspec @@ -14,8 +14,9 @@ Gem::Specification.new do |gem| gem.version = "0.7.0" gem.license = 'MIT' - gem.add_runtime_dependency('activesupport', '~> 5.1') + gem.add_runtime_dependency('activesupport') + + gem.add_development_dependency('appraisal') gem.add_development_dependency('rspec', '~> 3.7.0') gem.add_development_dependency('rake') - end