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 CHANGED
@@ -31,6 +31,8 @@ Rake::RDocTask.new do |doc|
31
31
  doc.title = "version #{Version.current}"
32
32
  doc.rdoc_dir = 'doc'
33
33
  doc.main = 'README.rdoc'
34
+ doc.rdoc_files.include('*.rdoc')
35
+ doc.rdoc_files.include('lib/**/*.rb')
34
36
  end
35
37
 
36
38
  Spec::Rake::SpecTask.new(:spec) do |task|
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.2
1
+ 0.10.0
@@ -64,7 +64,7 @@ class Rake::VersionTask < Rake::TaskLib
64
64
 
65
65
  namespace :version do
66
66
  desc 'Creates a version file with an optional VERSION parameter'
67
- task(:create ) do
67
+ task(:create) do
68
68
  version = (ENV['VERSION'] || '0.0.0').to_version
69
69
  puts write(version)
70
70
  end
@@ -1,5 +1,5 @@
1
1
  require 'version/ext/array'
2
- require 'version/ext/class'
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
@@ -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 Class
3
+ class Module
4
4
  #
5
- # Automagically sets a VERSION constant in the current class according to
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
- version: 0.9.2
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: 2010-02-23 00:00:00 -05:00
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
- type: :development
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
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
- version:
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.3.5
79
+ rubygems_version: 1.6.2
78
80
  signing_key:
79
81
  specification_version: 3
80
82
  summary: simple version-number encapsulation