2014-06-15 13:24:15 -04:00
|
|
|
# NOTE: Very simple tests for what system we are on, extracted for sharing
|
|
|
|
# between Rakefile, gemspec, and spec_helper. Not for use in actual library.
|
|
|
|
|
|
|
|
def on_travis?
|
|
|
|
ENV['CI'] == 'true'
|
|
|
|
end
|
|
|
|
|
|
|
|
def on_jruby?
|
2014-06-16 08:01:41 -04:00
|
|
|
defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE
|
2014-06-15 13:24:15 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def on_1_8?
|
|
|
|
RUBY_VERSION.start_with? '1.8'
|
2014-06-16 08:01:41 -04:00
|
|
|
end
|
2016-05-18 10:58:27 -04:00
|
|
|
|
|
|
|
def on_less_than_1_9_3?
|
|
|
|
RUBY_VERSION < '1.9.3'
|
|
|
|
end
|
2016-12-27 15:18:44 -05:00
|
|
|
|
|
|
|
def on_less_than_2_0?
|
|
|
|
RUBY_VERSION < '2.0.0'
|
|
|
|
end
|