ruby-engine-1.0.1/ 0000755 0001750 0001750 00000000000 12665576115 011521 5 ustar ch ch ruby-engine-1.0.1/metadata.yml 0000644 0001750 0001750 00000006022 12665576115 014024 0 ustar ch ch --- !ruby/object:Gem::Specification
name: ruby_engine
version: !ruby/object:Gem::Version
version: 1.0.1
platform: ruby
authors:
- Jan Lelis
autorequire:
bindir: bin
cert_chain: []
date: 2014-01-15 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: bundler
requirement: !ruby/object:Gem::Requirement
requirements:
- - "~>"
- !ruby/object:Gem::Version
version: '1.0'
type: :development
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - "~>"
- !ruby/object:Gem::Version
version: '1.0'
- !ruby/object:Gem::Dependency
name: rake
requirement: !ruby/object:Gem::Requirement
requirements:
- - "~>"
- !ruby/object:Gem::Version
version: '10.0'
type: :development
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - "~>"
- !ruby/object:Gem::Version
version: '10.0'
- !ruby/object:Gem::Dependency
name: rdoc
requirement: !ruby/object:Gem::Requirement
requirements:
- - "~>"
- !ruby/object:Gem::Version
version: '3.0'
type: :development
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - "~>"
- !ruby/object:Gem::Version
version: '3.0'
- !ruby/object:Gem::Dependency
name: rspec
requirement: !ruby/object:Gem::Requirement
requirements:
- - "~>"
- !ruby/object:Gem::Version
version: '2.4'
type: :development
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - "~>"
- !ruby/object:Gem::Version
version: '2.4'
- !ruby/object:Gem::Dependency
name: rubygems-tasks
requirement: !ruby/object:Gem::Requirement
requirements:
- - "~>"
- !ruby/object:Gem::Version
version: '0.2'
type: :development
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - "~>"
- !ruby/object:Gem::Version
version: '0.2'
description: Gives you an RubyEngine class that simplifies checking for your Ruby
implementation.
email: mail@janlelis.de
executables: []
extensions: []
extra_rdoc_files: []
files:
- ".gitignore"
- ".rspec"
- ".travis.yml"
- ChangeLog.rdoc
- Gemfile
- Gemfile.lock
- LICENSE.txt
- README.rdoc
- Rakefile
- lib/ruby_engine.rb
- pkg/ruby_engine-1.0.0.gem
- ruby_engine.gemspec
- spec/ruby_engine_spec.rb
- spec/spec_helper.rb
homepage: https://github.com/janlelis/ruby_engine
licenses:
- MIT
metadata: {}
post_install_message:
rdoc_options: []
require_paths:
- lib
required_ruby_version: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
version: '0'
required_rubygems_version: !ruby/object:Gem::Requirement
requirements:
- - ">="
- !ruby/object:Gem::Version
version: '0'
requirements: []
rubyforge_project:
rubygems_version: 2.2.0
signing_key:
specification_version: 4
summary: Adds the RubyEngine pseudo-constant.
test_files:
- spec/ruby_engine_spec.rb
- spec/spec_helper.rb
ruby-engine-1.0.1/.gitignore 0000644 0001750 0001750 00000000021 12665576115 013502 0 ustar ch ch Gemfile.lock
pkg
ruby-engine-1.0.1/.travis.yml 0000644 0001750 0001750 00000000173 12665576115 013633 0 ustar ch ch language: ruby
rvm:
- ruby-head
- 2.1.0
- 2.0.0
- 1.9.3
- 1.9.2
- 1.8.7
- ree
- jruby
- jruby-19mode
- jruby-18mode
- rbx
ruby-engine-1.0.1/Gemfile.lock 0000644 0001750 0001750 00000001277 12665576115 013752 0 ustar ch ch PATH
remote: .
specs:
ruby_engine (1.0.1)
GEM
remote: https://rubygems.org/
specs:
diff-lcs (1.2.5)
json (1.8.1)
json (1.8.1-java)
rake (10.1.1)
rdoc (3.12.2)
json (~> 1.4)
rspec (2.14.1)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
rspec-core (2.14.7)
rspec-expectations (2.14.4)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.4)
rubygems-tasks (0.2.4)
rubysl-date (2.0.6)
rubysl-singleton (2.0.0)
PLATFORMS
java
ruby
DEPENDENCIES
bundler (~> 1.0)
rake (~> 10.0)
rdoc (~> 3.0)
rspec (~> 2.4)
ruby_engine!
rubygems-tasks (~> 0.2)
rubysl-date
rubysl-singleton
ruby-engine-1.0.1/ChangeLog.rdoc 0000644 0001750 0001750 00000000371 12665576115 014222 0 ustar ch ch === 1.0.1 / 2014-01-15
* Fix RubyEngine.mri?
* Fix VERSION constant
=== 1.0.0 / 2014-01-14
* Return "ruby" for MRI (instead of "mri")
* Return "unknown" if RUBY_ENGINE is not set (instead of "mri")
* Moved from zucker 13.1 gem into its own gem
ruby-engine-1.0.1/LICENSE.txt 0000644 0001750 0001750 00000002035 12665576115 013344 0 ustar ch ch Copyright (c) 2014 Jan Lelis
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
ruby-engine-1.0.1/ruby_engine.gemspec 0000644 0001750 0001750 00000002034 12665576115 015373 0 ustar ch ch # -*- encoding: utf-8 -*-
require File.expand_path('../lib/ruby_engine', __FILE__)
Gem::Specification.new do |gem|
gem.name = "ruby_engine"
gem.version = RubyEngine::VERSION
gem.summary = 'Adds the RubyEngine pseudo-constant.'
gem.description = 'Gives you an RubyEngine class that simplifies checking for your Ruby implementation.'
gem.license = "MIT"
gem.authors = ["Jan Lelis"]
gem.email = "mail@janlelis.de"
gem.homepage = "https://github.com/janlelis/ruby_engine"
gem.files = Dir['{**/}{.*,*}'].select { |path| File.file?(path) }
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
gem.require_paths = ['lib']
gem.add_development_dependency 'bundler', '~> 1.0'
gem.add_development_dependency 'rake', '~> 10.0'
gem.add_development_dependency 'rdoc', '~> 3.0'
gem.add_development_dependency 'rspec', '~> 2.4'
gem.add_development_dependency 'rubygems-tasks', '~> 0.2'
end
ruby-engine-1.0.1/.rspec 0000644 0001750 0001750 00000000040 12665576115 012630 0 ustar ch ch --colour --format documentation
ruby-engine-1.0.1/README.rdoc 0000644 0001750 0001750 00000001530 12665576115 013326 0 ustar ch ch = RubyEngine {
}[https://travis-ci.org/janlelis/ruby_engine]
Provides a +RubyEngine+ to simplify checking on which implementation your Ruby programs is running.
== Setup
On your command-line:
$ gem install ruby_engine
In Ruby:
require 'ruby_engine'
== Usage
# Output the interpreter name
RubyEngine.to_s
# true for JRuby
RubyEngine.is? 'jruby'
# There are some query methods defined:
RubyEngine.mri?
RubyEngine.jruby?
RubyEngine.rubinius?
RubyEngine.ree?
RubyEngine.ironruby?
RubyEngine.macruby?
RubyEngine.cardinal?
== Also See
https://github.com/janlelis/ruby_version |
https://github.com/janlelis/ruby_info |
https://github.com/rdp/os
== J-_-L
Copyright (c) 2010-2014 Jan Lelis. MIT License. Originated from the zucker gem.
ruby-engine-1.0.1/lib/ 0000755 0001750 0001750 00000000000 12665576115 012267 5 ustar ch ch ruby-engine-1.0.1/lib/ruby_engine.rb 0000644 0001750 0001750 00000002162 12665576115 015123 0 ustar ch ch module RubyEngine
VERSION = '1.0.1'
@interpreter = case
when RUBY_PLATFORM == 'parrot'
'cardinal'
when Object.const_defined?(:RUBY_ENGINE)
if RUBY_ENGINE == 'ruby'
if RUBY_DESCRIPTION =~ /Enterprise/
'ree'
else
'ruby'
end
else
RUBY_ENGINE.to_s # jruby, rbx, ironruby, macruby, etc.
end
else
'unknown'
end
class << self
def is?(what)
what === @interpreter
end
alias is is?
def to_s
@interpreter.to_s
end
alias inspect to_s
# ask methods
def mri?
RubyEngine.is? 'ruby'
end
alias official_ruby? mri?
alias ruby? mri?
def jruby?
RubyEngine.is? 'jruby'
end
alias java? jruby?
def rubinius?
RubyEngine.is? 'rbx'
end
alias rbx? rubinius?
def ree?
RubyEngine.is? 'ree'
end
alias enterprise? ree?
def ironruby?
RubyEngine.is? 'ironruby'
end
alias iron_ruby? ironruby?
def cardinal?
RubyEngine.is? 'cardinal'
end
alias parrot? cardinal?
alias perl? cardinal?
end
end
# J-_-L
ruby-engine-1.0.1/Gemfile 0000644 0001750 0001750 00000000152 12665576115 013012 0 ustar ch ch source 'https://rubygems.org'
gemspec
platform :rbx do
gem 'rubysl-date'
gem 'rubysl-singleton'
end
ruby-engine-1.0.1/pkg/ 0000755 0001750 0001750 00000000000 12665576115 012302 5 ustar ch ch ruby-engine-1.0.1/pkg/ruby_engine-1.0.0.gem 0000644 0001750 0001750 00000017000 12665576115 015732 0 ustar ch ch metadata.gz 0000444 0000000 0000000 00000001333 12265340463 013443 0 ustar 00wheel wheel 0000000 0000000 3RVMo0Wh8iNVhCC:a0dȒ'Aa|.Eў8-Q$LL~] nɲK4h@FRÕot4b)KI|mHB?sMAI¯NZܐRfDD?~{Iфi,\;)]Fho6+ܟt|_:l[${aYl
PW-BJX2zւҜ+;'F-_9Nϒ=,Fs$=;Z1[IF
xll|~lG%8aeV.ѕ(zNQ_sOlZ BbF6FA%b#p2V<PكSrӏ0HX%4vaҧdWuubPd$8؍2b)gtc4´R=~q_;k3