hammer_cli 2.1.2 → 2.2.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: bc020640c6f4416caa469fe39b9c029bd7feec0730a626636753046b400ac3be
4
- data.tar.gz: aa7fc51d9a7ec86bb2ba0b512c9272696a399272bf90ed8e40604bfe849247dc
3
+ metadata.gz: d903c3dbbe33a2411dfd2e23b781609a40b39b4ed29066cabe35af22335042d5
4
+ data.tar.gz: 25acdf29e7a071a945a4c7c2c4745083e0e11e7d12ce098c662054a7d87caeb1
5
5
  SHA512:
6
- metadata.gz: b271be2146f0d730bb71e66b6ab785481b2a81ac762e101337936dcee5ae540468b060b11753ca732d5a26ded757365f2d6f52db9bee7031c767ec1db6f3f654
7
- data.tar.gz: 23bfbb0ff4bbe1f556860fce41a14a39a7e17890807d85f96d09e9ff101cc254275ecce8b42f8502518da7f452f6a5101b318569f51b61a880eff4c914980d40
6
+ metadata.gz: 8a117c635359bc261f70cb67bf33fc2080f15b909981a98f87d7c64235a2ecf686bf1530b5293e60565e5e52cab2ed9bbf17f604816099ada8e11b11a5b7f064
7
+ data.tar.gz: 3e296e36f46d6374fc1878a51447cd2fe820104fa5ba191c6bde91a62aff2fd7b76e12743d152ca0eb9457b541e38dd39351da138020501d286c3af071e33b39
@@ -1,8 +1,8 @@
1
1
  ### Installation from RPMs
2
2
 
3
- #### Step 1: setup yum repositories
3
+ #### Step 1: set up yum repositories
4
4
 
5
- For Foreman 1.3 stable the hammer packages are part of your installation repo and you can skip this step.
5
+ For Foreman 1.3 stable, the hammer packages are part of your installation repo and you can skip this step.
6
6
 
7
7
  You can choose from stable or nightly repo. Nightly has more recent version of hammer packages, but it was subject to less testing so there is a higher risk of issues.
8
8
  Add the Foreman yum repository to your yum repo files. For Fedora installations replace 'el6' with 'f18' or 'f19' as appropriate.
@@ -1,12 +1,11 @@
1
1
  Release notes
2
2
  =============
