ruby-version 0.4.2 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. data/.travis.yml +0 -4
  2. data/Gemfile.lock +12 -12
  3. data/VERSION +1 -1
  4. data/ruby-version.gemspec +2 -2
  5. data/tests.rb +27 -28
  6. metadata +3 -3
@@ -10,7 +10,3 @@ rvm:
10
10
  - jruby-head
11
11
  - 1.8.7
12
12
  - ree
13
- jdk:
14
- - openjdk7
15
- - oraclejdk7
16
- - openjdk6
@@ -9,22 +9,22 @@ GEM
9
9
  rake
10
10
  rdoc
11
11
  json (1.7.5)
12
- multi_json (1.3.6)
13
- rake (0.9.2.2)
12
+ multi_json (1.4.0)
13
+ rake (10.0.2)
14
14
  rdoc (3.12)
15
15
  json (~> 1.4)
16
- rspec (2.11.0)
17
- rspec-core (~> 2.11.0)
18
- rspec-expectations (~> 2.11.0)
19
- rspec-mocks (~> 2.11.0)
20
- rspec-core (2.11.1)
21
- rspec-expectations (2.11.3)
16
+ rspec (2.12.0)
17
+ rspec-core (~> 2.12.0)
18
+ rspec-expectations (~> 2.12.0)
19
+ rspec-mocks (~> 2.12.0)
20
+ rspec-core (2.12.1)
21
+ rspec-expectations (2.12.0)
22
22
  diff-lcs (~> 1.1.3)
23
- rspec-mocks (2.11.3)
24
- simplecov (0.6.4)
23
+ rspec-mocks (2.12.0)
24
+ simplecov (0.7.1)
25
25
  multi_json (~> 1.0)
26
- simplecov-html (~> 0.5.3)
27
- simplecov-html (0.5.3)
26
+ simplecov-html (~> 0.7.1)
27
+ simplecov-html (0.7.1)
28
28
 
29
29
  PLATFORMS
30
30
  ruby
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.2
1
+ 0.4.3
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "ruby-version"
8
- s.version = "0.4.2"
8
+ s.version = "0.4.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Martin Koz\u{e1}k"]
12
- s.date = "2012-10-06"
12
+ s.date = "2012-12-04"
13
13
  s.email = "martinkozak@martinkozak.net"
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE.txt",
data/tests.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
  # encoding: utf-8
3
- # (c) 2011 Martin Kozák (martinkozak@martinkozak.net)
3
+ # (c) 2011-2012 Martin Kozák (martinkozak@martinkozak.net)
4
4
 
5
5
  $:.push("./lib")
6
6
 
@@ -22,11 +22,10 @@ HIGHER = :"4.0.1"
22
22
 
23
23
  describe Ruby::Engine do
24
24
  specify "NAME shoud be something reasonable" do
25
- not ['ruby', 'jruby', 'rbx'].include? Ruby::Engine::NAME
25
+ ['ruby', 'jruby', 'rbx'].include?(Ruby::Engine::NAME).should be_true
26
26
  end
27
27
  it "shoud be comparable" do
28
- Ruby::Engine == "foo"
29
- true
28
+ (Ruby::Engine == "foo").should be_false
30
29
  end
31
30
  end
32
31
 
@@ -34,55 +33,55 @@ describe Ruby::Version, "-- algebraic comparsion operators" do
34
33
 
35
34
  context "against higher version" do
36
35
  it "should be lower" do
37
- Ruby::Version < HIGHER
36
+ (Ruby::Version < HIGHER).should be_true
38
37
  end
39
38
  it "should be lower or equal" do
40
- Ruby::Version <= HIGHER
39
+ (Ruby::Version <= HIGHER).should be_true
41
40
  end
42
41
  it "shouldn't be equal" do
43
- not Ruby::Version == HIGHER
42
+ (Ruby::Version == HIGHER).should be_false
44
43
  end
45
44
  it "should be higher or equal" do
46
- Ruby::Version >= HIGHER
45
+ (Ruby::Version >= HIGHER).should be_false
47
46
  end
48
47
  it "should be higher" do
49
- Ruby::Version > HIGHER
48
+ (Ruby::Version > HIGHER).should be_false
50
49
  end
51
50
  end
52
51
 
53
52
  context "against current version" do
54
53
  it "shouldn't be lower" do
55
- not Ruby::Version < CURRENT
54
+ (Ruby::Version < CURRENT).should be_false
56
55
  end
