Skip to content

Commit

Permalink
Fix Gem::Version references
Browse files Browse the repository at this point in the history
  • Loading branch information
saturnflyer committed Jun 9, 2024
1 parent 756b422 commit e05d47a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [0.1.2] - Unreleased

### Fixed:

- Fix references to Gem::Version from the top level

## [0.1.1] - 2024-06-08

### Added:
Expand All @@ -27,9 +33,3 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Removed:

- dependency on the keepachangelog gem

## [0.1.0] - 2024-04-11

### Added:

- Initial release
2 changes: 1 addition & 1 deletion lib/reissue/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Reissue
VERSION = "0.1.1"
VERSION = "0.1.2"
end
8 changes: 4 additions & 4 deletions lib/reissue/version_updater.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ module Reissue
# Provides versioning functionality for the application.
module Versioning
# Provides versioning functionality for the application.
refine Gem::Version do
refine ::Gem::Version do
# Redoes the version based on the specified segment_name.
#
# @param segment_name [Symbol] The segment_name to redo the version.
# Possible values are :major, :minor, or any other symbol.
# @return [Gem::Version] The updated version.
def redo(segment_name)
if segment_name.to_s == "major"
Gem::Version.new("#{segments[0].to_i + 1}.0.0")
::Gem::Version.new("#{segments[0].to_i + 1}.0.0")
elsif segment_name.to_s == "minor"
Gem::Version.new("#{segments[0]}.#{segments[1].to_i + 1}.0")
::Gem::Version.new("#{segments[0]}.#{segments[1].to_i + 1}.0")
else
Gem::Version.new("#{segments[0]}.#{segments[1]}.#{segments[2].to_i + 1}")
::Gem::Version.new("#{segments[0]}.#{segments[1]}.#{segments[2].to_i + 1}")
end
end
end
Expand Down

0 comments on commit e05d47a

Please sign in to comment.