raketeer 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6ea4a060cb8e00095e9df956fa2ee5f82b62f54062a5e9a304902a82e8aed1eb
4
- data.tar.gz: cf7681b3872489a4f6a2c7b7faad9103613c6966ddc978e3e4d151da33ee1e0b
3
+ metadata.gz: 1b99e3161b005655aae395358e6b77cd6639d8ba23772a7b8ff046fe5417e9b3
4
+ data.tar.gz: 60dace11dd408a067de2fb802cd270c46153382a7b10e7ac9f71f5b0b3a755bf
5
5
  SHA512:
6
- metadata.gz: 3c59023bccceb084fc6ee5aeee2de32482c5ba77c8bb7995371161dabff2e0755a572b0b676e6b4b6a1bb690d3ddb90047b79a9701712492bdbc20009dc1e629
7
- data.tar.gz: 735a8192cdc76bb8bc9dfa9b019980a789f45bb365800725b5a482e4b212e6c5d8d5080b526c6f1969c7fc8100c6a044ad43b120a6b3b1e8d82d0b9187c75db7
6
+ metadata.gz: 4e451e5c7f240195de491672510f05ac95a8e09ef633019ad138a918c7352863d64a54a440ebe1bad939b26deaf90c28c26fa960e65ff4f8bdeba71efb5992eb
7
+ data.tar.gz: '09963f9e20f3307bd19310f7cdc3b592913bc8d788d3f465d025c7e030553697602d6d545be78af4e0d5c46c3efa5d3eb45df198611b98c302d8a54006d89124'
@@ -2,7 +2,14 @@
2
2
 
3
3
  Format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
- ## [[Unreleased]](https://github.com/esotericpig/raketeer/compare/v0.2.5...master)
5
+ ## [[Unreleased]](https://github.com/esotericpig/raketeer/compare/v0.2.6...master)
6
+
7
+ ## [v0.2.6] - 2019-08-03
8
+ ### Changed
9
+ - Refactored BumpTask for a new project I'm working on to use this project in a CLI
10
+
11
+ ### Fixed
12
+ - SemVer's initialize_copy()
6
13
 
7
14
  ## [v0.2.5] - 2019-08-02
8
15
  ### Added
@@ -73,7 +73,6 @@ module Raketeer
73
73
  def define()
74
74
  desc 'Show/Set/Bump the version'
75
75
  task @name,[:version] do |task,args|