57
56
  it "should be lower or equal" do
58
- Ruby::Version <= CURRENT
57
+ (Ruby::Version <= CURRENT).should be_true
59
58
  end
60
59
  it "should be equal" do
61
- Ruby::Version == CURRENT
60
+ (Ruby::Version == CURRENT).should be_true
62
61
  end
63
62
  it "should be higher or equal" do
64
- Ruby::Version >= CURRENT
63
+ (Ruby::Version >= CURRENT).should be_true
65
64
  end
66
65
  it "shouldn't be higher" do
67
- not Ruby::Version > HIGHER
66
+ (Ruby::Version > HIGHER).should be_false
68
67
  end
69
68
  end
70
69
 
71
70
  context "against lower version" do
72
71
  it "should be lower" do
73
- Ruby::Version < LOWER
72
+ (Ruby::Version < LOWER).should be_false
74
73
  end
75
74
  it "should be lower or equal" do
76
- Ruby::Version <= LOWER
75
+ (Ruby::Version <= LOWER).should be_false
77
76
  end
78
77
  it "shouldn't be equal" do
79
- not Ruby::Version == LOWER
78
+ (Ruby::Version == LOWER).should be_false
80
79
  end
81
80
  it "shouldn't be higher or equal" do
82
- not Ruby::Version >= LOWER
81
+ (Ruby::Version >= LOWER).should be_true
83
82
  end
84
83
  it "shouldn't be higher" do
85
- not Ruby::Version > LOWER
84
+ (Ruby::Version > LOWER).should be_true
86
85
  end
87
86
 
88
87
  end
@@ -92,28 +91,28 @@ describe Ruby::Version, "-- fuzzy operators" do
92
91
 
93
92
  context "against higher version" do
94
93
  specify "#<=> should return -1" do
95
- (Ruby::Version <=> HIGHER) == -1
94
+ (Ruby::Version <=> HIGHER).should eq(-1)
96
95
  end
97
96
  specify "#compare should return -1" do
98
- Ruby::Version::compare(HIGHER) == -1
97
+ Ruby::Version::compare(HIGHER).should eq(-1)
99
98
  end
100
99
  end
101
100
 
102
101
  context "against current version" do
103
102
  specify "#<=> should return 0" do
104
- (Ruby::Version <=> CURRENT) == 0
103
+ (Ruby::Version <=> CURRENT).should eq(0)
105
104
  end
106
105
  specify "#compare should return 0" do
107
- Ruby::Version::compare(CURRENT) == 0
106
+ Ruby::Version::compare(CURRENT).should eq(0)
108
107
  end
109
108
  end
110
109
 
111
110
  context "against lower version" do
112
111
  specify "#<=> should return 1" do
113
- (Ruby::Version <=> LOWER) == 1
112
+ (Ruby::Version <=> LOWER).should eq(1)
114
113
  end
115
114
  specify "#compare should return 1" do
116
- Ruby::Version::compare(LOWER) == -1
115
+ Ruby::Version::compare(LOWER).should eq(1)
117
116
  end
118
117
  end
119
118
  end
@@ -121,13 +120,13 @@ end
121
120
  describe Ruby::Version do
122
121
 
123
122
  specify "TOKENS constant content the same as broking result" do
124
- Ruby::Version::TOKENS == Ruby::Version::broke(RUBY_VERSION)
123
+ Ruby::Version::TOKENS.should eq(Ruby::Version::broke(RUBY_VERSION))
125
124
  end
126
125
  specify "VERSION constant should be equal to RUBY_VERSION" do
127
- Ruby::Version::VERSION == RUBY_VERSION
126
+ Ruby::Version::VERSION.should eq(RUBY_VERSION)
128
127
  end
129
128
  specify "broking components should equal to version string components" do
130
- Ruby::Version::broke("1.2.3") == [1, 2, 3]
129
+ Ruby::Version::broke("1.2.3").should eq([1, 2, 3])
131
130
  end
132
131
 
133
132
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-version
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-06 00:00:00.000000000 Z
12
+ date: 2012-12-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -125,7 +125,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
125
125
  version: '0'
126
126
  segments:
127
127
  - 0
128
- hash: 1902862411478104695
128
+ hash: 775438983748440676
129
129
  required_rubygems_version: !ruby/object:Gem::Requirement
130
130
  none: false
131
131
  requirements: