ruby_version 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -3
- data/ChangeLog.rdoc +4 -2
- data/README.rdoc +27 -16
- data/lib/ruby_version.rb +6 -0
- data/ruby_version.gemspec +2 -2
- metadata +20 -20
- data/lib/ruby_version/version.rb +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f337975091999833b65c1006c8c3fddfe607cdd8
|
4
|
+
data.tar.gz: 22575d38a75b5ff6e41caa7085ed0e0c4f657364
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fc1f396adef6cc6c7feadf0a4506b0dda7a07e1b8239415e5fdc55e3b493c2bab16a15a4d875d9bf0ae10ca685b1baf0196f5e31d1e074d651de91fdaa4f5c8
|
7
|
+
data.tar.gz: e15947a112ff63bfb5db232c3fcf1ca66073d0a09f74142b0c89cdfe163a2d74fe303675dab8e8da31cd55d328bd436089893c47d639e810e7daf624a1321f29
|
data/.travis.yml
CHANGED
data/ChangeLog.rdoc
CHANGED
data/README.rdoc
CHANGED
@@ -14,25 +14,36 @@ In Ruby:
|
|
14
14
|
|
15
15
|
== Usage
|
16
16
|
|
17
|
-
#
|
18
|
-
RubyVersion
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
17
|
+
# Output RUBY_VERSION
|
18
|
+
RubyVersion.to_s
|
19
|
+
|
20
|
+
# Check for the main version with a Float
|
21
|
+
RubyVersion.is? 2.1
|
22
|
+
|
23
|
+
# Use strings for exacter checking
|
24
|
+
RubyVersion.is.above '1.9.2'
|
25
|
+
RubyVersion.is.at_least '2.0.0' # or exactly, below, at_most
|
26
|
+
|
27
|
+
# You can use the common comparison operators
|
25
28
|
RubyVersion >= '1.8.7'
|
26
|
-
RubyVersion.between? '1.8.
|
27
|
-
|
29
|
+
RubyVersion.between? '1.8.7', '1.9.2'
|
30
|
+
|
31
|
+
# Relase date checks
|
28
32
|
RubyVersion.is.older_than Date.today
|
29
33
|
RubyVersion.is.newer_than '2009-08-19'
|
30
|
-
|
31
|
-
|
32
|
-
RubyVersion.
|
33
|
-
RubyVersion.
|
34
|
-
RubyVersion.
|
35
|
-
RubyVersion.
|
34
|
+
|
35
|
+
# Misc Accessors
|
36
|
+
RubyVersion.major # => 1
|
37
|
+
RubyVersion.minor # => 8
|
38
|
+
RubyVersion.tiny # => 7
|
39
|
+
RubyVersion.patchlevel # => 249
|
40
|
+
RubyVersion.description # => "ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]"
|
41
|
+
|
42
|
+
== Also See
|
43
|
+
|
44
|
+
https://github.com/janlelis/ruby_engine |
|
45
|
+
https://github.com/janlelis/ruby_info |
|
46
|
+
https://github.com/rdp/os
|
36
47
|
|
37
48
|
== J-_-L
|
38
49
|
|
data/lib/ruby_version.rb
CHANGED
@@ -2,6 +2,8 @@ require 'date'
|
|
2
2
|
require 'time'
|
3
3
|
|
4
4
|
module RubyVersion
|
5
|
+
VERSION = '1.0.1'
|
6
|
+
|
5
7
|
class << self
|
6
8
|
def to_s
|
7
9
|
RUBY_VERSION
|
@@ -112,6 +114,10 @@ module RubyVersion
|
|
112
114
|
def description
|
113
115
|
RUBY_DESCRIPTION
|
114
116
|
end
|
117
|
+
|
118
|
+
def revision
|
119
|
+
defined?(RUBY_REVISION) && RUBY_REVISION
|
120
|
+
end
|
115
121
|
end
|
116
122
|
end
|
117
123
|
|
data/ruby_version.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
|
3
|
-
require File.expand_path('../lib/ruby_version
|
3
|
+
require File.expand_path('../lib/ruby_version', __FILE__)
|
4
4
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
6
|
gem.name = "ruby_version"
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
|
|
18
18
|
gem.require_paths = ['lib']
|
19
19
|
|
20
20
|
gem.add_development_dependency 'bundler', '~> 1.0'
|
21
|
-
gem.add_development_dependency 'rake', '~> 10.
|
21
|
+
gem.add_development_dependency 'rake', '~> 10.1'
|
22
22
|
gem.add_development_dependency 'rdoc', '~> 3.0'
|
23
23
|
gem.add_development_dependency 'rspec', '~> 2.4'
|
24
24
|
gem.add_development_dependency 'rubygems-tasks', '~> 0.2'
|
metadata
CHANGED
@@ -1,83 +1,83 @@
|
|
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.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-
|
11
|
+
date: 2014-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '10.
|
33
|
+
version: '10.1'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '10.
|
40
|
+
version: '10.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rdoc
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '3.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '2.4'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '2.4'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rubygems-tasks
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - ~>
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0.2'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - ~>
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0.2'
|
83
83
|
description: Provides a RubyVersion class to simplify checking for the right Ruby
|
@@ -87,9 +87,9 @@ executables: []
|
|
87
87
|
extensions: []
|
88
88
|
extra_rdoc_files: []
|
89
89
|
files:
|
90
|
-
- .gitignore
|
91
|
-
- .rspec
|
92
|
-
- .travis.yml
|
90
|
+
- ".gitignore"
|
91
|
+
- ".rspec"
|
92
|
+
- ".travis.yml"
|
93
93
|
- ChangeLog.rdoc
|
94
94
|
- Gemfile
|
95
95
|
- Gemfile.lock
|
@@ -97,7 +97,7 @@ files:
|
|
97
97
|
- README.rdoc
|
98
98
|
- Rakefile
|
99
99
|
- lib/ruby_version.rb
|
100
|
-
-
|
100
|
+
- pkg/ruby_version-1.0.0.gem
|
101
101
|
- ruby_version.gemspec
|
102
102
|
- spec/ruby_version_spec.rb
|
103
103
|
- spec/spec_helper.rb
|
@@ -111,12 +111,12 @@ require_paths:
|
|
111
111
|
- lib
|
112
112
|
required_ruby_version: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
|
-
- -
|
114
|
+
- - ">="
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: '0'
|
117
117
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
118
118
|
requirements:
|
119
|
-
- -
|
119
|
+
- - ">="
|
120
120
|
- !ruby/object:Gem::Version
|
121
121
|
version: '0'
|
122
122
|
requirements: []
|
data/lib/ruby_version/version.rb
DELETED