76
- check_env()
77
76
  bump_all(BumpVer.new(
78
77
  version: args.version,
79
78
  major: ENV['major'],
@@ -92,7 +91,6 @@ module Raketeer
92
91
  # You can't erase the major version (required)
93
92
  bump_ver.major = '+1' if bump_ver.major.nil?() || bump_ver.major.empty?()
94
93
 
95
- check_env()
96
94
  bump_all(bump_ver)
97
95
  end
98
96
 
@@ -101,7 +99,6 @@ module Raketeer
101
99
  bump_ver = BumpVer.new(minor: args.minor)
102
100
  bump_ver.minor = '+1' if bump_ver.minor.nil?()
103
101
 
104
- check_env()
105
102
  bump_all(bump_ver)
106
103
  end
107
104
 
@@ -110,7 +107,6 @@ module Raketeer
110
107
  bump_ver = BumpVer.new(patch: args.patch)
111
108
  bump_ver.patch = '+1' if bump_ver.patch.nil?()
112
109
 
113
- check_env()
114
110
  bump_all(bump_ver)
115
111
  end
116
112
 
@@ -119,7 +115,6 @@ module Raketeer
119
115
  bump_ver = BumpVer.new(prerelease: args.pre)
120
116
  bump_ver.prerelease = '' if bump_ver.prerelease.nil?()
121
117
 
122
- check_env()
123
118
  bump_all(bump_ver)
124
119
  end
125
120
 
@@ -128,13 +123,11 @@ module Raketeer
128
123
  bump_ver = BumpVer.new(build_meta: args.build)
129
124
  bump_ver.build_meta = '' if bump_ver.build_meta.nil?()
130
125
 
131
- check_env()
132
126
  bump_all(bump_ver)
133
127
  end
134
128
 
135
129
  desc 'Bump the Gemfile.lock version'
136
130
  task :bundle do
137
- check_env()
138
131
  bump_bundle_file()
139
132
  end
140
133
 
@@ -146,6 +139,8 @@ module Raketeer
146
139
  end
147
140
 
148
141
  def bump_all(bump_ver)
142
+ check_env()
143
+
149
144
  sem_vers = []
150
145
 
151
146
  # Order matters for outputting the most accurate version
@@ -155,13 +150,19 @@ module Raketeer
155
150
 
156
151
  sem_vers.compact!()
157
152
 
158
- if @bump_bundle && !bump_ver.empty?() && !sem_vers.empty?()
153
+ if sem_vers.empty?()
154
+ puts '! No versions found'
155
+
156
+ return
157
+ end
158
+
159
+ if @bump_bundle && !bump_ver.empty?()
159
160
  bump_bundle_file()
160
161
  end
161
162
 
162
163
  # Always output it, in case the user just wants to see what the git message
163
164
  # should be without making changes.
164
- if !@git_msg.nil?() && !sem_vers.empty?()
165
+ if !@git_msg.nil?()
165
166
  puts '[Git]:'
166
167
  puts '= ' + (@git_msg % {version: sem_vers[0].to_s()})
167
168
  end
@@ -338,13 +339,13 @@ rake #{@name} major=+1 minor=+1 patch=+1 # Bump the version numbers by 1
338
339
  rake #{@name} major=+2 minor=+3 patch=+4 # Bump the version numbers by X
339
340
 
340
341
  rake #{@name}:major # Bump the major version by 1
341
- rake #{@name}:major[1] # Set the major version
342
+ rake #{@name}:major[1] # Set the major version to 1
342
343
  rake #{@name}:major[+2] # Bump the major version by 2
343
344
  rake #{@name}:minor # Bump the minor version by 1
344
- rake #{@name}:minor[2] # Set the minor version
345
+ rake #{@name}:minor[2] # Set the minor version to 2
345
346
  rake #{@name}:minor[+3] # Bump the minor version by 3
346
347
  rake #{@name}:patch # Bump the patch version by 1
347
- rake #{@name}:patch[3] # Set the patch version
348
+ rake #{@name}:patch[3] # Set the patch version to 3
348
349
  rake #{@name}:patch[+4] # Bump the patch version by 4
349
350
  rake #{@name}:pre # Erase the pre-release version
350
351
  rake #{@name}:pre[alpha.4] # Set the pre-release version
@@ -125,11 +125,11 @@ module Raketeer
125
125
  return :same_ver
126
126
  else
127
127
  orig_line = @line.dup()
128
- orig_sem_ver = @sem_ver.dup()
128
+ orig_sem_ver_s = @sem_ver.to_s()
129
129
 
130
130
  @bump_ver.bump_line!(@line,@sem_ver,strict: @strict)
131
131
 
132
- if @sem_ver.to_s() != orig_sem_ver.to_s()
132
+ if @sem_ver.to_s() != orig_sem_ver_s
133
133
  if !@version_bumped
134
134
  @version = @sem_ver
135
135
  @version_bumped = true
@@ -54,14 +54,14 @@ module Raketeer
54
54
  def initialize_copy(orig)
55
55
  super(orig)
56
56
 
57
- is_clone = caller[0].include?('clone')
57
+ copy = caller[0].to_s().include?('clone') ? :clone : :dup
58
58
 
59
- @build_meta = is_clone ? orig.build_meta.clone() : orig.build_meta.dup()
60
- @major = is_clone ? orig.major.clone() : orig.major.dup()
61
- @minor = is_clone ? orig.minor.clone() : orig.minor.dup()
62
- @patch = is_clone ? orig.patch.clone() : orig.patch.dup()
63
- @prerelease = is_clone ? orig.prerelease.clone() : orig.prerelease.dup()
64
- @version = is_clone ? orig.version.clone() : orig.version.dup()
59
+ @build_meta = @build_meta.__send__(copy)
60
+ @major = @major.__send__(copy)
61
+ @minor = @minor.__send__(copy)
62
+ @patch = @patch.__send__(copy)
63
+ @prerelease = @prerelease.__send__(copy)
64
+ @version = @version.__send__(copy)
65
65
  end
66
66
 
67
67
  def self.parse(str)
@@ -22,7 +22,7 @@
22
22
 
23
23
 
24
24
  module Raketeer
25
- VERSION = '0.2.5'
25
+ VERSION = '0.2.6'
26
26
 
27
27
  # @since 0.2.4
28
28
  DEP_VERSIONS = {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raketeer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Bradley Whited (@esotericpig)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-02 00:00:00.000000000 Z
11
+ date: 2019-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake