1
0
Fork 0
mirror of https://github.com/ms-ati/docile synced 2023-03-27 23:21:52 -04:00

Remove rbx (Rubinius) and 1.8.x pinned dependencies (#64)

* Remove rbx (Rubinius) and 1.8.x pinned dependencies

* Update travis.yml branch to main
This commit is contained in:
Marc Siegel 2021-02-09 11:25:38 -05:00 committed by GitHub
parent d6cae505ee
commit a6253f63e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 26 additions and 51 deletions

View file

@ -2,7 +2,7 @@ language: ruby
branches:
only:
- master
- main
rvm:
# MRI

View file

@ -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_less_than_2_3? && !on_rubinius?
if on_travis? && !on_less_than_2_3?
group :test do
gem "codecov", ">= 0.0.9", :require => false
end

View file

@ -25,27 +25,16 @@ Gem::Specification.new do |s|
s.require_paths = ["lib"]
# Specify oldest supported Ruby version
s.required_ruby_version = ">= 1.8.7"
s.required_ruby_version = ">= 1.9.3"
# 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 "rake", "< 11.0" # See http://stackoverflow.com/questions/35893584/nomethoderror-undefined-method-last-comment-after-upgrading-to-rake-11
s.add_development_dependency "rspec", "~> 3.0"
s.add_development_dependency "rspec-expectations", "!= 3.8.3" # Workaround for RSpec's issue, see: https://github.com/rspec/rspec-expectations/issues/1111
# 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?
end
# To limit needed compatibility with versions of dependencies, only configure
# yard doc generation when *not* on Travis, JRuby, Rubinius, or < 2.0
if !on_travis? && !on_jruby? && !on_rubinius? && !on_less_than_2_0?
# yard doc generation when *not* on Travis, JRuby, or < 2.3
if !on_travis? && !on_jruby? && !on_less_than_2_3?
# Github flavored markdown in YARD documentation
# http://blog.nikosd.com/2011/11/github-flavored-markdown-in-yard.html
s.add_development_dependency "yard"

View file

@ -9,18 +9,6 @@ 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
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

View file

@ -1,7 +1,6 @@
require File.expand_path("on_what", File.dirname(File.dirname(__FILE__)))
# Code coverage (via SimpleCov) on Ruby 1.9+
unless on_1_8?
# Code coverage (via SimpleCov)
begin
require "simplecov"
SimpleCov.start do
@ -22,10 +21,9 @@ unless on_1_8?
rescue LoadError
warn "warning: simplecov or codecov gems not found; skipping coverage"
end
end
lib_dir = File.join(File.dirname(File.dirname(__FILE__)), "lib")
$LOAD_PATH.unshift lib_dir unless $LOAD_PATH.include? lib_dir
# Require Docile again, now with coverage enabled on 1.9+
# Require Docile again, now with coverage enabled
require "docile"