hammer_cli 3.5.0 → 3.6.0

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: 0702e6ad522b20708785e9393b33010612d7a3f6875197e90796751d3b297f4e
4
- data.tar.gz: cde2f105edd783de0e47539ead825a294971ddc5366dd8edc866f3765048c96a
3
+ metadata.gz: a6293c3d040b5065886e9b590864901ce167d8599cb09e1d2acb4c0f941aae0f
4
+ data.tar.gz: e5f30fd542b84ca83f3bed8748d0914cc44efeccf6c85c22a17c6ef1895b5d0f
5
5
  SHA512:
6
- metadata.gz: f8c663c5ab346b8dc1043e54c61dbaa1f981123ddef7cc6a03a871928b8398a2491912a5e859e94dd258459e1bc044574ed41fff1508cd66ee077459236d5d68
7
- data.tar.gz: 19b0ae03079285868c832bfbedd6f50ade0f544fe5b93397fa772b88b0a823c6f07093d31aba758dc2b57aa5fa3ba1eb2a4daf0ba0e993f4ac8261a5e9be3c98
6
+ metadata.gz: e137dc396915144be972cae6b0824862d68536084d7d2670829e7f895f711e7d214e15f1214f0722657898bc45654284689ed98858f23d022472747bec05500e
7
+ data.tar.gz: e48ab29d2b54d9ef05bfc89839597dd9ecff9f2538509a638420cf487f971f7919b51a7720200c7a0fdf1904445f1c52bdd01a1e0d9eadad4199251870db0fbc
data/doc/release_notes.md CHANGED
@@ -1,5 +1,11 @@
1
1
  Release notes
2
2
  =============
3
+ ### 3.6.0 (2023-02-23)
4
+ * Update apipie-bindings to 0.6.0
5
+ * Include makefile.def in the gem
6
+ * Correct mocha inclusion in tests
7
+ * Bump to 3.6.0-develop
8
+
3
9
  ### 3.5.0 (2022-10-31)
4
10
  * Bump to 3.5.0-develop
5
11
 
@@ -1,5 +1,5 @@
1
1
  module HammerCLI
2
2
  def self.version
3
- @version ||= Gem::Version.new "3.5.0"
3
+ @version ||= Gem::Version.new "3.6.0"
4
4
  end
5
5
  end
