bump 0.3.6 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bump (0.3.6)
4
+ bump (0.3.7)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -1,5 +1,5 @@
1
1
  Gem::Specification.new "bump" do |s|
2
- s.version = "0.3.6"
2
+ s.version = "0.3.7"
3
3
  s.author = "Gregory Marcilhacy"
4
4
  s.email = "g.marcilhacy@gmail.com"
5
5
  s.homepage = "https://github.com/gregorym/bump"
@@ -77,12 +77,6 @@ module Bump
77
77
  [version, file]
78
78
  end
79
79
 
80
- def self.version_from_version_rb
81
- return unless file = find_version_file("*/**/version.rb")
82
- return unless version = File.read(file)[VERSION_REGEX]
83
- [version, file]
84
- end
85
-
86
80
  def self.version_from_gemspec
87
81
  return unless file = find_version_file("*.gemspec")
88
82
  version = File.read(file)[/\.version\s*=\s*["']#{VERSION_REGEX}["']/, 1]
@@ -90,8 +84,17 @@ module Bump
90
84
  [version, file]
91
85
  end
92
86
 
87
+ def self.version_from_version_rb
88
+ return unless file = find_version_file("*/**/version.rb")
89
+ extract_version_from_file(file)
90
+ end
91
+
93
92
  def self.version_from_version
94
93
  return unless file = find_version_file("VERSION")
94
+ extract_version_from_file(file)
95
+ end
96
+
97
+ def self.extract_version_from_file(file)
95
98
  return unless version = File.read(file)[VERSION_REGEX]
96
99
  [version, file]
97
100
  end
@@ -2,6 +2,12 @@ require "bump"
2
2
 
3
3
  namespace :bump do
4
4
  (Bump::Bump::BUMPS + ["current"]).each do |bump|
5
+ if bump == "current"
6
+ desc "Show current gem version"
7
+ else
8
+ desc "Bump #{bump} part of gem version"
9
+ end
10
+
5
11
  task bump do
6
12
  output, status = Bump::Bump.run(bump)
7
13
  puts output
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bump
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
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-12-03 00:00:00.000000000 Z
12
+ date: 2012-12-10 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description:
15
15
  email: g.marcilhacy@gmail.com