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:
parent
d6cae505ee
commit
a6253f63e5
5 changed files with 26 additions and 51 deletions
|
@ -2,7 +2,7 @@ language: ruby
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- main
|
||||||
|
|
||||||
rvm:
|
rvm:
|
||||||
# MRI
|
# MRI
|
||||||
|
|
2
Gemfile
2
Gemfile
|
@ -2,7 +2,7 @@ require File.expand_path("on_what", File.dirname(__FILE__))
|
||||||
source "https://rubygems.org"
|
source "https://rubygems.org"
|
||||||
|
|
||||||
# Travis-only dependencies go here
|
# 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
|
group :test do
|
||||||
gem "codecov", ">= 0.0.9", :require => false
|
gem "codecov", ">= 0.0.9", :require => false
|
||||||
end
|
end
|
||||||
|
|
|
@ -25,27 +25,16 @@ Gem::Specification.new do |s|
|
||||||
s.require_paths = ["lib"]
|
s.require_paths = ["lib"]
|
||||||
|
|
||||||
# Specify oldest supported Ruby version
|
# 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
|
# 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" # See http://stackoverflow.com/questions/35893584/nomethoderror-undefined-method-last-comment-after-upgrading-to-rake-11
|
||||||
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"
|
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
|
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
|
# To limit needed compatibility with versions of dependencies, only configure
|
||||||
# yard doc generation when *not* on Travis, JRuby, Rubinius, or < 2.0
|
# yard doc generation when *not* on Travis, JRuby, or < 2.3
|
||||||
if !on_travis? && !on_jruby? && !on_rubinius? && !on_less_than_2_0?
|
if !on_travis? && !on_jruby? && !on_less_than_2_3?
|
||||||
# Github flavored markdown in YARD documentation
|
# Github flavored markdown in YARD documentation
|
||||||
# http://blog.nikosd.com/2011/11/github-flavored-markdown-in-yard.html
|
# http://blog.nikosd.com/2011/11/github-flavored-markdown-in-yard.html
|
||||||
s.add_development_dependency "yard"
|
s.add_development_dependency "yard"
|
||||||
|
|
12
on_what.rb
12
on_what.rb
|
@ -9,18 +9,6 @@ def on_jruby?
|
||||||
defined?(RUBY_ENGINE) && "jruby" == RUBY_ENGINE
|
defined?(RUBY_ENGINE) && "jruby" == RUBY_ENGINE
|
||||||
end
|
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?
|
def on_less_than_2_0?
|
||||||
RUBY_VERSION < "2.0.0"
|
RUBY_VERSION < "2.0.0"
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,31 +1,29 @@
|
||||||
require File.expand_path("on_what", File.dirname(File.dirname(__FILE__)))
|
require File.expand_path("on_what", File.dirname(File.dirname(__FILE__)))
|
||||||
|
|
||||||
# Code coverage (via SimpleCov) on Ruby 1.9+
|
# Code coverage (via SimpleCov)
|
||||||
unless on_1_8?
|
begin
|
||||||
begin
|
require "simplecov"
|
||||||
require "simplecov"
|
SimpleCov.start do
|
||||||
SimpleCov.start do
|
add_filter "/spec/" # exclude test code
|
||||||
add_filter "/spec/" # exclude test code
|
add_filter "/vendor/" # exclude gems which are vendored on Travis CI
|
||||||
add_filter "/vendor/" # exclude gems which are vendored on Travis CI
|
add_filter "/on_what.rb" # exclude help used only in gemspec
|
||||||
add_filter "/on_what.rb" # exclude help used only in gemspec
|
|
||||||
end
|
|
||||||
|
|
||||||
# On CI we publish simplecov results to codecov.io
|
|
||||||
if on_travis?
|
|
||||||
require "codecov"
|
|
||||||
SimpleCov.formatter = SimpleCov::Formatter::Codecov
|
|
||||||
end
|
|
||||||
|
|
||||||
# Due to circular dependency (simplecov depends on docile), remove docile and require again below
|
|
||||||
Object.send(:remove_const, :Docile)
|
|
||||||
$LOADED_FEATURES.reject! { |f| f =~ /\/docile\// }
|
|
||||||
rescue LoadError
|
|
||||||
warn "warning: simplecov or codecov gems not found; skipping coverage"
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# On CI we publish simplecov results to codecov.io
|
||||||
|
if on_travis?
|
||||||
|
require "codecov"
|
||||||
|
SimpleCov.formatter = SimpleCov::Formatter::Codecov
|
||||||
|
end
|
||||||
|
|
||||||
|
# Due to circular dependency (simplecov depends on docile), remove docile and require again below
|
||||||
|
Object.send(:remove_const, :Docile)
|
||||||
|
$LOADED_FEATURES.reject! { |f| f =~ /\/docile\// }
|
||||||
|
rescue LoadError
|
||||||
|
warn "warning: simplecov or codecov gems not found; skipping coverage"
|
||||||
end
|
end
|
||||||
|
|
||||||
lib_dir = File.join(File.dirname(File.dirname(__FILE__)), "lib")
|
lib_dir = File.join(File.dirname(File.dirname(__FILE__)), "lib")
|
||||||
$LOAD_PATH.unshift lib_dir unless $LOAD_PATH.include? lib_dir
|
$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"
|
require "docile"
|
||||||
|
|
Loading…
Reference in a new issue