mirror of
https://github.com/ms-ati/docile
synced 2023-03-27 23:21:52 -04:00
fd38f46903
As a first step to updating dependencies while maintaining compatibility, extract common simple platform detection helpers.
14 lines
No EOL
316 B
Ruby
14 lines
No EOL
316 B
Ruby
# 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?
|
|
(defined?(RUBY_ENGINE) && 'jruby' == RUBY_ENGINE)
|
|
end
|
|
|
|
def on_1_8?
|
|
RUBY_VERSION.start_with? '1.8'
|
|
end |