version 0.9.2 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +2 -0
- data/VERSION +1 -1
- data/lib/rake/version_task.rb +1 -1
- data/lib/version.rb +2 -2
- data/lib/version/component.rb +1 -1
- data/lib/version/ext/{class.rb → module.rb} +2 -2
- metadata +12 -10
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.10.0
|
data/lib/rake/version_task.rb
CHANGED
data/lib/version.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'version/ext/array'
|
2
|
-
require 'version/ext/
|
2
|
+
require 'version/ext/module'
|
3
3
|
require 'version/ext/hash'
|
4
4
|
require 'version/ext/string'
|
5
5
|
|
@@ -128,7 +128,7 @@ class Version
|
|
128
128
|
when :pre then self[-1] = self.components[-1].next(true)
|
129
129
|
else
|
130
130
|
self.resize!(index + 1) if (trim or index >= self.length)
|
131
|
-
self[index] = self.components[index].next
|
131
|
+
self[index] = (self.components[index] || Component.new('0')).next
|
132
132
|
end
|
133
133
|
|
134
134
|
self
|
data/lib/version/component.rb
CHANGED
@@ -31,7 +31,7 @@ class Version::Component
|
|
31
31
|
def next!(pre = false)
|
32
32
|
case
|
33
33
|
when ( pre and self.prerelease?) then self.letter.next!
|
34
|
-
when ( pre and not self.prerelease?) then self.letter = 'a'
|
34
|
+
when ( pre and not self.prerelease?) then self.letter = 'a'; self.digits = self.digits.next
|
35
35
|
when (not pre and self.prerelease?) then self.letter = ''
|
36
36
|
when (not pre and not self.prerelease?) then self.digits = self.digits.next
|
37
37
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
require 'version'
|
2
2
|
|
3
|
-
class
|
3
|
+
class Module
|
4
4
|
#
|
5
|
-
# Automagically sets a VERSION constant in the current
|
5
|
+
# Automagically sets a VERSION constant in the current module according to
|
6
6
|
# the results of Version.current.
|
7
7
|
#
|
8
8
|
def is_versioned
|
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: version
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease:
|
5
|
+
version: 0.10.0
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Stephen Touset
|
@@ -9,19 +10,20 @@ autorequire:
|
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
12
|
|
12
|
-
date:
|
13
|
+
date: 2011-04-29 00:00:00 -04:00
|
13
14
|
default_executable:
|
14
15
|
dependencies:
|
15
16
|
- !ruby/object:Gem::Dependency
|
16
17
|
name: rspec
|
17
|
-
|
18
|
-
|
19
|
-
|
18
|
+
prerelease: false
|
19
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
|
+
none: false
|
20
21
|
requirements:
|
21
22
|
- - ">="
|
22
23
|
- !ruby/object:Gem::Version
|
23
24
|
version: "0"
|
24
|
-
|
25
|
+
type: :development
|
26
|
+
version_requirements: *id001
|
25
27
|
description:
|
26
28
|
email: stephen@touset.org
|
27
29
|
executables: []
|
@@ -42,8 +44,8 @@ files:
|
|
42
44
|
- lib/rake/version_task.rb
|
43
45
|
- lib/version/component.rb
|
44
46
|
- lib/version/ext/array.rb
|
45
|
-
- lib/version/ext/class.rb
|
46
47
|
- lib/version/ext/hash.rb
|
48
|
+
- lib/version/ext/module.rb
|
47
49
|
- lib/version/ext/string.rb
|
48
50
|
- lib/version.rb
|
49
51
|
- spec/spec.opts
|
@@ -60,21 +62,21 @@ rdoc_options:
|
|
60
62
|
require_paths:
|
61
63
|
- lib
|
62
64
|
required_ruby_version: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
63
66
|
requirements:
|
64
67
|
- - ">="
|
65
68
|
- !ruby/object:Gem::Version
|
66
69
|
version: "0"
|
67
|
-
version:
|
68
70
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
71
|
+
none: false
|
69
72
|
requirements:
|
70
73
|
- - ">="
|
71
74
|
- !ruby/object:Gem::Version
|
72
75
|
version: "0"
|
73
|
-
version:
|
74
76
|
requirements: []
|
75
77
|
|
76
78
|
rubyforge_project:
|
77
|
-
rubygems_version: 1.
|
79
|
+
rubygems_version: 1.6.2
|
78
80
|
signing_key:
|
79
81
|
specification_version: 3
|
80
82
|
summary: simple version-number encapsulation
|