3
- ### 2.1.2 (2020-09-04)
4
- * Make fuzzy search work in hammer shell ([PR #335](https://github.com/theforeman/hammer-cli/pull/335)), [#30747](http://projects.theforeman.org/issues/30747)
5
-
6
- ### 2.1.1 (2020-05-29)
3
+ ### 2.2.0 (2020-08-11)
4
+ * Update installation_rpm.md ([PR #333](https://github.com/theforeman/hammer-cli/pull/333))
7
5
  * Clean gem_release.ipynb up
8
6
  * Replace awesome_print with amazing_print ([PR #330](https://github.com/theforeman/hammer-cli/pull/330)), [#29846](http://projects.theforeman.org/issues/29846)
9
7
  * Fix typo: s/filed/feild/ ([PR #331](https://github.com/theforeman/hammer-cli/pull/331))
8
+ * Bump to 2.2.0-develop
10
9
 
11
10
  ### 2.1.0 (2020-05-14)
12
11
  * Hammer full-help returns correct output, [#29697](http://projects.theforeman.org/issues/29697)
@@ -61,6 +61,25 @@ module HammerCLI
61
61
  label = HighLine.color(label, :bold) if @richtext
62
62
  puts label
63
63
  end
64
+
65
+ private
66
+
67
+ def expand_invocation_path(path)
68
+ bits = path.split(' ')
69
+ parent_command = HammerCLI::MainCommand
70
+ new_path = (bits[1..-1] || []).each_with_object([]) do |bit, names|
71
+ subcommand = parent_command.find_subcommand(bit)
72
+ next if subcommand.nil?
73
+
74
+ names << if subcommand.names.size > 1
75
+ "<#{subcommand.names.join('|')}>"
76
+ else
77
+ subcommand.names.first
78
+ end
79
+ parent_command = subcommand.subcommand_class
80
+ end
81
+ new_path.unshift(bits.first).join(' ')
82
+ end
64
83
  end
65
84
  end
66
85
  end
@@ -121,7 +121,7 @@ module HammerCLI
121
121
  bits = path.split(' ')
122
122
  parent_command = HammerCLI::MainCommand
123
123
  new_path = (bits[1..-1] || []).each_with_object([]) do |bit, names|
124
- subcommand = parent_command.find_subcommand(bit, fuzzy: false)
124
+ subcommand = parent_command.find_subcommand(bit)
125
125
  next if subcommand.nil?
126
126
 
127
127
  names << if subcommand.names.size > 1
@@ -1,5 +1,5 @@
1
1
  module HammerCLI
2
2
  def self.version
3
- @version ||= Gem::Version.new "2.1.2"
3
+ @version ||= Gem::Version.new "2.2.0"
4
4
  end
5
5
  end
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hammer_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Bačovský
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-09-04 00:00:00.000000000 Z
12
+ date: 2020-08-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: clamp
@@ -145,7 +145,7 @@ dependencies:
145
145
  version: 0.2.0
146
146
  description: 'Hammer cli provides universal extendable CLI interface for ruby apps
147
147
 
148
- '
148
+ '
149
149
  email: mbacovsk@redhat.com
150
150
  executables:
151
151
  - hammer
@@ -153,26 +153,26 @@ executables:
153
153
  extensions: []
154
154
  extra_rdoc_files:
155
155
  - doc/commands_extension.md
156
- - doc/commands_modification.md
157
- - doc/creating_apipie_commands.md
158
- - doc/creating_commands.md
156
+ - doc/release_notes.md
159
157
  - doc/design.png
160
- - doc/design.uml
161
- - doc/developer_docs.md
162
- - doc/development_tips.md
163
- - doc/help_modification.md
164
- - doc/i18n.md
158
+ - doc/commands_modification.md
165
159
  - doc/installation.md
160
+ - doc/development_tips.md
161
+ - doc/writing_a_plugin.md
162
+ - doc/output.md
163
+ - doc/developer_docs.md
166
164
  - doc/installation_deb.md
167
- - doc/installation_gem.md
168
- - doc/option_builders.md
169
165
  - doc/option_normalizers.md
170
- - doc/output.md
171
- - doc/review_checklist.md
172
- - doc/writing_a_plugin.md
173
166
  - doc/installation_rpm.md
167
+ - doc/installation_gem.md
168
+ - doc/help_modification.md
169
+ - doc/creating_commands.md
174
170
  - doc/installation_source.md
175
- - doc/release_notes.md
171
+ - doc/option_builders.md
172
+ - doc/i18n.md
173
+ - doc/review_checklist.md
174
+ - doc/creating_apipie_commands.md
175
+ - doc/design.uml
176
176
  - config/cli.modules.d/module_config_template.yml
177
177
  - config/cli_config.template.yml
178
178
  - config/hammer.completion
@@ -394,75 +394,75 @@ required_rubygems_version: !ruby/object:Gem::Requirement
394
394
  - !ruby/object:Gem::Version
395
395
  version: '0'
396
396
  requirements: []
397
- rubygems_version: 3.1.2
397
+ rubygems_version: 3.0.8
398
398
  signing_key:
399
399
  specification_version: 4
400
400
  summary: Universal command-line interface
401
401
  test_files:
402
- - test/functional/defaults_test.rb
403
- - test/functional/help_test.rb
404
- - test/functional/nil_values_test.rb
405
- - test/functional/test_helper.rb
406
- - test/test_helper.rb
407
- - test/unit/abstract_test.rb
408
- - test/unit/apipie/api_connection_test.rb
402
+ - test/unit/messages_test.rb
403
+ - test/unit/exception_handler_test.rb
404
+ - test/unit/modules_test.rb
405
+ - test/unit/connection_test.rb
406
+ - test/unit/completer_test.rb
407
+ - test/unit/csv_parser_test.rb
408
+ - test/unit/option_builder_test.rb
409
+ - test/unit/test_helper.rb
410
+ - test/unit/utils_test.rb
409
411
  - test/unit/apipie/command_test.rb
410
412
  - test/unit/apipie/option_builder_test.rb
411
- - test/unit/apipie/option_definition_test.rb
412
413
  - test/unit/apipie/test_helper.rb
413
- - test/unit/bash_test.rb
414
- - test/unit/ca_cert_manager_test.rb
414
+ - test/unit/apipie/api_connection_test.rb
415
+ - test/unit/apipie/option_definition_test.rb
415
416
  - test/unit/command_extensions_test.rb
416
- - test/unit/completer_test.rb
417
- - test/unit/connection_test.rb
418
- - test/unit/csv_parser_test.rb
417
+ - test/unit/main_test.rb
418
+ - test/unit/options/processor_list_test.rb
419
+ - test/unit/options/option_family_test.rb
420
+ - test/unit/options/validators/dsl_test.rb
421
+ - test/unit/options/sources/command_line_test.rb
422
+ - test/unit/options/sources/saved_defaults_test.rb
423
+ - test/unit/options/matcher_test.rb
424
+ - test/unit/options/option_collector_test.rb
425
+ - test/unit/options/normalizers_test.rb
426
+ - test/unit/options/option_definition_test.rb
427
+ - test/unit/settings_test.rb
428
+ - test/unit/history_test.rb
419
429
  - test/unit/defaults_test.rb
420
- - test/unit/exception_handler_test.rb
430
+ - test/unit/logger_test.rb
431
+ - test/unit/output/formatters_test.rb
432
+ - test/unit/output/record_collection_test.rb
433
+ - test/unit/output/dsl_test.rb
434
+ - test/unit/output/definition_test.rb
435
+ - test/unit/output/output_test.rb
436
+ - test/unit/output/field_filter_test.rb
437
+ - test/unit/output/fields_test.rb
438
+ - test/unit/output/adapter/table_test.rb
439
+ - test/unit/output/adapter/json_test.rb
440
+ - test/unit/output/adapter/abstract_test.rb
441
+ - test/unit/output/adapter/yaml_test.rb
442
+ - test/unit/output/adapter/csv_test.rb
443
+ - test/unit/output/adapter/base_test.rb
444
+ - test/unit/abstract_test.rb
445
+ - test/unit/i18n_test.rb
421
446
  - test/unit/fixtures/apipie/architectures.json
422
447
  - test/unit/fixtures/apipie/documented.json
423
- - test/unit/fixtures/certs/ca_cert.pem
424
- - test/unit/fixtures/certs/non_ca_cert.pem
425
- - test/unit/fixtures/defaults/defaults.yml
426
448
  - test/unit/fixtures/defaults/defaults_dashed.yml
427
- - test/unit/fixtures/json_input/invalid.json
449
+ - test/unit/fixtures/defaults/defaults.yml
428
450
  - test/unit/fixtures/json_input/valid.json
429
- - test/unit/help/builder_test.rb
430
- - test/unit/help/definition/abstract_item_test.rb
431
- - test/unit/help/definition/list_test.rb
432
- - test/unit/help/definition/note_test.rb
451
+ - test/unit/fixtures/json_input/invalid.json
452
+ - test/unit/fixtures/certs/ca_cert.pem
453
+ - test/unit/fixtures/certs/non_ca_cert.pem
454
+ - test/unit/bash_test.rb
433
455
  - test/unit/help/definition/section_test.rb
456
+ - test/unit/help/definition/list_test.rb
434
457
  - test/unit/help/definition/text_test.rb
458
+ - test/unit/help/definition/abstract_item_test.rb
459
+ - test/unit/help/definition/note_test.rb
435
460
  - test/unit/help/definition_test.rb
461
+ - test/unit/help/builder_test.rb
436
462
  - test/unit/help/text_builder_test.rb
437
- - test/unit/history_test.rb
438
- - test/unit/i18n_test.rb
439
- - test/unit/logger_test.rb
440
- - test/unit/main_test.rb
441
- - test/unit/messages_test.rb
442
- - test/unit/modules_test.rb
443
- - test/unit/option_builder_test.rb
444
- - test/unit/options/matcher_test.rb
445
- - test/unit/options/normalizers_test.rb
446
- - test/unit/options/option_collector_test.rb
447
- - test/unit/options/option_definition_test.rb
448
- - test/unit/options/option_family_test.rb
449
- - test/unit/options/processor_list_test.rb
450
- - test/unit/options/sources/command_line_test.rb
451
- - test/unit/options/sources/saved_defaults_test.rb
452
- - test/unit/options/validators/dsl_test.rb
453
- - test/unit/output/adapter/abstract_test.rb
454
- - test/unit/output/adapter/base_test.rb
455
- - test/unit/output/adapter/csv_test.rb
456
- - test/unit/output/adapter/json_test.rb
457
- - test/unit/output/adapter/table_test.rb
458
- - test/unit/output/adapter/yaml_test.rb
459
- - test/unit/output/definition_test.rb
460
- - test/unit/output/dsl_test.rb
461
- - test/unit/output/field_filter_test.rb
462
- - test/unit/output/fields_test.rb
463
- - test/unit/output/formatters_test.rb
464
- - test/unit/output/output_test.rb
465
- - test/unit/output/record_collection_test.rb
466
- - test/unit/settings_test.rb
467
- - test/unit/test_helper.rb
468
- - test/unit/utils_test.rb
463
+ - test/unit/ca_cert_manager_test.rb
464
+ - test/functional/help_test.rb
465
+ - test/functional/test_helper.rb
466
+ - test/functional/nil_values_test.rb
467
+ - test/functional/defaults_test.rb
468
+ - test/test_helper.rb