File: on_what.rb

package info (click to toggle)
ruby-docile 1.1.5-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, trixie
  • size: 156 kB
  • sloc: ruby: 374; makefile: 2
file content (14 lines) | stat: -rw-r--r-- 316 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# 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