gem-release 0.7.3 → 0.7.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3dde408b1538add2a584a5fa325a367cc59bc9bb
4
- data.tar.gz: 093bd74e2686a152681a41b15639e84b306c5659
3
+ metadata.gz: 17230645886229e80653de813b6781322b8e644b
4
+ data.tar.gz: 43d0c8508ff90b86f89bc89c9e62ba5299bcbc25
5
5
  SHA512:
6
- metadata.gz: 7762f52f8a9637d1fe630d9dd4fb4d163dabde8c691f77f976c09eafa8c5dd8a2bc0fd5b48d691f48121d707543fb9dbc56d55f2760f8836f4f51ee1561f9625
7
- data.tar.gz: aa717d1b1ee5f070d61d5f7df871a41de45c1208c3b1052d1338045cf5c59d966ffac641c5f8f01470b9157451f580ec01785a272e20763427e8a047b5b96f9c
6
+ metadata.gz: 1e8e7d7122fc4213b56e9dda6818bbb4fcd87caf6e160b78d896df68f6eb81566a9c63ba650cf93eb2033934842ea2ae4cc0238bc77f2da9ab0b28dda234d274
7
+ data.tar.gz: 4fd1f054c45cacc2a4931b01e8234365929e07394b12a10e3fa468fd53b76866d8edc5174b7f749cf2ad9305a873ab388de2b31be2d97b1662a3a4995cddd1fd
@@ -15,5 +15,4 @@ Gem::Specification.new do |s|
15
15
  s.files = <%= files %>
16
16
  s.platform = Gem::Platform::RUBY
17
17
  s.require_paths = ['lib']
18
- s.rubyforge_project = '[none]'
19
18
  end
@@ -1,3 +1,3 @@
1
1
  module GemRelease
2
- VERSION = '0.7.3'
2
+ VERSION = '0.7.4'
3
3
  end
@@ -10,28 +10,30 @@ class Gem::Commands::BumpCommand < Gem::Command
10
10
  attr_reader :arguments, :usage, :name
11
11
 
12
12
  DEFAULTS = {
13
- :version => '',
14
- :commit => true,
15
- :push => false,
16
- :tag => false,
17
- :release => false,
18
- :key => '',
19
- :host => '',
20
- :quiet => false
13
+ :version => '',
14
+ :commit => true,
15
+ :push => false,
16
+ :tag => false,
17
+ :release => false,
18
+ :key => '',
19
+ :host => '',
20
+ :quiet => false,
21
+ :destination => "origin",
21
22
  }
22
23
 
23
24
  def initialize(options = {})
24
25
  @name = 'bump'
25
26
  super @name, 'Bump the gem version', default_options_with(options)
26
27
 
27
- option :version, '-v', 'Target version: next [major|minor|patch|pre|release] or a given version number [x.x.x]'
28
- option :commit, '-c', 'Perform a commit after incrementing gem version'
29
- option :push, '-p', 'Push to the origin git repository'
30
- option :tag, '-t', 'Create a git tag and push --tags to origin'
31
- option :release, '-r', 'Build gem from a gemspec and push to rubygems.org'
32
- option :key, '-k', 'When releasing: use the given API key from ~/.gem/credentials'
33
- option :host, '-h', 'When releasing: push to a gemcutter-compatible host other than rubygems.org'
34
- option :quiet, '-q', 'Do not output status messages'
28
+ option :version, '-v', 'Target version: next [major|minor|patch|pre|release] or a given version number [x.x.x]'
29
+ option :commit, '-c', 'Perform a commit after incrementing gem version'
30
+ option :push, '-p', 'Push to the git destination'
31
+ option :destination, '-d', 'destination git repository'
32
+ option :tag, '-t', 'Create a git tag and push it to the git destination'
33
+ option :release, '-r', 'Build gem from a gemspec and push to rubygems.org'
34
+ option :key, '-k', 'When releasing: use the given API key from ~/.gem/credentials'
35
+ option :host, '-h', 'When releasing: push to a gemcutter-compatible host other than rubygems.org'
36
+ option :quiet, '-q', 'Do not output status messages'
35
37
  end
36
38
 
37
39
  def execute
@@ -83,8 +85,9 @@ class Gem::Commands::BumpCommand < Gem::Command
83
85
  end
84
86
 
85
87
  def push
