diff --git a/CHANGELOG.md b/CHANGELOG.md index 09ff7b7..256ea9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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: @@ -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 diff --git a/lib/reissue/version.rb b/lib/reissue/version.rb index 5c80e81..0607b63 100644 --- a/lib/reissue/version.rb +++ b/lib/reissue/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Reissue - VERSION = "0.1.1" + VERSION = "0.1.2" end diff --git a/lib/reissue/version_updater.rb b/lib/reissue/version_updater.rb index 768e05d..71639dc 100644 --- a/lib/reissue/version_updater.rb +++ b/lib/reissue/version_updater.rb @@ -2,7 +2,7 @@ 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. @@ -10,11 +10,11 @@ module Versioning # @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