gem-release 0.5.5 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 65f36f62379a2f29748762dd3c5f38ba025b16e4
4
+ data.tar.gz: b963f7d5bc80a51c331d1c307de4cc1cefa27adf
5
+ SHA512:
6
+ metadata.gz: dca5c1ea0bbc479b80347a9d5cdc1070465b002311968aafc62c4afca6cddecee8096a228012edc07fca1da6fce23bdf7271533dcdbe9f26c15d308cd1e713ba
7
+ data.tar.gz: 5a1b90261bdda3552dd20818debdb86eb9269640524f9c22cebf92e552c3a86bcea273a40fcb67c2233f3b2669a80bd5f58a6a0763cd6f65009f70622f2e93d0
@@ -1,3 +1,3 @@
1
1
  module GemRelease
2
- VERSION = '0.5.5'
2
+ VERSION = '0.6.0'
3
3
  end
@@ -14,6 +14,8 @@ module GemRelease
14
14
  @target = options[:target]
15
15
  if @target == nil || @target == ''
16
16
  @target = is_prerelease_version_number?(old_number) ? :pre : :patch
17
+ elsif @target.to_sym == :release
18
+ @target = :patch unless is_prerelease_version_number?(old_number)
17
19
  end
18
20
  end
19
21
 
@@ -32,7 +34,7 @@ module GemRelease
32
34
  end
33
35
  elsif is_prerelease_version_number?(old_number)
34
36
  old_number.sub(PRERELEASE_NUMBER_PATTERN) do
35
- prerelease($1, $2, $3, $4, $5)
37
+ (target.to_sym == :release) ? release($1, $2, $3) : prerelease($1, $2, $3, $4, $5)
36
38
  end
37
39
  else
38
40
  old_number.sub(NUMBER_PATTERN) do
@@ -75,6 +77,10 @@ module GemRelease
75
77
  "#{major}.#{minor}.#{patch.to_i + 1}"
76
78
  end
77
79
 
80
+ def release(major, minor, patch)
81
+ "#{major}.#{minor}.#{patch}"
82
+ end
83
+
78
84
  def prerelease(major, minor, patch, prereleasePrefix, prereleaseNumber)
79
85
  "#{major}.#{minor}.#{patch}.#{prereleasePrefix || 'pre'}#{prereleaseNumber.to_i + 1}"
80
86
  end
@@ -22,7 +22,7 @@ class Gem::Commands::BumpCommand < Gem::Command
22
22
  def initialize(options = {})
23
23
  super 'bump', 'Bump the gem version', DEFAULTS.merge(options)
24
24
 
25
- option :version, '-v', 'Target version: next [major|minor|patch|pre] or a given version number [x.x.x]'
25
+ option :version, '-v', 'Target version: next [major|minor|patch|pre|release] or a given version number [x.x.x]'
26
26
  option :commit, '-c', 'Perform a commit after incrementing gem version'
27
27
  option :push, '-p', 'Push to the origin git repository'
28
28
  option :tag, '-t', 'Create a git tag and push --tags to origin'
metadata CHANGED
@@ -1,46 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem-release
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
5
- prerelease:
4
+ version: 0.6.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Sven Fuchs
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-04-23 00:00:00.000000000 Z
11
+ date: 2013-05-21 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: test_declarative
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: 0.0.2
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: 0.0.2
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: mocha
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: 0.9.8
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: 0.9.8
46
41
  description: Release your ruby gems with ease. (What a bold statement for such a tiny
@@ -76,26 +71,25 @@ files:
76
71
  - lib/rubygems_plugin.rb
77
72
  homepage: http://github.com/svenfuchs/gem-release
78
73
  licenses: []
74
+ metadata: {}
79
75
  post_install_message:
80
76
  rdoc_options: []
81
77
  require_paths:
82
78
  - lib
83
79
  required_ruby_version: !ruby/object:Gem::Requirement
84
- none: false
85
80
  requirements:
86
- - - ! '>='
81
+ - - '>='
87
82
  - !ruby/object:Gem::Version
88
83
  version: '0'
89
84
  required_rubygems_version: !ruby/object:Gem::Requirement
90
- none: false
91
85
  requirements:
92
- - - ! '>='
86
+ - - '>='
93
87
  - !ruby/object:Gem::Version
94
88
  version: 1.3.6
95
89
  requirements: []
96
- rubyforge_project: ! '[none]'
97
- rubygems_version: 1.8.24
90
+ rubyforge_project: '[none]'
91
+ rubygems_version: 2.0.3
98
92
  signing_key:
99
- specification_version: 3
93
+ specification_version: 4
100
94
  summary: Release your ruby gems with ease
101
95
  test_files: []