ruby_engine 1.0.1 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 96d3e701701acef01556aa72f9f1e24c1249fdb0
4
- data.tar.gz: 64f4c6891650b9db9e6ce4a0d99db2ab539dc6e8
2
+ SHA256:
3
+ metadata.gz: c071a280ffec0facc0eba954ef31b519111171095211b8eb4d0404e6a3296492
4
+ data.tar.gz: ecb2350296bca0c9a35c4e4d74b20b32d71a3ef0207e0832962815b9eba9044f
5
5
  SHA512:
6
- metadata.gz: ef0a610a14b8f07baeddf925e0f2cd9abc264cdf806892d8997927eec21eb3c7aa85d66837729409ab8d6073e2e4a079e4d0ba824ff7404fb2b000b92c7e5209
7
- data.tar.gz: d5b555250f5cd73419077236fb40768f97f040b2e01c8ed15a89137ab74ec2c683c63d0e20b4d987441c9a30c91f3c8f88e64f642a7d5049d235ba7ee83c8a11
6
+ metadata.gz: 83ea549f651daed25208467925efe46dc04f6f2c94dbb37ccd1617cf6e02e8e99e3629919b1981e49155799f1464c3d29a2a305981b5caa2840e517787173ab9
7
+ data.tar.gz: 3f51194fa32c739b912214b838ebce10ea317b4361bfb445643db222aaad371e2024fb77e5646aa00c4576e4cf232d84d2c8bb0eff866594adb63ded41ab1de3
data/ChangeLog.md ADDED
@@ -0,0 +1,27 @@
1
+ # Change Log
2
+
3
+ ## 2.0.1 / 2024-04-02
4
+
5
+ * Add MFA to gemspec
6
+ * Update CI
7
+
8
+ ## 2.0.0 / 2020-01-04
9
+
10
+ * Refactor / update for current Rubies
11
+ * Remove cardinal
12
+ * Remove ree
13
+ * Remove ironruby
14
+ * Add truffelruby
15
+ * Add `cruby?` alias to MRI
16
+
17
+ ## 1.0.1 / 2014-01-15
18
+
19
+ * Fix RubyEngine.mri?
20
+ * Fix VERSION constant
21
+
22
+ ## 1.0.0 / 2014-01-14
23
+
24
+ * Return "ruby" for MRI (instead of "mri")
25
+ * Return "unknown" if RUBY_ENGINE is not set (instead of "mri")
26
+ * Moved from zucker 13.1 gem into its own gem
27
+
data/Gemfile CHANGED
@@ -1,8 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gemspec
3
+ # 3.2 workaround for RSpec 2.99, see https://bugs.ruby-lang.org/issues/17391
4
+ def File.exists?(f)exist?(f)end unless defined? File.exists?
4
5
 
