git_curate 2.0.1 → 2.0.2

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: b2dadca6d4a56acaa6352b2cd8a4b1712bffe24339f80a7e784201a5d0b91b8b
4
- data.tar.gz: f5ca652a07578bebd55232cbac782dcd61d7e06f065b0786c6eb96ea305e0c4a
3
+ metadata.gz: 67761bb5db9c0aef1cd78931fcdd99b4a0a08666bd0b729f008500653ac23426
4
+ data.tar.gz: c93e07b7717422ef5853075e1b69d76739ce76afe7fd475925ff539fee9fa87c
5
5
  SHA512:
6
- metadata.gz: a6224292f13413221251e6082151a8bac9488e00f9f2a5fbac7a52e4b96f92786c9dd2bf3db3fe7406aa174ebc225960d3f4115605f74d7f86058c6a11005706
7
- data.tar.gz: 938cf9cdffc784a5653cc9ab7151eb85ef64a333a91fcacde80df8ebc0c817909468ca6af708c4fbcf61eb9badc8a299402b916dea1ba6d30b672fcea85991a4
6
+ metadata.gz: b4f174ba5cdedb4b5624685a156f3a07b9abc7e14d7fd18e93f0dce9bba5a5b2d4f16a54814765574cfde6968bdecdd5784eb7b18cc5469a262c0332540a335a
7
+ data.tar.gz: dd2856b7a3d1f405e59187d89bd2b168be2694f29c57a583fb96a7d07cbb4f73dfdb2a0a5a3f2c5ba9eaa5a494657344f445135cfa03c29df88f8ca31e8aa755
data/.gitignore CHANGED
@@ -10,3 +10,4 @@
10
10
  **/.*.swp
11
11
  coverage
12
12
  play.rb
13
+ .idea
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ### v2.0.2
4
+
5
+ * Fix handling of branch names containing parentheses
6
+
3
7
  ### v2.0.1
4
8
 
5
9
  * Dependency version upgrades
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.1
1
+ 2.0.2
@@ -21,6 +21,10 @@ module GitCurate
21
21
  @proper_name ||= @raw_name.lstrip.sub(CURRENT_BRANCH_REGEX, '')
22
22
  end
23
23
 
24
+ def command_quoted_proper_name
25
+ "'#{proper_name}'"
26
+ end
27
+
24
28
  def current?
25
29
  @current ||= (@raw_name =~ CURRENT_BRANCH_REGEX)
26
30
  end
@@ -104,7 +108,7 @@ module GitCurate
104
108
  private
105
109
 
106
110
  def self.delete_multi(*branches)
107
- Util.command_output("git branch -D #{branches.map(&:proper_name).join(" ")} --")
111
+ Util.command_output("git branch -D #{branches.map(&:command_quoted_proper_name).join(" ")} --")
108
112
  end
109
113
 
110
114
  # raw_name should start in "* " if the current branch on this worktree, "+ " if it's the current
@@ -119,7 +123,7 @@ module GitCurate
119
123
  @last_commit ||= begin
120
124
  # For Windows compatibility we need double quotes around the format string, as well as spaces
121
125
  # between the placeholders.
122
- command = %Q(git log -n1 --date=short --format=format:"%cd %n %h %n %an %n %s" #{proper_name} --)
126
+ command = %Q(git log -n1 --date=short --format=format:"%cd %n %h %n %an %n %s" #{command_quoted_proper_name} --)
123
127
  Commit.new(*Util.command_to_a(command))
124
128
  end
125
129
  end
@@ -1,3 +1,3 @@
1
1
  module GitCurate
2
- VERSION = "2.0.1"
2
+ VERSION = "2.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_curate
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Harvey
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-08-28 00:00:00.000000000 Z
11
+ date: 2025-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highline