diff --git a/Rakefile b/Rakefile index 5528825..a8ee188 100644 --- a/Rakefile +++ b/Rakefile @@ -13,8 +13,8 @@ RSpec::Core::RakeTask.new CLOBBER.include('pkg', 'doc', 'coverage') # To limit needed compatibility with versions of dependencies, only configure -# yard doc generation when *not* on Travis, JRuby, or 1.8 -if !on_travis? && !on_jruby? && !on_1_8? +# yard doc generation when *not* on Travis, JRuby, or < 2.0 +if !on_travis? && !on_jruby? && !on_less_than_2_0? require 'github/markup' require 'redcarpet' require 'yard' diff --git a/docile.gemspec b/docile.gemspec index dadeeea..76cc0f0 100644 --- a/docile.gemspec +++ b/docile.gemspec @@ -26,13 +26,16 @@ Gem::Specification.new do |s| 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' - # NOTE: needed for Travis builds on 1.8, but can't yet reproduce failure locally + # 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? # To limit needed compatibility with versions of dependencies, only configure - # yard doc generation when *not* on Travis, JRuby, or 1.8 - if !on_travis? && !on_jruby? && !on_1_8? + # yard doc generation when *not* on Travis, JRuby, or < 2.0 + if !on_travis? && !on_jruby? && !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 a4b5742..21acdf1 100644 --- a/on_what.rb +++ b/on_what.rb @@ -16,3 +16,7 @@ end def on_less_than_1_9_3? RUBY_VERSION < '1.9.3' end + +def on_less_than_2_0? + RUBY_VERSION < '2.0.0' +end