gem-release 0.0.22 → 0.0.23
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.
data/lib/gem_release/helpers.rb
CHANGED
@@ -43,11 +43,6 @@ module GemRelease
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def gem_version
|
46
|
-
# After a version file has been changed, the new version will strangely not be obtained by reloading the spec with
|
47
|
-
# Gem::Specification.load(). Therefore, let's obtain the version from the version file directly, and only use
|
48
|
-
# gemspec.version if this fails.
|
49
|
-
VersionFile.new.old_number
|
50
|
-
rescue
|
51
46
|
gemspec.version.to_s
|
52
47
|
end
|
53
48
|
|
data/lib/gem_release/version.rb
CHANGED
@@ -35,12 +35,7 @@ module GemRelease
|
|
35
35
|
protected
|
36
36
|
|
37
37
|
def require_version
|
38
|
-
|
39
|
-
require "#{gem_module_path}/version"
|
40
|
-
end
|
41
|
-
|
42
|
-
def force_load!
|
43
|
-
silence { load(filename) }
|
38
|
+
silence { require(filename) }
|
44
39
|
end
|
45
40
|
|
46
41
|
def major(major, minor, patch)
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'gem_release'
|
2
2
|
require 'rubygems/commands/tag_command'
|
3
|
+
require 'rubygems/commands/release_command'
|
3
4
|
|
4
5
|
class Gem::Commands::BumpCommand < Gem::Command
|
5
6
|
include GemRelease, Gem::Commands
|
@@ -11,6 +12,7 @@ class Gem::Commands::BumpCommand < Gem::Command
|
|
11
12
|
:version => 'patch',
|
12
13
|
:push => false,
|
13
14
|
:tag => false,
|
15
|
+
:release => false,
|
14
16
|
:commit => true,
|
15
17
|
:quiet => false
|
16
18
|
}
|
@@ -22,6 +24,7 @@ class Gem::Commands::BumpCommand < Gem::Command
|
|
22
24
|
option :commit, '-c', 'Perform a commit after incrementing gem version'
|
23
25
|
option :push, '-p', 'Push to origin'
|
24
26
|
option :tag, '-t', 'Create a git tag and push --tags to origin'
|
27
|
+
option :release, '-r', 'Build gem from a gemspec and push to rubygems.org'
|
25
28
|
option :quiet, '-q', 'Do not output status messages'
|
26
29
|
end
|
27
30
|
|
@@ -30,7 +33,7 @@ class Gem::Commands::BumpCommand < Gem::Command
|
|
30
33
|
|
31
34
|
# enforce option dependencies
|
32
35
|
options[:push] = options[:push] || options[:tag]
|
33
|
-
options[:commit] = options[:commit] || options[:push]
|
36
|
+
options[:commit] = options[:commit] || options[:push] || options[:release]
|
34
37
|
|
35
38
|
in_gemspec_dirs do
|
36
39
|
bump
|
@@ -41,6 +44,7 @@ class Gem::Commands::BumpCommand < Gem::Command
|
|
41
44
|
else
|
42
45
|
commit if options[:commit]
|
43
46
|
push if options[:push]
|
47
|
+
release if options[:release]
|
44
48
|
tag if options[:tag]
|
45
49
|
end
|
46
50
|
end
|
@@ -69,6 +73,10 @@ class Gem::Commands::BumpCommand < Gem::Command
|
|
69
73
|
`git push`
|
70
74
|
end
|
71
75
|
|
76
|
+
def release
|
77
|
+
ReleaseCommand.new.invoke
|
78
|
+
end
|
79
|
+
|
72
80
|
def tag
|
73
81
|
TagCommand.new.invoke
|
74
82
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gem-release
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 49
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 23
|
10
|
+
version: 0.0.23
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Sven Fuchs
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-09-
|
18
|
+
date: 2011-09-24 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|