ruby_version 1.0.1 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/ChangeLog.md +19 -0
- data/Gemfile +6 -4
- data/Gemfile.lock +15 -23
- data/{README.rdoc → README.md} +10 -9
- data/Rakefile +30 -27
- data/lib/ruby_version.rb +3 -1
- data/ruby_version.gemspec +6 -8
- data/spec/ruby_version_spec.rb +1 -1
- metadata +17 -60
- data/.travis.yml +0 -14
- data/ChangeLog.rdoc +0 -7
- data/pkg/ruby_version-1.0.0.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 638ad3323f1fd645d94320298e3441e483a5e228a1c40de4d20e7f708e323637
|
4
|
+
data.tar.gz: 6938c2031090ff97524b6863f9b4a02ac52c588375e9da935d366bf4472594b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 110b3bde50d6ba3fc79fb625351569a9d4d8b8781690b62b8335b93a47efaec8b207a15b506dc896a6b82bd5a4bfdd1393e50fe249eb37f962feef2b8a1f043f
|
7
|
+
data.tar.gz: 959ba07ad1c3d7a6c728554156d7007f0802bacb2d7d1a92e61004bf8f060c07f59b781af9cd538892ed0c2e5bd1ba01dfc6198fe5ef5845a8e0ee63eeda8493
|
data/ChangeLog.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# Change Log
|
2
|
+
|
3
|
+
## 1.0.3 / 2023-04-07
|
4
|
+
|
5
|
+
* Remove old gem versions (`pkg` dir) from release
|
6
|
+
|
7
|
+
## 1.0.2 / 2020-01-04
|
8
|
+
|
9
|
+
* Freeze string literals
|
10
|
+
|
11
|
+
## 1.0.1 / 2014-01-15
|
12
|
+
|
13
|
+
* Fix VERSION constant
|
14
|
+
* Add RubyVersion.revision method
|
15
|
+
|
16
|
+
## 1.0.0 / 2014-01-14
|
17
|
+
|
18
|
+
* Moved from zucker 13.1 gem into its own gem
|
19
|
+
|
data/Gemfile
CHANGED
@@ -2,8 +2,10 @@ source 'https://rubygems.org'
|
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
end
|
5
|
+
### ### ###
|
6
|
+
|
7
|
+
# 3.2 workaround for RSpec 2.99, see https://bugs.ruby-lang.org/issues/17391
|
8
|
+
def File.exists?(f)exist?(f)end unless defined? File.exists?
|
9
|
+
|
10
|
+
### ### ###
|
9
11
|
|
data/Gemfile.lock
CHANGED
@@ -1,37 +1,29 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
ruby_version (1.0.
|
4
|
+
ruby_version (1.0.3)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
diff-lcs (1.
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
rspec-mocks (~> 2.14.0)
|
18
|
-
rspec-core (2.14.7)
|
19
|
-
rspec-expectations (2.14.4)
|
9
|
+
diff-lcs (1.4.4)
|
10
|
+
rake (13.0.6)
|
11
|
+
rspec (2.99.0)
|
12
|
+
rspec-core (~> 2.99.0)
|
13
|
+
rspec-expectations (~> 2.99.0)
|
14
|
+
rspec-mocks (~> 2.99.0)
|
15
|
+
rspec-core (2.99.2)
|
16
|
+
rspec-expectations (2.99.2)
|
20
17
|
diff-lcs (>= 1.1.3, < 2.0)
|
21
|
-
rspec-mocks (2.
|
22
|
-
rubygems-tasks (0.2.4)
|
23
|
-
rubysl-date (2.0.6)
|
24
|
-
rubysl-singleton (2.0.0)
|
18
|
+
rspec-mocks (2.99.4)
|
25
19
|
|
26
20
|
PLATFORMS
|
27
21
|
ruby
|
28
22
|
|
29
23
|
DEPENDENCIES
|
30
|
-
|
31
|
-
|
32
|
-
rdoc (~> 3.0)
|
33
|
-
rspec (~> 2.4)
|
24
|
+
rake (>= 12.0)
|
25
|
+
rspec (~> 2.99)
|
34
26
|
ruby_version!
|
35
|
-
|
36
|
-
|
37
|
-
|
27
|
+
|
28
|
+
BUNDLED WITH
|
29
|
+
2.2.22
|
data/{README.rdoc → README.md}
RENAMED
@@ -1,8 +1,9 @@
|
|
1
|
-
|
1
|
+
# RubyVersion [<img src="https://badge.fury.io/rb/ruby_version.svg" alt="Gem Version" />](https://badge.fury.io/rb/ruby_version) [<img src="https://github.com/janlelis/ruby_version/workflows/Test/badge.svg" />](https://github.com/janlelis/ruby_version/actions?query=workflow%3ATest)
|
2
2
|
|
3
|
-
Provides a
|
3
|
+
Provides a `RubyVersion` to simplify checking for the right Ruby version in
|
4
|
+
your programs.
|
4
5
|
|
5
|
-
|
6
|
+
## Setup
|
6
7
|
|
7
8
|
On your command-line:
|
8
9
|
|
@@ -12,7 +13,7 @@ In Ruby:
|
|
12
13
|
|
13
14
|
require 'ruby_version'
|
14
15
|
|
15
|
-
|
16
|
+
## Usage
|
16
17
|
|
17
18
|
# Output RUBY_VERSION
|
18
19
|
RubyVersion.to_s
|
@@ -39,12 +40,12 @@ In Ruby:
|
|
39
40
|
RubyVersion.patchlevel # => 249
|
40
41
|
RubyVersion.description # => "ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]"
|
41
42
|
|
42
|
-
|
43
|
+
## Also See
|
43
44
|
|
44
|
-
https://github.com/janlelis/ruby_engine
|
45
|
-
https://github.com/janlelis/ruby_info
|
46
|
-
https://github.com/rdp/os
|
45
|
+
- https://github.com/janlelis/ruby_engine
|
46
|
+
- https://github.com/janlelis/ruby_info
|
47
|
+
- https://github.com/rdp/os
|
47
48
|
|
48
|
-
|
49
|
+
## J-_-L
|
49
50
|
|
50
51
|
Copyright (c) 2010-2014 Jan Lelis. MIT License. Originated from the zucker gem.
|
data/Rakefile
CHANGED
@@ -1,36 +1,39 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
1
|
+
# # #
|
2
|
+
# Get gemspec info
|
3
|
+
|
4
|
+
gemspec_file = Dir['*.gemspec'].first
|
5
|
+
gemspec = eval File.read(gemspec_file), binding, gemspec_file
|
6
|
+
info = "#{gemspec.name} | #{gemspec.version} | " \
|
7
|
+
"#{gemspec.runtime_dependencies.size} dependencies | " \
|
8
|
+
"#{gemspec.files.size} files"
|
9
|
+
|
10
|
+
# # #
|
11
|
+
# Gem build and install task
|
12
|
+
|
13
|
+
desc info
|
14
|
+
task :gem do
|
15
|
+
puts info + "\n\n"
|
16
|
+
print " "; sh "gem build #{gemspec_file}"
|
17
|
+
FileUtils.mkdir_p 'pkg'
|
18
|
+
FileUtils.mv "#{gemspec.name}-#{gemspec.version}.gem", 'pkg'
|
19
|
+
puts; sh %{gem install --no-document pkg/#{gemspec.name}-#{gemspec.version}.gem}
|
11
20
|
end
|
12
21
|
|
13
|
-
|
14
|
-
|
15
|
-
rescue Bundler::BundlerError => e
|
16
|
-
warn e.message
|
17
|
-
warn "Run `bundle install` to install missing gems."
|
18
|
-
exit e.status_code
|
19
|
-
end
|
22
|
+
# # #
|
23
|
+
# Start an IRB session with the gem loaded
|
20
24
|
|
21
|
-
|
25
|
+
desc "#{gemspec.name} | IRB"
|
26
|
+
task :irb do
|
27
|
+
sh "irb -I ./lib -r #{gemspec.name.gsub '-','/'}"
|
28
|
+
end
|
22
29
|
|
23
|
-
|
24
|
-
|
30
|
+
# # #
|
31
|
+
# Spec
|
25
32
|
|
26
|
-
|
27
|
-
|
28
|
-
|
33
|
+
desc "Run specs"
|
34
|
+
task :spec do
|
35
|
+
sh "rspec"
|
29
36
|
end
|
30
|
-
task :doc => :rdoc
|
31
|
-
|
32
|
-
require 'rspec/core/rake_task'
|
33
|
-
RSpec::Core::RakeTask.new
|
34
37
|
|
35
38
|
task :test => :spec
|
36
39
|
task :default => :spec
|
data/lib/ruby_version.rb
CHANGED
data/ruby_version.gemspec
CHANGED
@@ -6,20 +6,18 @@ Gem::Specification.new do |gem|
|
|
6
6
|
gem.name = "ruby_version"
|
7
7
|
gem.version = RubyVersion::VERSION
|
8
8
|
gem.summary = 'Adds the RubyVersion pseudo-constant.'
|
9
|
-
gem.description = 'Provides a RubyVersion class
|
9
|
+
gem.description = 'Provides a RubyVersion class which offers a convenient DSL for checking for the right Ruby version'
|
10
10
|
gem.license = "MIT"
|
11
11
|
gem.authors = ["Jan Lelis"]
|
12
|
-
gem.email = "
|
12
|
+
gem.email = ["hi@ruby.consulting"]
|
13
13
|
gem.homepage = "https://github.com/janlelis/ruby_version"
|
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 '
|
21
|
-
gem.add_development_dependency '
|
22
|
-
gem.add_development_dependency 'rdoc', '~> 3.0'
|
23
|
-
gem.add_development_dependency 'rspec', '~> 2.4'
|
24
|
-
gem.add_development_dependency 'rubygems-tasks', '~> 0.2'
|
21
|
+
gem.add_development_dependency 'rake', '>= 12.0'
|
22
|
+
gem.add_development_dependency 'rspec', '~> 2.99'
|
25
23
|
end
|
data/spec/ruby_version_spec.rb
CHANGED
@@ -35,7 +35,7 @@ describe 'RubyVersion' do
|
|
35
35
|
end
|
36
36
|
|
37
37
|
it 'also allows to check for the release dates' do
|
38
|
-
RubyVersion.is.older_than( Date.today ).should == true
|
38
|
+
RubyVersion.is.older_than( Date.today + 365 ).should == true
|
39
39
|
RubyVersion.is.newer_than( '2000-01-01' ).should == true
|
40
40
|
end
|
41
41
|
end
|
metadata
CHANGED
@@ -1,110 +1,68 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby_version
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Lelis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-07 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: '
|
19
|
+
version: '12.0'
|
34
20
|
type: :development
|
35
21
|
prerelease: false
|
36
22
|
version_requirements: !ruby/object:Gem::Requirement
|
37
23
|
requirements:
|
38
|
-
- - "
|
24
|
+
- - ">="
|
39
25
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
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'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '3.0'
|
26
|
+
version: '12.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.
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '2.4'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rubygems-tasks
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0.2'
|
33
|
+
version: '2.99'
|
76
34
|
type: :development
|
77
35
|
prerelease: false
|
78
36
|
version_requirements: !ruby/object:Gem::Requirement
|
79
37
|
requirements:
|
80
38
|
- - "~>"
|
81
39
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
83
|
-
description: Provides a RubyVersion class
|
84
|
-
|
85
|
-
email:
|
40
|
+
version: '2.99'
|
41
|
+
description: Provides a RubyVersion class which offers a convenient DSL for checking
|
42
|
+
for the right Ruby version
|
43
|
+
email:
|
44
|
+
- hi@ruby.consulting
|
86
45
|
executables: []
|
87
46
|
extensions: []
|
88
47
|
extra_rdoc_files: []
|
89
48
|
files:
|
90
49
|
- ".gitignore"
|
91
50
|
- ".rspec"
|
92
|
-
-
|
93
|
-
- ChangeLog.rdoc
|
51
|
+
- ChangeLog.md
|
94
52
|
- Gemfile
|
95
53
|
- Gemfile.lock
|
96
54
|
- LICENSE.txt
|
97
|
-
- README.
|
55
|
+
- README.md
|
98
56
|
- Rakefile
|
99
57
|
- lib/ruby_version.rb
|
100
|
-
- pkg/ruby_version-1.0.0.gem
|
101
58
|
- ruby_version.gemspec
|
102
59
|
- spec/ruby_version_spec.rb
|
103
60
|
- spec/spec_helper.rb
|
104
61
|
homepage: https://github.com/janlelis/ruby_version
|
105
62
|
licenses:
|
106
63
|
- MIT
|
107
|
-
metadata:
|
64
|
+
metadata:
|
65
|
+
rubygems_mfa_required: 'true'
|
108
66
|
post_install_message:
|
109
67
|
rdoc_options: []
|
110
68
|
require_paths:
|
@@ -120,8 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
78
|
- !ruby/object:Gem::Version
|
121
79
|
version: '0'
|
122
80
|
requirements: []
|
123
|
-
|
124
|
-
rubygems_version: 2.2.1
|
81
|
+
rubygems_version: 3.4.4
|
125
82
|
signing_key:
|
126
83
|
specification_version: 4
|
127
84
|
summary: Adds the RubyVersion pseudo-constant.
|
data/.travis.yml
DELETED
data/ChangeLog.rdoc
DELETED
data/pkg/ruby_version-1.0.0.gem
DELETED
Binary file
|