branch-name 3.6.0 → 3.8.0

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: ab4e1d2055038b5a1dc390420951edc3a1b359f359804b10b8699d67548a0dd2
4
- data.tar.gz: d002928e6ede613707e119f3703f7724444e443a607eea8729cd15fda7c9636a
3
+ metadata.gz: f0f6834e26e510890b7a75d89d1fb207336dd294279445fce5d70774cb7dd0a1
4
+ data.tar.gz: 673a85bf65513bfaf0a9314ec37e05e933b57b10aa4931e3e554532d6b8f3f20
5
5
  SHA512:
6
- metadata.gz: 7e20a24062daf1a3707fddbb6f809e1753c22e5ab61e8309a394a729f083e93147316b7b8e5fa07e611f82cbb117e41aacc198266fc979169e1b4de74249fd6a
7
- data.tar.gz: 3d760194ca03920161ddef676b2d0f12c2519e9350fb5221d6fe667bf79a6965e6bb3c3e3b1e4e24be586d47e8d88acccb63069c87883f07e7990e90476c376d
6
+ metadata.gz: d8e64e7a33757d04d55a63b505666274e589b156de9f358385995b9ca83df5d093dfaa27f9baca0c22dd82270fc24ec46e353d01da6a4a5c00ac39ca58f01aae
7
+ data.tar.gz: 212b79d137ecc670450fa1b17f58c77a34991d186aeaa90d1db2ade14d3823d155bcb8b883a3fdfdd50ccee04f95e4a135c66c98ab7859f16a3f0e2e0364aa77
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## ['3.8.0'] - 2022-11-04
2
+ * Changes
3
+ * Limit gem version to ~> 3.0 to avoid breaking changes.
4
+
5
+ ## ['3.7.0'] - 2022-10-06
6
+ * Changes
7
+ * Use thor_nested_subcommand to fix Thor nested subcommand help bug.
8
+ * Add missing global config option for create: :interactive.
9
+
1
10
  ## ['3.6.0'] - 2022-10-06
2
11
  * Changes
3
12
  * Added a `-i` (interactive) option to `branch-name create`. When used in conjunction with the `-p` option (project creation), if the `-i` option is used, the user will be prompted to create the project. If the `-i` option is NOT used, the user will NOT be prompted when creating the project.
data/Gemfile.lock CHANGED
@@ -1,11 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- branch-name (3.6.0)
4
+ branch-name (3.8.0)
5
5
  activesupport (~> 7.0, >= 7.0.4)
6
6
  colorize (~> 0.8.1)
7
7
  os (~> 1.1, >= 1.1.4)
8
8
  thor (~> 1.2, >= 1.2.1)
9
+ thor_nested_subcommand (~> 1.0)
9
10
 
10
11
  GEM
11
12
  remote: https://rubygems.org/
@@ -74,6 +75,7 @@ GEM
74
75
  simplecov-html (0.12.3)
75
76
  simplecov_json_formatter (0.1.4)
76
77
  thor (1.2.1)
78
+ thor_nested_subcommand (1.0.0)
77
79
  tzinfo (2.0.5)
78
80
  concurrent-ruby (~> 1.0)
79
81
  unicode-display_width (1.8.0)
data/README.md CHANGED
@@ -70,6 +70,7 @@ create:
70
70
  - readme.txt
71
71
  - scratch.rb
72
72
  - snippets.rb