@@ -0,0 +1,77 @@
1
+ #
2
+ # Definition of common Makefile tasks for PO merging and MO generation.
3
+ #
4
+ # Run make help to list available targets
5
+ #
6
+
7
+ POTFILE = $(DOMAIN).pot
8
+ MOFILE = $(DOMAIN).mo
9
+ POFILES = $(shell find . -name '$(DOMAIN).po')
10
+ MOFILES = $(patsubst %.po,%.mo,$(POFILES))
11
+ POXFILES = $(patsubst %.po,%.pox,$(POFILES))
12
+ EDITFILES = $(patsubst %.po,%.edit.po,$(POFILES))
13
+ TIMESTAMPFILES = $(patsubst %.po,%.po.time_stamp,$(POFILES))
14
+
15
+ %.mo: %.po
16
+ mkdir -p $(shell dirname $@)/LC_MESSAGES
17
+ msgfmt -o $(shell dirname $@)/LC_MESSAGES/$(MOFILE) $<
18
+
19
+ .PHONY: all-mo
20
+ all-mo: $(MOFILES) ## Generate MO files from PO files (default)
21
+
22
+ # Check for malformed strings
23
+ %.pox: %.po
24
+ @command -v pofilter >/dev/null 2>&1 || { echo "Command pofilter not found. Make sure you have translate-toolkit installed." >&2; exit 1; }
25
+ msgfmt -c $<
26
+ pofilter --nofuzzy -t variables -t blank -t urls -t emails -t long -t newlines \
27
+ -t endwhitespace -t endpunc -t puncspacing -t options -t printf -t validchars --gnome $< > $@;
28
+ cat $@
29
+ ! grep -q msgid $@
30
+
31
+ .PHONY: check
32
+ check: $(POXFILES) ## Check translations using translate-tool, run make with -k to skip errors and execute for all languages
33
+
34
+ .PHONY: uniq-po
35
+ uniq-po: ## Unify duplicate translations in .po files
36
+ for f in $(shell find ./ -name "*.po") ; do \
37
+ msguniq $$f -o $$f ; \
38
+ done
39
+
40
+ %.edit.po:
41
+ touch $@
42
+
43
+ # Pull translaions from transifex
44
+ .PHONY: tx-pull
45
+ tx-pull: $(EDITFILES)
46
+ @command -v tx >/dev/null 2>&1 || { echo "Command tx not found. Make sure you have transifex-client installed and configured." >&2; exit 1; }
47
+ tx pull -f
48
+ for f in $(EDITFILES); do \
49
+ sed -i 's/^\("Project-Id-Version: \).*$$/\1$(DOMAIN) $(VERSION)\\n"/' $$f; \
50
+ done
51
+
52
+ # Merge .edit.po into .po
53
+ .PHONY: update-po
54
+ update-po:
55
+ for f in $(EDITFILES); do \
56
+ msgcat --use-first --no-location $$f $${f//.edit/} > $${f//.edit/}; \
57
+ done
58
+
59
+ # Extract strings and update the .pot, prepare .edit.po files
60
+ .PHONY: extract-strings
61
+ extract-strings:
62
+ bundle exec rake gettext:find
63
+
64
+ .PHONY: tx-update
65
+ tx-update: extract-strings tx-pull update-po $(MOFILES) ## Download and merge translations from Transifex
66
+ git add ../locale
67
+ git commit -m "i18n - extracting new, pulling from tx"
68
+ @echo Changes commited!
69
+
70
+ .PHONY: clean
71
+ clean: ## Clean everything, removes *.edit.po, *.po.timestamp and *.pox files
72
+ rm -f $(EDITFILES) $(TIMESTAMPFILES) $(POXFILES)
73
+
74
+ .PHONY: help
75
+ help: ## This help message
76
+ @echo -e "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s :)"
77
+
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
data/man/hammer.1.gz CHANGED
Binary file
data/test/test_helper.rb CHANGED
@@ -11,7 +11,7 @@ SimpleCov.root Pathname.new(File.dirname(__FILE__) + "../../../")
11
11
  require 'minitest/autorun'
12
12
  require 'minitest/spec'
13
13
  require "minitest-spec-context"
14
- require "mocha/setup"
14
+ require "mocha/minitest"
15
15
 
16
16
  require 'hammer_cli'
17
17
  require 'hammer_cli/logger'
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hammer_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.0
4
+ version: 3.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Bačovský
8
8
  - Tomáš Strachota
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-10-31 00:00:00.000000000 Z
12
+ date: 2023-02-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: clamp
@@ -135,47 +135,47 @@ dependencies:
135
135
  requirements:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
- version: 0.5.0
138
+ version: 0.6.0
139
139
  type: :runtime
140
140
  prerelease: false
141
141
  version_requirements: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - ">="
144
144
  - !ruby/object:Gem::Version
145
- version: 0.5.0
145
+ version: 0.6.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
152
152
  - hammer-complete
153
153
  extensions: []
154
154
  extra_rdoc_files:
155
+ - doc/commands_extension.md
156
+ - doc/commands_modification.md
155
157
  - doc/creating_apipie_commands.md
158
+ - doc/creating_commands.md
156
159
  - doc/design.png
157
160
  - doc/design.uml
161
+ - doc/developer_docs.md
158
162
  - doc/development_tips.md
163
+ - doc/help_modification.md
159
164
  - doc/i18n.md
165
+ - doc/installation.md
160
166
  - doc/installation_deb.md
161
167
  - doc/installation_gem.md
168
+ - doc/installation_rpm.md
169
+ - doc/installation_source.md
162
170
  - doc/option_builders.md
163
171
  - doc/option_normalizers.md
164
- - doc/writing_a_plugin.md
165
- - doc/installation_source.md
166
- - doc/creating_commands.md
167
- - doc/release_notes.md
168
- - doc/commands_extension.md
169
- - doc/commands_modification.md
170
- - doc/developer_docs.md
171
- - doc/help_modification.md
172
- - doc/installation.md
173
- - doc/installation_rpm.md
174
172
  - doc/output.md
175
173
  - doc/review_checklist.md
174
+ - doc/writing_a_plugin.md
175
+ - doc/release_notes.md
176
176
  - config/cli.modules.d/module_config_template.yml
177
- - config/hammer.completion
178
177
  - config/cli_config.template.yml
178
+ - config/hammer.completion
179
179
  - README.md
180
180
  files:
181
181
  - LICENSE
@@ -294,6 +294,7 @@ files:
294
294
  - lib/hammer_cli/utils.rb
295
295
  - lib/hammer_cli/verbosity.rb
296
296
  - lib/hammer_cli/version.rb
297
+ - locale/Makefile.def
297
298
  - locale/ca/LC_MESSAGES/hammer-cli.mo
298
299
  - locale/de/LC_MESSAGES/hammer-cli.mo
299
300
  - locale/en/LC_MESSAGES/hammer-cli.mo
@@ -379,7 +380,7 @@ homepage: https://github.com/theforeman/hammer-cli
379
380
  licenses:
380
381
  - GPL-3.0
381
382
  metadata: {}
382
- post_install_message:
383
+ post_install_message:
383
384
  rdoc_options: []
384
385
  require_paths:
385
386
  - lib
@@ -394,8 +395,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
394
395
  - !ruby/object:Gem::Version
395
396
  version: '0'
396
397
  requirements: []
397
- rubygems_version: 3.1.2
398
- signing_key:
398
+ rubygems_version: 3.1.6
399
+ signing_key:
399
400
  specification_version: 4
400
401
  summary: Universal command-line interface
401
402
  test_files:
@@ -404,32 +405,36 @@ test_files:
404
405
  - test/functional/nil_values_test.rb
405
406
  - test/functional/test_helper.rb
406
407
  - test/test_helper.rb
408
+ - test/unit/abstract_test.rb
409
+ - test/unit/apipie/api_connection_test.rb
407
410
  - test/unit/apipie/command_test.rb
411
+ - test/unit/apipie/option_builder_test.rb
408
412
  - test/unit/apipie/option_definition_test.rb
409
413
  - test/unit/apipie/test_helper.rb
410
- - test/unit/apipie/api_connection_test.rb
411
- - test/unit/apipie/option_builder_test.rb
414
+ - test/unit/bash_test.rb
412
415
  - test/unit/ca_cert_manager_test.rb
416
+ - test/unit/command_extensions_test.rb
413
417
  - test/unit/completer_test.rb
414
418
  - test/unit/connection_test.rb
415
419
  - test/unit/csv_parser_test.rb
416
420
  - test/unit/defaults_test.rb
417
- - test/unit/fixtures/apipie/documented.json
421
+ - test/unit/exception_handler_test.rb
418
422
  - test/unit/fixtures/apipie/architectures.json
423
+ - test/unit/fixtures/apipie/documented.json
419
424
  - test/unit/fixtures/certs/ca_cert.pem
420
425
  - test/unit/fixtures/certs/non_ca_cert.pem
421
426
  - test/unit/fixtures/defaults/defaults.yml
422
427
  - test/unit/fixtures/defaults/defaults_dashed.yml
423
428
  - test/unit/fixtures/json_input/invalid.json
424
429
  - test/unit/fixtures/json_input/valid.json
430
+ - test/unit/help/builder_test.rb
425
431
  - test/unit/help/definition/abstract_item_test.rb
426
- - test/unit/help/definition/section_test.rb
427
432
  - test/unit/help/definition/list_test.rb
428
433
  - test/unit/help/definition/note_test.rb
434
+ - test/unit/help/definition/section_test.rb
429
435
  - test/unit/help/definition/text_test.rb
430
436
  - test/unit/help/definition_test.rb
431
437
  - test/unit/help/text_builder_test.rb
432
- - test/unit/help/builder_test.rb
433
438
  - test/unit/history_test.rb
434
439
  - test/unit/i18n_test.rb
435
440
  - test/unit/logger_test.rb
@@ -438,31 +443,27 @@ test_files:
438
443
  - test/unit/modules_test.rb
439
444
  - test/unit/option_builder_test.rb
440
445
  - test/unit/options/matcher_test.rb
446
+ - test/unit/options/normalizers_test.rb
441
447
  - test/unit/options/option_collector_test.rb
448
+ - test/unit/options/option_definition_test.rb
449
+ - test/unit/options/option_family_test.rb
442
450
  - test/unit/options/processor_list_test.rb
443
451
  - test/unit/options/sources/command_line_test.rb
444
452
  - test/unit/options/sources/saved_defaults_test.rb
445
453
  - test/unit/options/validators/dsl_test.rb
446
- - test/unit/options/option_family_test.rb
447
- - test/unit/options/option_definition_test.rb
448
- - test/unit/options/normalizers_test.rb
449
454
  - test/unit/output/adapter/abstract_test.rb
450
455
  - test/unit/output/adapter/base_test.rb
451
456
  - test/unit/output/adapter/csv_test.rb
452
457
  - test/unit/output/adapter/json_test.rb
453
458
  - test/unit/output/adapter/table_test.rb
454
459
  - test/unit/output/adapter/yaml_test.rb
455
- - test/unit/output/dsl_test.rb
456
- - test/unit/output/fields_test.rb
457
- - test/unit/output/record_collection_test.rb
458
460
  - test/unit/output/definition_test.rb
461
+ - test/unit/output/dsl_test.rb
459
462
  - test/unit/output/field_filter_test.rb
463
+ - test/unit/output/fields_test.rb
460
464
  - test/unit/output/formatters_test.rb
461
465
  - test/unit/output/output_test.rb
466
+ - test/unit/output/record_collection_test.rb
462
467
  - test/unit/settings_test.rb
463
468
  - test/unit/test_helper.rb
464
469
  - test/unit/utils_test.rb
465
- - test/unit/bash_test.rb
466
- - test/unit/exception_handler_test.rb
467
- - test/unit/abstract_test.rb
468
- - test/unit/command_extensions_test.rb