bump_gem_version 0.1.5 → 0.1.7

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: f4fe11c46d8610c36ed079b6d9e098fd7776eb32b2ab6b685cf018b9cd62fcf3
4
- data.tar.gz: c574ae0534221b2038af4667557cf4f320d955be80ea05d1913c377747a2c752
3
+ metadata.gz: 8fed03df91f12e3dad29edadf9b0c930611502746b4a4aa080d323e7f9bc0c56
4
+ data.tar.gz: 8ad95c21738cf3286935daf3925b3ca508be5ffd485b3a091b6dde4df26b5754
5
5
  SHA512:
6
- metadata.gz: f774a6725cc68453aa7c4d7d84094aa844cba4f6d5ebde1717a44188cfe393ed694098b1e303a09ab0dce930590992d2c90b67c0fdfe40947ae2def3ccf4766f
7
- data.tar.gz: 38ec1e0cc4726af3a85f52e0c7364d3a1010c9acdc1c4729c5e6e9ac53299fbb2ffe9330858173cc2ba79963795bd65229a6bd7f4ae7b2891e8b4dc257fe5d3f
6
+ metadata.gz: 8cecf399c9b9dea0bd6574c8922bfb7511b28e1d4229fdd5d6260b4ea7c26cad5adcb44414ffe2fc2ff90d25db414e96e38eb48a4d2f1fd19928f9e5cee3714f
7
+ data.tar.gz: ff7056d2323df7631cacd94ac983cad76a056039525ecb454c10ac088eaad6ed08f17c2cbf62fb3d40fa6d9bb2d3ac7c9dcc443ad0185aa4769e8906ff7193ab
data/.rubocop.yml CHANGED
@@ -16,3 +16,7 @@ Style/StringLiteralsInInterpolation:
16
16
 
17
17
  Layout/LineLength:
18
18
  Max: 120
19
+
20
+ Metrics/ClassLength:
21
+ Exclude:
22
+ - "./test/test_bump_gem_version.rb"
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.1.3
1
+ 3.1.4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.7] - 2023-07-16
4
+
5
+ - Changed: Bumped the dependency gems to their latest version.
6
+
7
+ ## [0.1.6] - 2023-04-01
8
+
9
+ - Added: Option to provide `default` bump label for the `labels` command.
10
+
3
11
  ## [0.1.5] - 2023-03-29
4
12
 
5
13
  - Fixed: REGEX used to retrieve the current gem name.
data/Gemfile CHANGED
@@ -4,3 +4,15 @@ source "https://rubygems.org"
4
4
 
5
5
  # Specify your gem's dependencies in bump_gem_version.gemspec
6
6
  gemspec
7
+
8
+ group :development, :test do
9
+ gem "minitest"
10
+
11
+ gem "rake"
12
+
13
+ gem "rubocop"
14
+
15
+ gem "rubocop-minitest"
16
+
17
+ gem "rubocop-rake"
18
+ end
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bump_gem_version (0.1.5)
4
+ bump_gem_version (0.1.7)
5
5
  thor (~> 1.2)
6
6
 
7
7
  GEM
@@ -9,32 +9,36 @@ GEM
9
9
  specs:
10
10
  ast (2.4.2)
11
11
  json (2.6.3)
12
- minitest (5.18.0)
13
- parallel (1.22.1)
14
- parser (3.2.1.1)
12
+ language_server-protocol (3.17.0.3)
13
+ minitest (5.18.1)
14
+ parallel (1.23.0)
15
+ parser (3.2.2.3)
15
16
  ast (~> 2.4.1)
17
+ racc
18
+ racc (1.7.1)
16
19
  rainbow (3.1.1)
17
20
  rake (13.0.6)
18
- regexp_parser (2.7.0)
21
+ regexp_parser (2.8.1)
19
22
  rexml (3.2.5)
20
- rubocop (1.48.1)
23
+ rubocop (1.54.2)
21
24
  json (~> 2.3)
25
+ language_server-protocol (>= 3.17.0)
22
26
  parallel (~> 1.10)
23
- parser (>= 3.2.0.0)
27
+ parser (>= 3.2.2.3)
24
28
  rainbow (>= 2.2.2, < 4.0)
25
29
  regexp_parser (>= 1.8, < 3.0)
26
30
  rexml (>= 3.2.5, < 4.0)
