reissue 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -6
- data/lib/reissue/rake.rb +5 -2
- data/lib/reissue/version.rb +1 -1
- data/lib/reissue/version_updater.rb +6 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 024d6b70e3274ab27dea97225976e56c5371f8f84d01663bb6c033bd4b36ec70
|
4
|
+
data.tar.gz: 8fa3b6412648813f302916e7a43b0ad753b8f917064c126f070a4e8edd2976be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 630f0b9db095f1359e149608dc50ce631fc07d335d8d201a5b5741d1f8cd721d450a83d73876bf0c4666347c8bf789c40155fad2b344624ba81718ef102008c3
|
7
|
+
data.tar.gz: 4b4895ec2553559d86bb8fb45f785f60746d34f952e2cd494aed70ceb5f67320660c0a49bd7c5c8b13b4551f71aab2449ce93b1124931949b461e193fadcf4ab
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
6
6
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
7
7
|
|
8
|
+
## [0.1.2] - 2024-06-08
|
9
|
+
|
10
|
+
### Fixed:
|
11
|
+
|
12
|
+
- Fix references to Gem::Version from the top level
|
13
|
+
|
8
14
|
## [0.1.1] - 2024-06-08
|
9
15
|
|
10
16
|
### Added:
|
@@ -27,9 +33,3 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
27
33
|
### Removed:
|
28
34
|
|
29
35
|
- dependency on the keepachangelog gem
|
30
|
-
|
31
|
-
## [0.1.0] - 2024-04-11
|
32
|
-
|
33
|
-
### Added:
|
34
|
-
|
35
|
-
- Initial release
|
data/lib/reissue/rake.rb
CHANGED
@@ -81,10 +81,13 @@ module Reissue
|
|
81
81
|
desc "Finalize the changelog for an unreleased version to set the release date."
|
82
82
|
task "#{name}:finalize", [:date] do |task, args|
|
83
83
|
date = args[:date] || Time.now.strftime("%Y-%m-%d")
|
84
|
-
Reissue.finalize(date, changelog_file:)
|
84
|
+
version, date = Reissue.finalize(date, changelog_file:)
|
85
|
+
finalize_message = "Finalize the changelog for version #{version} on #{date}"
|
85
86
|
if commit_finalize
|
86
87
|
system("git add -u")
|
87
|
-
system("git commit -m '
|
88
|
+
system("git commit -m '#{finalize_message}'")
|
89
|
+
else
|
90
|
+
system("echo '#{finalize_message}'")
|
88
91
|
end
|
89
92
|
end
|
90
93
|
end
|
data/lib/reissue/version.rb
CHANGED
@@ -2,7 +2,7 @@ module Reissue
|
|
2
2
|
# Provides versioning functionality for the application.
|
3
3
|
module Versioning
|
4
4
|
# Provides versioning functionality for the application.
|
5
|
-
refine Gem::Version do
|
5
|
+
refine ::Gem::Version do
|
6
6
|
# Redoes the version based on the specified segment_name.
|
7
7
|
#
|
8
8
|
# @param segment_name [Symbol] The segment_name to redo the version.
|
@@ -10,11 +10,11 @@ module Reissue
|
|
10
10
|
# @return [Gem::Version] The updated version.
|
11
11
|
def redo(segment_name)
|
12
12
|
if segment_name.to_s == "major"
|
13
|
-
Gem::Version.new("#{segments[0].to_i + 1}.0.0")
|
13
|
+
::Gem::Version.new("#{segments[0].to_i + 1}.0.0")
|
14
14
|
elsif segment_name.to_s == "minor"
|
15
|
-
Gem::Version.new("#{segments[0]}.#{segments[1].to_i + 1}.0")
|
15
|
+
::Gem::Version.new("#{segments[0]}.#{segments[1].to_i + 1}.0")
|
16
16
|
else
|
17
|
-
Gem::Version.new("#{segments[0]}.#{segments[1]}.#{segments[2].to_i + 1}")
|
17
|
+
::Gem::Version.new("#{segments[0]}.#{segments[1]}.#{segments[2].to_i + 1}")
|
18
18
|
end
|
19
19
|
end
|
20
20
|
end
|
@@ -53,8 +53,8 @@ module Reissue
|
|
53
53
|
def update(segment)
|
54
54
|
version_file = File.read(@version_file)
|
55
55
|
@updated_body = version_file.gsub(version_regex) do |string|
|
56
|
-
@original_version = Gem::Version.new(string)
|
57
|
-
@new_version = Gem::Version.new(string).redo(segment).to_s
|
56
|
+
@original_version = ::Gem::Version.new(string)
|
57
|
+
@new_version = ::Gem::Version.new(string).redo(segment).to_s
|
58
58
|
end
|
59
59
|
@new_version
|
60
60
|
end
|