confctl 2.2.2 → 2.2.3

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: df6cafd6791e22c22b68c7513f10275c4f472fb155145451bcfe309d5e542b23
4
- data.tar.gz: b594538eed2e3ee692417a5acf7035e90570928556585a190f1338baf36b6603
3
+ metadata.gz: 145a3b775c32414d32bf6dba2e9dbf69db302f1893f92f78cd5c5dc3f7bdca4a
4
+ data.tar.gz: fb1357049bec71e36b4d6fc9e76d0bf0ac8e620f10e7a3ebed8056ba8d6fc848
5
5
  SHA512:
6
- metadata.gz: 00af7a05b9712db251a4f8e74550368984628a23a5d0a8292f106ed75272d1264af2f8567a8b48fd9f8dbe9dab3c7ee781af7c6c5685c401d120e239b156525d
7
- data.tar.gz: 70af2cf269e92e6c940a98ab79ae9ae5619326faee1031167e84d8b1c2713bf04e6d474bdef5c500cacfe314ccd5c3c329d124ccb31452ca3b0ec9e8d8e3f222
6
+ metadata.gz: 30fa519e81a6bc96de302e573cfdef8d4aef4a5f0ce918778e94132c7cc6de661c26d3206c9223b4b9e1dbd295c4d4a902100504d0563f8ba64e015db022c952
7
+ data.tar.gz: 1158a757fea8cd633edc95b976e6db9ec65797fa1623f3cb20912b870dc0b6180bbdc37e5e7d788c8ddb5505d819a8322ff4d7f4e72e3f9b2fd50fe250a3486b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # Fri Jun 06 2025 -- version 2.2.3
2
+ - Open git commit editor only when running in a terminal
3
+
1
4
  # Fri Jun 06 2025 -- version 2.2.2
2
5
  - Fix `--[no-]editor` option on `confctl swpins cluster/channel update` commands
3
6
 
@@ -185,9 +185,7 @@ module ConfCtl::Cli
185
185
  v = o[i]
186
186
  end
187
187
 
188
- # rubocop:disable Lint/FormatParameterMismatch
189
188
  line format("%#{w}s: %s", c[:label], v)
190
- # rubocop:enable Lint/FormatParameterMismatch
191
189
  end
192
190
 
193
191
  line
@@ -55,7 +55,7 @@ module ConfCtl
55
55
  git_commit = [
56
56
  'git',
57
57
  'commit',
58
- editor ? '-e' : nil,
58
+ use_editor?(editor) ? '-e' : nil,
59
59
  '-m', build_message(type, changelog),
60
60
  *changed_files
61
61
  ].compact
@@ -154,5 +154,9 @@ module ConfCtl
154
154
 
155
155
  true
156
156
  end
157
+
158
+ def use_editor?(editor)
159
+ editor && $stdout.tty?
160
+ end
157
161
  end
158
162
  end
@@ -1,3 +1,3 @@
1
1
  module ConfCtl
2
- VERSION = '2.2.2'.freeze
2
+ VERSION = '2.2.3'.freeze
3
3
  end
@@ -723,12 +723,9 @@ class Machine
723
723
  @spin = @current.json.fetch('spin', spin)
724
724
  @fqdn = @current.json.fetch('fqdn', name)
725
725
 
726
- # rubocop:disable Naming/MemoizedInstanceVariableName
727
726
  @label = @current.json.fetch('label', nil)
728
727
  @label ||= @current.json.fetch('fqdn', nil)
729
728
  @label ||= name
730
- # rubocop:enable Naming/MemoizedInstanceVariableName
731
-
732
729
  @short_label = @label.split('.')[0..1].join('.')
733
730
  end
734
731
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: confctl
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.2
4
+ version: 2.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jakub Skokan