bump_gem_version 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4cd19c397da6310e2469d6e7fd5cab35e0654e29bf879c6fcb41b6d192db4882
4
- data.tar.gz: 20fe21b1e32cb4592d1740268450b05526648e784475da8f5a21b39499c4b551
3
+ metadata.gz: f4fe11c46d8610c36ed079b6d9e098fd7776eb32b2ab6b685cf018b9cd62fcf3
4
+ data.tar.gz: c574ae0534221b2038af4667557cf4f320d955be80ea05d1913c377747a2c752
5
5
  SHA512:
6
- metadata.gz: 6a43f03a98c67a1e84e576ded78d85e1c12812889d691547b0a59889d36f9c7b30d314d885149491652f0b64e874bd96e78d99fe3f5d53529c7cb4d969680f28
7
- data.tar.gz: c117e01b1a48a62bc4e6020b58553ef495a0f3db2a0c193cc23d0d5ad52f95bd8671415f914cc89ba1512f3bf53994dfe83841af31e0cdfc769e99ed97497750
6
+ metadata.gz: f774a6725cc68453aa7c4d7d84094aa844cba4f6d5ebde1717a44188cfe393ed694098b1e303a09ab0dce930590992d2c90b67c0fdfe40947ae2def3ccf4766f
7
+ data.tar.gz: 38ec1e0cc4726af3a85f52e0c7364d3a1010c9acdc1c4729c5e6e9ac53299fbb2ffe9330858173cc2ba79963795bd65229a6bd7f4ae7b2891e8b4dc257fe5d3f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.5] - 2023-03-29
4
+
5
+ - Fixed: REGEX used to retrieve the current gem name.
6
+
7
+ ## [0.1.4] - 2023-03-05
8
+
9
+ - Added: `exact` method to bump version to the given version.
10
+
3
11
  ## [0.1.3] - 2023-02-23
4
12
 
5
13
  - Changed: Bump version logic on `Gemfile.lock` file.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bump_gem_version (0.1.3)
4
+ bump_gem_version (0.1.5)
5
5
  thor (~> 1.2)
6
6
 
7
7
  GEM
@@ -9,15 +9,15 @@ GEM
9
9
  specs:
10
10
  ast (2.4.2)
11
11
  json (2.6.3)
12
- minitest (5.17.0)
12
+ minitest (5.18.0)
13
13
  parallel (1.22.1)
14
- parser (3.2.1.0)
14
+ parser (3.2.1.1)
15
15
  ast (~> 2.4.1)
16
16
  rainbow (3.1.1)
17
17
  rake (13.0.6)
18
18
  regexp_parser (2.7.0)
19
19
  rexml (3.2.5)
20
- rubocop (1.46.0)
20
+ rubocop (1.48.1)
21
21
  json (~> 2.3)
22
22
  parallel (~> 1.10)
23
23
  parser (>= 3.2.0.0)
@@ -27,18 +27,19 @@ GEM
27
27
  rubocop-ast (>= 1.26.0, < 2.0)
28
28
  ruby-progressbar (~> 1.7)
29
29
  unicode-display_width (>= 2.4.0, < 3.0)
30
- rubocop-ast (1.26.0)
30
+ rubocop-ast (1.28.0)
31
31
  parser (>= 3.2.1.0)
32
- rubocop-minitest (0.28.0)
32
+ rubocop-minitest (0.29.0)
33
33
  rubocop (>= 1.39, < 2.0)
34
34
  rubocop-rake (0.6.0)
35
35
  rubocop (~> 1.0)
36
- ruby-progressbar (1.11.0)
36
+ ruby-progressbar (1.13.0)
37
37
  thor (1.2.1)
38
38
  unicode-display_width (2.4.2)
39
39
 
40
40
  PLATFORMS
41
41
  arm64-darwin-21
42
+ x86_64-linux
42
43
 
43
44
  DEPENDENCIES
44
45
  bump_gem_version!
@@ -49,4 +50,4 @@ DEPENDENCIES
49
50
  rubocop-rake (~> 0.6)
50
51
 
51
52
  BUNDLED WITH
52
- 2.4.7
53
+ 2.4.10
data/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # BumpGemVersion
2
2
 
3
+ ![Gem Version](https://badge.fury.io/rb/bump_gem_version.svg)
4
+ ![Gem](https://img.shields.io/gem/dt/bump_gem_version?color=#6DBE42)
5
+
6
+
3
7
  BumpGemVersion is a gem that will simplify the way you build gems.
4
8
 
5
9
  ## Installation
@@ -32,6 +36,8 @@ bump_gem_version labels bug,patch # 0.1.0 -> 0.1.1
32
36
  bump_gem_version labels feature,minor,patch # 0.1.0 -> 0.2.0
33
37
  bump_gem_version labels breaking,major # 0.1.0 -> 1.0.0
34
38
  bump_gem_version labels ${{ join(github.event.pull_request.labels.*.name, ',') }} # For GitHub PR labels
39
+
40
+ bump_gem_version exact 1.2.3 # 0.1.0 -> 1.2.3
35
41
  ```
36
42
 
37
43
  ## Development
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BumpGemVersion
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.5"
5
5
  end
@@ -28,8 +28,17 @@ module BumpGemVersion
28
28
  bump_type ? bump_gem_version(bump_type) : puts("Error: Unable to find a valid bump label.")
29
29
  end
30
30
 
31
+ desc "exact", "Bump the version of your gem to the given version"
32
+ def exact(version) = bump_exact_version(version)
33
+
31
34
  private
32
35
 
36
+ def bump_exact_version(version)
37
+ file = current_version[1]
38
+ replace_version_in_file(file, version)
39
+ replace_version_in_gemfile_lock_file("Gemfile.lock", version)
40
+ end
41
+
33
42
  def bump_gem_version(bump_type)
34
43
  file = current_version[1]
35
44
  new_version = updated_version(bump_type)
@@ -99,7 +108,7 @@ module BumpGemVersion
99
108
 
100
109
  def current_gem_name
101
110
  gemspec = Dir.glob("*.gemspec").first
102
- File.read(gemspec)[/spec\.name\s+=\s+['"](.+)['"]/i, 1]
111
+ File.read(gemspec)[/\.name\s+=\s+['"](.+)['"]/i, 1]
103
112
  end
104
113
  end
105
114
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bump_gem_version
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thejus Paul
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-23 00:00:00.000000000 Z
11
+ date: 2023-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -121,7 +121,7 @@ licenses:
121
121
  metadata:
122
122
  homepage_uri: https://rubygems.org/gems/bump_gem_version
123
123
  source_code_uri: https://github.com/thejus-paul/bump_gem_version
124
- changelog_uri: https://github.com/thejus-paul/bump_gem_version/CHANGELOG.md
124
+ changelog_uri: https://github.com/Thejus-Paul/bump_gem_version/blob/main/CHANGELOG.md
125
125
  rubygems_mfa_required: 'true'
126
126
  post_install_message:
127
127
  rdoc_options: []
@@ -138,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  requirements: []
141
- rubygems_version: 3.4.7
141
+ rubygems_version: 3.4.10
142
142
  signing_key:
143
143
  specification_version: 4
144
144
  summary: BumpGemVersion is a gem that will simplify the way you build gems.