27
- rubocop-ast (>= 1.26.0, < 2.0)
31
+ rubocop-ast (>= 1.28.0, < 2.0)
28
32
  ruby-progressbar (~> 1.7)
29
33
  unicode-display_width (>= 2.4.0, < 3.0)
30
- rubocop-ast (1.28.0)
34
+ rubocop-ast (1.29.0)
31
35
  parser (>= 3.2.1.0)
32
- rubocop-minitest (0.29.0)
36
+ rubocop-minitest (0.31.0)
33
37
  rubocop (>= 1.39, < 2.0)
34
38
  rubocop-rake (0.6.0)
35
39
  rubocop (~> 1.0)
36
40
  ruby-progressbar (1.13.0)
37
- thor (1.2.1)
41
+ thor (1.2.2)
38
42
  unicode-display_width (2.4.2)
39
43
 
40
44
  PLATFORMS
@@ -43,11 +47,11 @@ PLATFORMS
43
47
 
44
48
  DEPENDENCIES
45
49
  bump_gem_version!
46
- minitest (~> 5.0)
47
- rake (~> 13.0)
48
- rubocop (~> 1.0)
49
- rubocop-minitest (~> 0.28)
50
- rubocop-rake (~> 0.6)
50
+ minitest
51
+ rake
52
+ rubocop
53
+ rubocop-minitest
54
+ rubocop-rake
51
55
 
52
56
  BUNDLED WITH
53
- 2.4.10
57
+ 2.4.17
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BumpGemVersion
4
- VERSION = "0.1.5"
4
+ VERSION = "0.1.7"
5
5
  end
@@ -22,10 +22,20 @@ module BumpGemVersion
22
22
  desc "patch", "Bump the patch version of your gem"
23
23
  def patch = bump_gem_version("patch")
24
24
 
25
- desc "label", "Bump the version of your gem from the given labels"
26
- def labels(labels)
27
- bump_type = labels.split(",").find { |label| BUMPS.include?(label) }
28
- bump_type ? bump_gem_version(bump_type) : puts("Error: Unable to find a valid bump label.")
25
+ desc "labels", "Bump the version of your gem from the given labels"
26
+ option(:default, desc: "Uses the given default label in case the label was not provided, \
27
+ or the given labels do not contain bump-type label.", banner: "LABEL", type: :string, aliases: "-d")
28
+ def labels(labels = options[:default])
29
+ bump_type = labels&.split(",")&.find { |label| BUMPS.include?(label) }
30
+
31
+ if bump_type.nil? && !BUMPS.include?(options[:default])
32
+ say_error("Unable to find a valid bump label or default label.", :red)
33
+ exit 1
34
+ end
35
+
36
+ return bump_gem_version(bump_type) unless bump_type.nil?
37
+
38
+ bump_gem_version(options[:default])
29
39
  end
30
40
 
31
41
  desc "exact", "Bump the version of your gem to the given version"
@@ -65,7 +75,10 @@ module BumpGemVersion
65
75
  version_from_version_rb ||
66
76
  version_from_lib_rb
67
77
  )
68
- puts "Error: Unable to find the version." unless version
78
+ unless version
79
+ say_error("Unable to find the version.", :red)
80
+ exit 1
81
+ end
69
82
 
70
83
  [version, file]
71
84
  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.5
4
+ version: 0.1.7
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-03-29 00:00:00.000000000 Z
11
+ date: 2023-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -24,76 +24,6 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.2'
27
- - !ruby/object:Gem::Dependency
28
- name: minitest
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '5.0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '5.0'
41
- - !ruby/object:Gem::Dependency
42
- name: rake
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '13.0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '13.0'
55
- - !ruby/object:Gem::Dependency
56
- name: rubocop
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '1.0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '1.0'
69
- - !ruby/object:Gem::Dependency
70
- name: rubocop-minitest
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '0.28'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '0.28'
83
- - !ruby/object:Gem::Dependency
84
- name: rubocop-rake
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: '0.6'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: '0.6'
97
27
  description:
98
28
  email:
99
29
  - thejuspaul@pm.me
@@ -138,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
138
68
  - !ruby/object:Gem::Version
139
69
  version: '0'
140
70
  requirements: []
141
- rubygems_version: 3.4.10
71
+ rubygems_version: 3.4.17
142
72
  signing_key:
143
73
  specification_version: 4
144
74
  summary: BumpGemVersion is a gem that will simplify the way you build gems.