kintsugi 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7efc466f1583ea53deda2b4e77f030a1072ac4e93f8d8687f5eca22e2ea1d60c
4
- data.tar.gz: 0c9dd29ad25b68fbb8c7d2b3b7ce4113e95a341234edaa3d3e11277dd691fc04
3
+ metadata.gz: 35d23332d5548a077db178c966f44413a314276628404a7a9e70d7e2ae45da96
4
+ data.tar.gz: ea35a4c7587ddb9243103d4c249050900505e630beb8a3764ad7e083360db320
5
5
  SHA512:
6
- metadata.gz: ee93b9b5f72d5ab35fb37a6fcc5464815e9ea13a9a985296d9132bd04be02edc9f542564b6cf5f495bc1a680b9b06a317bed0c709347ca641f5b31bb3145796e
7
- data.tar.gz: c89520181be68ea61548b989a957e3d7fea7cef637b5a5cfa962ca3634b1db8d0e85906f947ea8868fa3a7ec5feed558d0ea156a77887f59d1123e4865bc6062
6
+ metadata.gz: c9731d92243eff91a6a33ae674a936e274c1cfc58979ceedae1248bdb0d6602fbc51d0c192e6f982aa1a150f1fcc2874d0a0255f11ed9aaa68abefae81212ee7
7
+ data.tar.gz: a96ac801a8ea82a2893d41b25fc7a7fdfd928fba280f6f837c83a49b7b02358d124fcac6d2bd377230f3ab14d3f5f16d8b4de3c9524a1c96cf2ffff927377233
data/lib/kintsugi/cli.rb CHANGED
@@ -154,7 +154,10 @@ module Kintsugi
154
154
  `git config --global --unset merge.kintsugi.name`
155
155
  `git config --global --unset merge.kintsugi.driver`
156
156
 
157
- `sed -i '' '/\*.pbxproj\ merge=kintsugi/d' "#{global_attributes_file_path}"`
157
+ attributes_file_path = global_attributes_file_path
158
+ return unless File.exist?(attributes_file_path)
159
+
160
+ `sed -i '' '/\*.pbxproj\ merge=kintsugi/d' "#{attributes_file_path}"`
158
161
  end
159
162
 
160
163
  def create_root_command
@@ -178,10 +181,7 @@ module Kintsugi
178
181
  exit
179
182
  end
180
183
 
181
- subcommands_descriptions = @subcommands.map do |command_name, command|
182
- " #{command_name}: #{command.description}"
183
- end.join("\n")
184
- opts.on_tail("\nSUBCOMMANDS\n#{subcommands_descriptions}")
184
+ opts.on_tail("\nSUBCOMMANDS\n#{subcommands_descriptions(subcommands)}")
185
185
  end
186
186
 
187
187
  root_action = lambda { |options, arguments|
@@ -202,5 +202,13 @@ module Kintsugi
202
202
  description: nil
203
203
  )
204
204
  end
205
+
206
+ def subcommands_descriptions(subcommands)
207
+ longest_subcommand_length = subcommands.keys.map(&:length).max + 4
208
+ format_string = " %-#{longest_subcommand_length}s%s"
209
+ subcommands.map do |command_name, command|
210
+ format(format_string, "#{command_name}:", command.description)
211
+ end.join("\n")
212
+ end
205
213
  end
206
214
  end
@@ -3,6 +3,6 @@
3
3
  module Kintsugi
4
4
  # This module holds the Kintsugi version information.
5
5
  module Version
6
- STRING = "0.4.1"
6
+ STRING = "0.4.2"
7
7
  end
8
8
  end
data/lib/kintsugi.rb CHANGED
@@ -139,7 +139,7 @@ module Kintsugi
139
139
  def file_has_version_in_stage_numbers?(file_path, stage_numbers)
140
140
  file_absolute_path = File.absolute_path(file_path)
141
141
  actual_stage_numbers =
142
- `git ls-files -u -- #{file_absolute_path}`.split("\n").map do |git_file_status|
142
+ `git ls-files -u -- "#{file_absolute_path}"`.split("\n").map do |git_file_status|
143
143
  git_file_status.split[2]
144
144
  end
145
145
  (stage_numbers - actual_stage_numbers.map(&:to_i)).empty?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kintsugi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Yohay
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-02 00:00:00.000000000 Z
11
+ date: 2022-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xcodeproj
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
151
151
  version: '0'
152
152
  requirements: []
153
153
  rubyforge_project:
154
- rubygems_version: 2.7.6.3
154
+ rubygems_version: 2.7.3
155
155
  signing_key:
156
156
  specification_version: 4
157
157
  summary: pbxproj files git conflicts solver