5
- platform :rbx do
6
- gem 'rubysl-date'
7
- gem 'rubysl-singleton'
8
- end
6
+ gemspec
data/Gemfile.lock CHANGED
@@ -1,39 +1,39 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby_engine (1.0.1)
4
+ ruby_engine (2.0.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- diff-lcs (1.2.5)
10
- json (1.8.1)
11
- json (1.8.1-java)
12
- rake (10.1.1)
13
- rdoc (3.12.2)
14
- json (~> 1.4)
15
- rspec (2.14.1)
16
- rspec-core (~> 2.14.0)
17
- rspec-expectations (~> 2.14.0)
18
- rspec-mocks (~> 2.14.0)
19
- rspec-core (2.14.7)
20
- rspec-expectations (2.14.4)
9
+ diff-lcs (1.4.4)
10
+ io-console (0.5.9)
11
+ io-console (0.5.9-java)
12
+ irb (1.3.7)
13
+ reline (>= 0.2.7)
14
+ rake (13.0.6)
15
+ reline (0.2.7)
16
+ io-console (~> 0.5)
17
+ rspec (2.99.0)
18
+ rspec-core (~> 2.99.0)
19
+ rspec-expectations (~> 2.99.0)
20
+ rspec-mocks (~> 2.99.0)
21
+ rspec-core (2.99.2)
22
+ rspec-expectations (2.99.2)
21
23
  diff-lcs (>= 1.1.3, < 2.0)
22
- rspec-mocks (2.14.4)
23
- rubygems-tasks (0.2.4)
24
- rubysl-date (2.0.6)
25
- rubysl-singleton (2.0.0)
24
+ rspec-mocks (2.99.4)
25
+ rubygems-tasks (0.2.5)
26
+ irb (~> 1.0)
26
27
 
27
28
  PLATFORMS
28
29
  java
29
30
  ruby
30
31
 
31
32
  DEPENDENCIES
32
- bundler (~> 1.0)
33
- rake (~> 10.0)
34
- rdoc (~> 3.0)
35
- rspec (~> 2.4)
33
+ rake (~> 13.0)
34
+ rspec (~> 2.99)
36
35
  ruby_engine!
37
36
  rubygems-tasks (~> 0.2)
38
- rubysl-date
39
- rubysl-singleton
37
+
38
+ BUNDLED WITH
39
+ 2.2.22
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014 Jan Lelis
1
+ Copyright (c) 2014, 2020 Jan Lelis
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md ADDED
@@ -0,0 +1,38 @@
1
+ # RubyEngine [<img src="https://badge.fury.io/rb/ruby_engine.svg" alt="Gem Version" />](https://badge.fury.io/rb/ruby_engine) [<img src="https://github.com/janlelis/ruby_engine/workflows/Test/badge.svg" />](https://github.com/janlelis/ruby_engine/actions?query=workflow%3ATest)
2
+
3
+ Provides a `RubyEngine` constant for simple Ruby implementation checks.
4
+
5
+ ## Setup
6
+
7
+ On your command-line:
8
+
9
+ $ gem install ruby_engine
10
+
11
+ In Ruby:
12
+
13
+ require 'ruby_engine'
14
+
15
+ ## Usage
16
+
17
+ # Output the interpreter name
18
+ RubyEngine.to_s
19
+
20
+ # true for JRuby
21
+ RubyEngine.is? 'jruby'
22
+
23
+ # There are some query methods defined:
24
+ RubyEngine.cruby?
25
+ RubyEngine.jruby?
26
+ RubyEngine.truffle?
27
+
28
+ ## Also See
29
+
30
+ - https://github.com/janlelis/ruby_version
31
+ - https://github.com/janlelis/ruby_info
32
+ - https://github.com/rdp/os
33
+ - https://github.com/janlelis/irbtools
34
+
35
+ ## J-_-L
36
+
37
+ Copyright (c) 2010-2014, 2020 Jan Lelis. MIT License. Originated from the
38
+ zucker gem.
data/Rakefile CHANGED
@@ -23,14 +23,13 @@ require 'rake'
23
23
  require 'rubygems/tasks'
24
24
  Gem::Tasks.new
25
25
 
26
- require 'rdoc/task'
27
- RDoc::Task.new do |rdoc|
28
- rdoc.title = "ruby_version"
29
- end
30
- task :doc => :rdoc
26
+ # # #
27
+ # Spec
31
28
 
32
- require 'rspec/core/rake_task'
33
- RSpec::Core::RakeTask.new
29
+ desc "Run Specs"
30
+ task :spec do
31
+ sh "rspec"
32
+ end
34
33
 
35
34
  task :test => :spec
36
35
  task :default => :spec
data/lib/ruby_engine.rb CHANGED
@@ -1,22 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module RubyEngine
2
- VERSION = '1.0.1'
4
+ VERSION = '2.0.1'
3
5
 
4
- @interpreter = case
5
- when RUBY_PLATFORM == 'parrot'
6
- 'cardinal'
7
- when Object.const_defined?(:RUBY_ENGINE)
8
- if RUBY_ENGINE == 'ruby'
9
- if RUBY_DESCRIPTION =~ /Enterprise/
10
- 'ree'
11
- else
12
- 'ruby'
13
- end
14
- else
15
- RUBY_ENGINE.to_s # jruby, rbx, ironruby, macruby, etc.
16
- end
17
- else
18
- 'unknown'
19
- end
6
+ @interpreter = RUBY_ENGINE.to_s
20
7
 
21
8
  class << self
22
9
  def is?(what)
@@ -29,13 +16,12 @@ module RubyEngine
29
16
  end
30
17
  alias inspect to_s
31
18
 
32
- # ask methods
33
-
34
19
  def mri?
35
20
  RubyEngine.is? 'ruby'
36
21
  end
37
22
  alias official_ruby? mri?
38
23
  alias ruby? mri?
24
+ alias cruby? mri?
39
25
 
40
26
  def jruby?
41
27
  RubyEngine.is? 'jruby'
@@ -47,21 +33,10 @@ module RubyEngine
47
33
  end
48
34
  alias rbx? rubinius?
49
35
 
50
- def ree?
51
- RubyEngine.is? 'ree'
52
- end
53
- alias enterprise? ree?
54
-
55
- def ironruby?
56
- RubyEngine.is? 'ironruby'
57
- end
58
- alias iron_ruby? ironruby?
59
-
60
- def cardinal?
61
- RubyEngine.is? 'cardinal'
36
+ def truffleruby?
37
+ RubyEngine.is? 'truffleruby'
62
38
  end
63
- alias parrot? cardinal?
64
- alias perl? cardinal?
39
+ alias truffle? truffleruby?
65
40
  end
66
41
  end
67
42
 
data/ruby_engine.gemspec CHANGED
@@ -9,17 +9,16 @@ Gem::Specification.new do |gem|
9
9
  gem.description = 'Gives you an RubyEngine class that simplifies checking for your Ruby implementation.'
10
10
  gem.license = "MIT"
11
11
  gem.authors = ["Jan Lelis"]
12
- gem.email = "mail@janlelis.de"
12
+ gem.email = ["hi@ruby.consulting"]
13
13
  gem.homepage = "https://github.com/janlelis/ruby_engine"
14
14
 
15
- gem.files = Dir['{**/}{.*,*}'].select { |path| File.file?(path) }
15
+ gem.files = Dir["{**/}{.*,*}"].select{ |path| File.file?(path) && path !~ /^pkg/ }
16
16
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
17
17
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
18
18
  gem.require_paths = ['lib']
19
+ gem.metadata = { "rubygems_mfa_required" => "true" }
19
20
 
20
- gem.add_development_dependency 'bundler', '~> 1.0'
21
- gem.add_development_dependency 'rake', '~> 10.0'
22
- gem.add_development_dependency 'rdoc', '~> 3.0'
23
- gem.add_development_dependency 'rspec', '~> 2.4'
21
+ gem.add_development_dependency 'rake', '~> 13.0'
22
+ gem.add_development_dependency 'rspec', '~> 2.99'
24
23
  gem.add_development_dependency 'rubygems-tasks', '~> 0.2'
25
24
  end
metadata CHANGED
@@ -1,71 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_engine
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Lelis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-15 00:00:00.000000000 Z
11
+ date: 2024-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.0'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: rake
29
15
  requirement: !ruby/object:Gem::Requirement
30
16
  requirements:
31
17
  - - "~>"
32
18
  - !ruby/object:Gem::Version
33
- version: '10.0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '10.0'
41
- - !ruby/object:Gem::Dependency
42
- name: rdoc
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '3.0'
19
+ version: '13.0'
48
20
  type: :development
49
21
  prerelease: false
50
22
  version_requirements: !ruby/object:Gem::Requirement
51
23
  requirements:
52
24
  - - "~>"
53
25
  - !ruby/object:Gem::Version
54
- version: '3.0'
26
+ version: '13.0'
55
27
  - !ruby/object:Gem::Dependency
56
28
  name: rspec
57
29
  requirement: !ruby/object:Gem::Requirement
58
30
  requirements:
59
31
  - - "~>"
60
32
  - !ruby/object:Gem::Version
61
- version: '2.4'
33
+ version: '2.99'
62
34
  type: :development
63
35
  prerelease: false
64
36
  version_requirements: !ruby/object:Gem::Requirement
65
37
  requirements:
66
38
  - - "~>"
67
39
  - !ruby/object:Gem::Version
68
- version: '2.4'
40
+ version: '2.99'
69
41
  - !ruby/object:Gem::Dependency
70
42
  name: rubygems-tasks
71
43
  requirement: !ruby/object:Gem::Requirement
@@ -82,29 +54,29 @@ dependencies:
82
54
  version: '0.2'
83
55
  description: Gives you an RubyEngine class that simplifies checking for your Ruby
84
56
  implementation.
85
- email: mail@janlelis.de
57
+ email:
58
+ - hi@ruby.consulting
86
59
  executables: []
87
60
  extensions: []
88
61
  extra_rdoc_files: []
89
62
  files:
90
63
  - ".gitignore"
91
64
  - ".rspec"
92
- - ".travis.yml"
93
- - ChangeLog.rdoc
65
+ - ChangeLog.md
94
66
  - Gemfile
95
67
  - Gemfile.lock
96
- - LICENSE.txt
97
- - README.rdoc
68
+ - MIT-LICENSE.txt
69
+ - README.md
98
70
  - Rakefile
99
71
  - lib/ruby_engine.rb
100
- - pkg/ruby_engine-1.0.0.gem
101
72
  - ruby_engine.gemspec
102
73
  - spec/ruby_engine_spec.rb
103
74
  - spec/spec_helper.rb
104
75
  homepage: https://github.com/janlelis/ruby_engine
105
76
  licenses:
106
77
  - MIT
107
- metadata: {}
78
+ metadata:
79
+ rubygems_mfa_required: 'true'
108
80
  post_install_message:
109
81
  rdoc_options: []
110
82
  require_paths:
@@ -120,8 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
92
  - !ruby/object:Gem::Version
121
93
  version: '0'
122
94
  requirements: []
123
- rubyforge_project:
124
- rubygems_version: 2.2.0
95
+ rubygems_version: 3.5.3
125
96
  signing_key:
126
97
  specification_version: 4
127
98
  summary: Adds the RubyEngine pseudo-constant.
data/.travis.yml DELETED
@@ -1,14 +0,0 @@
1
- language: ruby
2
-
3
- rvm:
4
- - ruby-head
5
- - 2.1.0
6
- - 2.0.0
7
- - 1.9.3
8
- - 1.9.2
9
- - 1.8.7
10
- - ree
11
- - jruby
12
- - jruby-19mode
13
- - jruby-18mode
14
- - rbx
data/ChangeLog.rdoc DELETED
@@ -1,12 +0,0 @@
1
- === 1.0.1 / 2014-01-15
2
-
3
- * Fix RubyEngine.mri?
4
- * Fix VERSION constant
5
-
6
-
7
- === 1.0.0 / 2014-01-14
8
-
9
- * Return "ruby" for MRI (instead of "mri")
10
- * Return "unknown" if RUBY_ENGINE is not set (instead of "mri")
11
- * Moved from zucker 13.1 gem into its own gem
12
-
data/README.rdoc DELETED
@@ -1,40 +0,0 @@
1
- = RubyEngine {<img src="https://travis-ci.org/janlelis/ruby_engine.png" />}[https://travis-ci.org/janlelis/ruby_engine]
2
-
3
- Provides a +RubyEngine+ to simplify checking on which implementation your Ruby programs is running.
4
-
5
- == Setup
6
-
7
- On your command-line:
8
-
9
- $ gem install ruby_engine
10
-
11
- In Ruby:
12
-
13
- require 'ruby_engine'
14
-
15
- == Usage
16
-
17
- # Output the interpreter name
18
- RubyEngine.to_s
19
-
20
- # true for JRuby
21
- RubyEngine.is? 'jruby'
22
-
23
- # There are some query methods defined:
24
- RubyEngine.mri?
25
- RubyEngine.jruby?
26
- RubyEngine.rubinius?
27
- RubyEngine.ree?
28
- RubyEngine.ironruby?
29
- RubyEngine.macruby?
30
- RubyEngine.cardinal?
31
-
32
- == Also See
33
-
34
- https://github.com/janlelis/ruby_version |
35
- https://github.com/janlelis/ruby_info |
36
- https://github.com/rdp/os
37
-
38
- == J-_-L
39
-
40
- Copyright (c) 2010-2014 Jan Lelis. MIT License. Originated from the zucker gem.
Binary file