86
- say "Pushing to the origin git repository" unless quiet?
87
- system('git push origin')
88
+ destination = options[:destination]
89
+ say "Pushing to the #{destination} git repository" unless quiet?
90
+ system("git push #{destination}")
88
91
  end
89
92
 
90
93
  def release
@@ -103,6 +106,7 @@ class Gem::Commands::BumpCommand < Gem::Command
103
106
  cmd.options[:quiet] = options[:quiet]
104
107
  cmd.options[:quiet_success] = true
105
108
  cmd.options[:push_tags_only] = true
109
+ cmd.options[:destination] = options[:destination]
106
110
  cmd.execute
107
111
  true
108
112
  end
@@ -7,10 +7,11 @@ class Gem::Commands::ReleaseCommand < Gem::Command
7
7
  include Helpers, CommandOptions
8
8
 
9
9
  DEFAULTS = {
10
- :tag => false,
11
- :quiet => false,
12
- :key => '',
13
- :host => ''
10
+ :tag => false,
11
+ :quiet => false,
12
+ :key => '',
13
+ :host => '',
14
+ :destination => "origin",
14
15
  }
15
16
 
16
17
  attr_reader :arguments, :usage, :name
@@ -19,10 +20,11 @@ class Gem::Commands::ReleaseCommand < Gem::Command
19
20
  @name = 'release'
20
21
  super @name, 'Build gem from a gemspec and push to rubygems.org', default_options_with(options)
21
22
 
22
- option :tag, '-t', 'Create a git tag and push --tags to origin'
23
- option :quiet, '-q', 'Do not output status messages'
24
- option :key, '-k', 'Use the given API key from ~/.gem/credentials'
25
- option :host, '-h', 'Push to a gemcutter-compatible host other than rubygems.org'
23
+ option :tag, '-t', 'Create a git tag and push it to the destination'
24
+ option :destination, '-d', 'Destination git repository'
25
+ option :quiet, '-q', 'Do not output status messages'
26
+ option :key, '-k', 'Use the given API key from ~/.gem/credentials'
27
+ option :host, '-h', 'Push to a gemcutter-compatible host other than rubygems.org'
26
28
 
27
29
  @arguments = "gemspec - optional gemspec file name, will use the first *.gemspec if not specified"
28
30
  @usage = "#{program_name} [gemspec]"
@@ -3,16 +3,18 @@ class Gem::Commands::TagCommand < Gem::Command
3
3
  include Helpers, CommandOptions
4
4
 
5
5
  DEFAULTS = {
6
- :quiet => false
6
+ :quiet => false,
7
+ :destination => "origin"
7
8
  }
8
9
 
9
10
  attr_reader :arguments, :usage, :name
10
11
 
11
12
  def initialize(options = {})
12
13
  @name = 'tag'
13
- super @name, 'Create a git tag and push --tags to origin', default_options_with(options)
14
+ super @name, 'Create a git tag and push it to the destination', default_options_with(options)
14
15
 
15
- option :quiet, '-q', 'Do not output status messages'
16
+ option :quiet, '-q', 'Do not output status messages'
17
+ option :destination, '-d', 'Git destination'
16
18
  end
17
19
 
18
20
  def execute
@@ -33,11 +35,11 @@ class Gem::Commands::TagCommand < Gem::Command
33
35
  def push
34
36
  unless options[:push_tags_only]
35
37
  say "Pushing to the origin git repository" unless quiet?
36
- return false unless system('git push origin')
38
+ return false unless system("git push #{options[:destination]}")
37
39
  end
38
40
 
39
- say "Pushing --tags to the origin git repository" unless quiet?
40
- system('git push --tags origin')
41
+ say "Pushing #{tag_name} to the #{options[:destination]} repository" unless quiet?
42
+ system("git push #{options[:destination]} #{tag_name}")
41
43
  end
42
44
 
43
45
  def tag_name
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem-release
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.3
4
+ version: 0.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sven Fuchs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-12 00:00:00.000000000 Z
11
+ date: 2015-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test_declarative
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  - !ruby/object:Gem::Version
118
118
  version: 1.3.6
119
119
  requirements: []
120
- rubyforge_project: "[none]"
120
+ rubyforge_project:
121
121
  rubygems_version: 2.2.2
122
122
  signing_key:
123
123
  specification_version: 4