From e6a68fcb6be204403da62f206dcf8394211075d0 Mon Sep 17 00:00:00 2001 From: Marc Siegel Date: Fri, 12 Jan 2018 12:49:57 -0500 Subject: [PATCH] Update Travis Rubies again --- .travis.yml | 7 ++----- Gemfile | 2 +- docile.gemspec | 25 ++++++++++++++----------- on_what.rb | 4 ++++ 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index 98fd824..1033bc1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,18 +9,17 @@ dist: trusty rvm: # MRI - ruby-head + - 2.5 - 2.4 - 2.3 - 2.2 - 2.1 - - 2.0 - - 1.9.2 # allowed to fail until Travis binary for this is fixed - 1.9.3 - 1.8.7 - ree # JRuby - jruby-head - - jruby-9.1 # allowed to fail due to https://github.com/travis-ci/travis-ci/issues/9049 + - jruby-9.1.15.0 # Specific version to work around https://github.com/travis-ci/travis-ci/issues/9049 - jruby-9.0 - jruby-19mode - jruby-18mode @@ -30,8 +29,6 @@ rvm: matrix: allow_failures: - rvm: ruby-head - - rvm: 1.9.2 # See build error https://travis-ci.org/tcrayford/Values/jobs/202728857 - rvm: jruby-head - - rvm: jruby-9.1 # See build error https://travis-ci.org/ms-ati/docile/jobs/327830706 - rvm: rubinius-3 fast_finish: true diff --git a/Gemfile b/Gemfile index e288cfe..dc90dd0 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ require File.expand_path('on_what', File.dirname(__FILE__)) source 'https://rubygems.org' # Travis-only dependencies go here -if on_travis? && !on_1_8? +if on_travis? && !on_1_8? && !on_rubinius? group :test do gem 'codecov', '>= 0.0.9', :require => false end diff --git a/docile.gemspec b/docile.gemspec index 76cc0f0..dd37950 100644 --- a/docile.gemspec +++ b/docile.gemspec @@ -21,21 +21,24 @@ Gem::Specification.new do |s| # Specify oldest supported Ruby version s.required_ruby_version = '>= 1.8.7' - # Run rspec tests from rake - s.add_development_dependency 'rake', '~> 10.5.0' if on_less_than_1_9_3? # Pin compatible rake on old rubies, see: https://github.com/travis-ci/travis.rb/issues/380 - s.add_development_dependency 'rake', '< 11.0' unless on_less_than_1_9_3? # See http://stackoverflow.com/questions/35893584/nomethoderror-undefined-method-last-comment-after-upgrading-to-rake-11 - s.add_development_dependency 'rspec', '~> 3.0.0' + # Run rspec tests from rake even on old Ruby versions + s.add_development_dependency 'rake', '~> 10.5' if on_less_than_1_9_3? # Pin compatible rake on old rubies, see: https://github.com/travis-ci/travis.rb/issues/380 + s.add_development_dependency 'rake', '< 11.0' unless on_less_than_1_9_3? # See http://stackoverflow.com/questions/35893584/nomethoderror-undefined-method-last-comment-after-upgrading-to-rake-11 + s.add_development_dependency 'rspec', '~> 3.0' - # Pin versions for Travis builds on 1.9 - s.add_development_dependency 'json', '< 2.0' if on_less_than_2_0? + # Run code coverage where possible - not on Rubinius + unless on_rubinius? + # Pin versions for Travis builds on 1.9 + s.add_development_dependency 'json', '< 2.0' if on_less_than_2_0? - # Pin versions for Travis builds on 1.8 - s.add_development_dependency 'mime-types' , '~> 1.25.1' if on_1_8? - s.add_development_dependency 'rest-client', '~> 1.6.8' if on_1_8? + # Pin versions for Travis builds on 1.8 + s.add_development_dependency 'mime-types' , '~> 1.25.1' if on_1_8? + s.add_development_dependency 'rest-client', '~> 1.6.8' if on_1_8? + end # To limit needed compatibility with versions of dependencies, only configure - # yard doc generation when *not* on Travis, JRuby, or < 2.0 - if !on_travis? && !on_jruby? && !on_less_than_2_0? + # yard doc generation when *not* on Travis, JRuby, Rubinius, or < 2.0 + if !on_travis? && !on_jruby? && !on_rubinius? && !on_less_than_2_0? # Github flavored markdown in YARD documentation # http://blog.nikosd.com/2011/11/github-flavored-markdown-in-yard.html s.add_development_dependency 'yard' diff --git a/on_what.rb b/on_what.rb index 21acdf1..2c99569 100644 --- a/on_what.rb +++ b/on_what.rb @@ -9,6 +9,10 @@ def on_jruby? defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE end +def on_rubinius? + defined?(RUBY_ENGINE) && 'rbx' == RUBY_ENGINE +end + def on_1_8? RUBY_VERSION.start_with? '1.8' end