gem_version 0.0.4 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,10 +1,8 @@
1
1
  .DS_Store
2
+ .idea
2
3
  pkg
3
4
  nbproject
4
- arspy*.gem
5
- arspy*.gemspec
6
5
  TODO.txt
7
6
  spec/next_gem_version
8
- *.gemspec
9
7
  *.gem
10
8
 
@@ -52,9 +52,26 @@ See my Rakefile[http://github.com/jeffp/gem_version/blob/master/Rakefile] for an
52
52
 
53
53
  == Bumping or resetting the next gem version
54
54
 
55
- GemVersion creates a file named 'next_gem_version' in the root directory of your project which contains the 'next' gem version. Edit the version in this file to bump or reset the version for the next build.
55
+ GemVersion creates a file named 'next_gem_version' in the root directory of your project which contains the 'next' gem version. Edit the version in this file or use the rake tasks to bump or set the version for the next build.
56
+
57
+ GemVersion increments the last component of your version. If you need to bump from 0.1.x to 0.2.x, you'll need to bump the version manually.
58
+
59
+ == Rake tasks
60
+
61
+ Two rake tasks gem:clean and gem:version are available whenever you require gem_version.
62
+
63
+ * Clean the project root of .gem and .gemspec files.
64
+
65
+ rake gem:clean
66
+
67
+ * Get the next gem version
68
+
69
+ rake gem:version
70
+
71
+ * Set the next gem version
72
+
73
+ rake gem:version set=0.1.0
56
74
 
57
- GemVersion increments the last component of your version. If you need to bump from 0.1.x to 0.2.x, you'll need to make the change in the file.
58
75
 
59
76
  == Dependencies
60
77
 
data/Rakefile CHANGED
@@ -55,7 +55,9 @@ task :gemspec do
55
55
  f.write spec.to_ruby
56
56
  end
57
57
  GemVersion.increment_version
58
- GemVersion.commit_and_push
58
+ GemVersion.commit_and_push do |git|
59
+ git.add("#{spec.name}.gemspec")
60
+ end
59
61
  end
60
62
 
61
63
  Rake::GemPackageTask.new(spec) do |p|
@@ -57,9 +57,10 @@ module GemVersion
57
57
  file.close
58
58
  end
59
59
 
60
- def self.commit_and_push(project_directory = nil, msg = nil)
60
+ def self.commit_and_push(project_directory = nil, msg = nil, &block)
61
61
  g=Git.open(project_directory || Dir.pwd, :log=>Logger.new(STDOUT))
62
62
  g.add(@@gem_version_file)
63
+ yield(g) if block_given?
63
64
  g.commit(msg || @@default_commit_message)
64
65
  g.push
65
66
  end
@@ -1,8 +1,11 @@
1
1
 
2
2
  namespace :gem do
3
+ desc "Clean *.gem* files from project root"
3
4
  task :clean do
4
5
  FileUtils.rm_f Dir.glob('*.gem*')
5
6
  end
7
+
8
+ desc "Return and set next gem version"
6
9
  task :version do
7
10
  if (ENV.include?("set"))
8
11
  version = ENV['set'].gsub(/'/, '')
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem_version
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 19
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 0
8
- - 4
9
- version: 0.0.4
9
+ - 6
10
+ version: 0.0.6
10
11
  platform: ruby
11
12
  authors:
12
13
  - Jeff Patmon
@@ -14,16 +15,18 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-04-30 00:00:00 -07:00
18
+ date: 2010-06-04 00:00:00 -07:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
22
  name: git
22
23
  prerelease: false
23
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
24
26
  requirements:
25
27
  - - ">="
26
28
  - !ruby/object:Gem::Version
29
+ hash: 21
27
30
  segments:
28
31
  - 1
29
32
  - 2
@@ -60,25 +63,29 @@ rdoc_options: []
60
63
  require_paths:
61
64
  - lib
62
65
  required_ruby_version: !ruby/object:Gem::Requirement
66
+ none: false
63
67
  requirements:
64
68
  - - ">="
65
69
  - !ruby/object:Gem::Version
70
+ hash: 59
66
71
  segments:
67
72
  - 1
68
73
  - 8
69
74
  - 6
70
75
  version: 1.8.6
71
76
  required_rubygems_version: !ruby/object:Gem::Requirement
77
+ none: false
72
78
  requirements:
73
79
  - - ">="
74
80
  - !ruby/object:Gem::Version
81
+ hash: 3
75
82
  segments:
76
83
  - 0
77
84
  version: "0"
78
85
  requirements: []
79
86
 
80
87
  rubyforge_project:
81
- rubygems_version: 1.3.6
88
+ rubygems_version: 1.3.7
82
89
  signing_key:
83
90
  specification_version: 3
84
91
  summary: Never bother updating the version for your next gem build by hand. Configured in your Rakefile, gem_version provides the next Gem version and stores it to the repository.