73
+ interactive: true
73
74
  ```
74
75
 
75
76
  NOTE: You can manually change any of the options you wish. It is recommended that you change the default `create: project_location` to meet your needs, depending on your *os*. For example, on *macOS* you might want to change this to `"/Users/<username>/Documents"`, `"/Users/<username>/Documents/features"`, or something similar.
data/branch-name.gemspec CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.homepage = 'https://github.com/gangelo/branch-name'
20
20
  spec.license = 'MIT'
21
21
 
22
- spec.required_ruby_version = '>= 3.0.1'
22
+ spec.required_ruby_version = Gem::Requirement.new("~> 3.0")
23
23
 
24
24
  # spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'"
25
25
 
@@ -42,6 +42,7 @@ Gem::Specification.new do |spec|
42
42
  spec.add_dependency 'colorize', '~> 0.8.1'
43
43
  spec.add_dependency 'os', '~> 1.1', '>= 1.1.4'
44
44
  spec.add_dependency 'thor', '~> 1.2', '>= 1.2.1'
45
+ spec.add_dependency 'thor_nested_subcommand', '~> 1.0'
45
46
 
46
47
  # Remove this for now.
47
48
  spec.metadata['rubygems_mfa_required'] = 'true'
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'thor'
4
+ require 'thor_nested_subcommand'
4
5
  require_relative '../configurable'
5
6
  require_relative '../exitable'
6
- require_relative 'nestable'
7
7
  require_relative '../task_defaultable'
8
8
 
9
9
  module Branch
@@ -12,8 +12,8 @@ module Branch
12
12
  class Delete < ::Thor
13
13
  include Configurable
14
14
  include Exitable
15
- include Nestable
16
15
  include TaskDefaultable
16
+ include ThorNestedSubcommand
17
17
 
18
18
  class << self
19
19
  def base_usage
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'thor'
4
+ require 'thor_nested_subcommand'
4
5
  require_relative '../configurable'
5
6
  require_relative '../exitable'
6
- require_relative 'nestable'
7
7
  require_relative '../task_defaultable'
8
8
 
9
9
  module Branch
@@ -12,8 +12,8 @@ module Branch
12
12
  class Init < ::Thor
13
13
  include Configurable
14
14
  include Exitable
15
- include Nestable
16
15
  include TaskDefaultable
16
+ include ThorNestedSubcommand
17
17
 
18
18
  class << self
19
19
  def base_usage
@@ -3,6 +3,6 @@
3
3
  module Branch
4
4
  module Name
5
5
  # branch-name version
6
- VERSION = '3.6.0'
6
+ VERSION = '3.8.0'
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: branch-name
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.0
4
+ version: 3.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gene M. Angelo, Jr.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-10-05 00:00:00.000000000 Z
11
+ date: 2022-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -84,6 +84,20 @@ dependencies:
84
84
  - - ">="
85
85
  - !ruby/object:Gem::Version
86
86
  version: 1.2.1
87
+ - !ruby/object:Gem::Dependency
88
+ name: thor_nested_subcommand
89
+ requirement: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - "~>"
92
+ - !ruby/object:Gem::Version
93
+ version: '1.0'
94
+ type: :runtime
95
+ prerelease: false
96
+ version_requirements: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - "~>"
99
+ - !ruby/object:Gem::Version
100
+ version: '1.0'
87
101
  description: |2
88
102
  branch-name is a gem that provides a command-line interface that allows you to accomplish several tasks, tasks I personally find myself having to carry out every time I work on a feature branch. I created this gem for myself; however, you are free to use it yourself, if any of these tasks fits into your personal routine:
89
103
 
@@ -126,7 +140,6 @@ files:
126
140
  - lib/branch/name/subcommands/config.rb
127
141
  - lib/branch/name/subcommands/delete.rb
128
142
  - lib/branch/name/subcommands/init.rb
129
- - lib/branch/name/subcommands/nestable.rb
130
143
  - lib/branch/name/task_defaultable.rb
131
144
  - lib/branch/name/version.rb
132
145
  - sig/branch/name.rbs
@@ -144,9 +157,9 @@ require_paths:
144
157
  - lib
145
158
  required_ruby_version: !ruby/object:Gem::Requirement
146
159
  requirements:
147
- - - ">="
160
+ - - "~>"
148
161
  - !ruby/object:Gem::Version
149
- version: 3.0.1
162
+ version: '3.0'
150
163
  required_rubygems_version: !ruby/object:Gem::Requirement
151
164
  requirements:
152
165
  - - ">="
@@ -1,45 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Branch
4
- module Name
5
- module Subcommands
6
- # This module fixes a bug in Thor that prohibits help for nested
7
- # subcommands from displaying help properly. Nested subcommands fail
8
- # to display their subcommand ancestor command name. This fixes that
9
- # bug.
10
- module Nestable
11
- class << self
12
- def included(base)
13
- base.extend ClassMethods
14
- end
15
- end
16
-
17
- module ClassMethods
18
- def base_usage
19
- raise NotImplementedError
20
- end
21
-
22
- # Thor override
23
- # rubocop:disable Style/OptionHash
24
- def desc(usage, description, options = {})
25
- super "#{base_usage} #{usage} ", description, options
26
- end
27
- # rubocop:enable Style/OptionHash
28
-
29
- # Thor override
30
- # rubocop:disable Style/GlobalVars
31
- # rubocop:disable Lint/UnusedMethodArgument
32
- # rubocop:disable Style/OptionalBooleanParameter
33
- def banner(command, namespace = nil, subcommand = false)
34
- command.formatted_usage(self, $thor_runner, subcommand).split("\n").map do |_formatted_usage|
35
- "#{basename} #{command.usage}"
36
- end.join("\n")
37
- end
38
- # rubocop:enable Style/GlobalVars
39
- # rubocop:enable Lint/UnusedMethodArgument
40
- # rubocop:enable Style/OptionalBooleanParameter
41
- end
42
- end
43
- end
44
- end
45
- end