hammer_cli_foreman 3.7.0 → 3.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/doc/release_notes.md +7 -0
  3. data/lib/hammer_cli_foreman/version.rb +1 -1
  4. data/locale/ca/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  5. data/locale/cs_CZ/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  6. data/locale/de/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  7. data/locale/en/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  8. data/locale/en_GB/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  9. data/locale/es/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  10. data/locale/fr/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  11. data/locale/it/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  12. data/locale/ja/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  13. data/locale/ka/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  14. data/locale/ko/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  15. data/locale/pt_BR/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  16. data/locale/ru/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  17. data/locale/zh_CN/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  18. data/locale/zh_TW/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
  19. data/test/functional/associating_commands_test.rb +2 -2
  20. data/test/functional/commands/list_test.rb +4 -4
  21. data/test/functional/report_template_test.rb +4 -4
  22. data/test/functional/virtual_machine_test.rb +4 -4
  23. data/test/test_helper.rb +0 -1
  24. data/test/unit/api/interactive_basic_auth_test.rb +2 -2
  25. data/test/unit/api/oauth/oauth_authentication_code_grant_test.rb +2 -2
  26. data/test/unit/api/oauth/oauth_password_grant_test.rb +2 -2
  27. data/test/unit/api/session_authenticator_wrapper_test.rb +6 -6
  28. data/test/unit/architecture_test.rb +12 -12
  29. data/test/unit/audit_test.rb +6 -6
  30. data/test/unit/auth_source_external.rb +5 -5
  31. data/test/unit/auth_source_ldap_test.rb +12 -12
  32. data/test/unit/bookmark_test.rb +12 -12
  33. data/test/unit/commands_test.rb +5 -5
  34. data/test/unit/common_parameter_test.rb +10 -10
  35. data/test/unit/compute_profile_test.rb +12 -12
  36. data/test/unit/compute_resource_test.rb +18 -18
  37. data/test/unit/config_report_test.rb +7 -7
  38. data/test/unit/domain_test.rb +16 -16
  39. data/test/unit/exception_handler_test.rb +1 -1
  40. data/test/unit/external_usergroup_test.rb +15 -15
  41. data/test/unit/fact_test.rb +3 -3
  42. data/test/unit/filter_test.rb +18 -18
  43. data/test/unit/helpers/command.rb +1 -1
  44. data/test/unit/helpers/resource_disabled.rb +1 -1
  45. data/test/unit/host_test.rb +35 -35
  46. data/test/unit/hostgroup_test.rb +18 -18
  47. data/test/unit/image_test.rb +15 -15
  48. data/test/unit/location_test.rb +12 -12
  49. data/test/unit/mail_notification_test.rb +6 -6
  50. data/test/unit/media_test.rb +12 -12
  51. data/test/unit/model_test.rb +12 -12
  52. data/test/unit/operating_system_test.rb +16 -16
  53. data/test/unit/option_builders_test.rb +2 -2
  54. data/test/unit/organization_test.rb +12 -12
  55. data/test/unit/output/formatters_test.rb +4 -4
  56. data/test/unit/param_filters_test.rb +2 -2
  57. data/test/unit/partition_table_test.rb +14 -14
  58. data/test/unit/realm_test.rb +12 -12
  59. data/test/unit/role_test.rb +14 -14
  60. data/test/unit/settings_test.rb +5 -5
  61. data/test/unit/smart_proxy_test.rb +14 -14
  62. data/test/unit/subnet_test.rb +12 -12
  63. data/test/unit/template_test.rb +16 -16
  64. data/test/unit/user_test.rb +12 -12
  65. data/test/unit/usergroup_test.rb +12 -12
  66. metadata +29 -27
@@ -9,19 +9,19 @@ describe HammerCLIForeman::User do
9
9
 
10
10
  let(:cmd_module) { HammerCLIForeman::User }
11
11
 
12
- context "ListCommand" do
12
+ describe "ListCommand" do
13
13
  before do
14
14
  ResourceMocks.mock_action_call(:users, :index, [])
15
15
  end
16
16
 
17
17
  let(:cmd) { cmd_module::ListCommand.new("", ctx ) }
18
18
 
19
- context "parameters" do
19
+ describe "parameters" do
20
20
  it_should_accept "no arguments"
21
21
  it_should_accept_search_params
22
22
  end
23
23
 
24
- context "output" do
24
+ describe "output" do
25
25
  let(:expected_record_count) { count_records(cmd.resource.call(:index)) }
26
26
  it_should_print_n_records
27
27
  it_should_print_columns ["Id", "Login", "Name", "Email", "Admin", "Last login", "Authorized by"]
@@ -30,20 +30,20 @@ describe HammerCLIForeman::User do
30
30
  end
31
31
 
32
32
 
33
- context "InfoCommand" do
33
+ describe "InfoCommand" do
34
34
  before do
35
35
  ResourceMocks.users_show
36
36
  end
37
37
 
38
38
  let(:cmd) { cmd_module::InfoCommand.new("", ctx) }
39
39
 
40
- context "parameters" do
40
+ describe "parameters" do
41
41
  it_should_accept "id", ["--id=1"]
42
42
  it_should_accept "login", ["--login=admin"]
43
43
  # it_should_fail_with "no arguments" # TODO: temporarily disabled, parameters are checked in the id resolver
44
44
  end
45
45
 
46
- context "output" do
46
+ describe "output" do
47
47
  with_params ["--id=1"] do
48
48
  it_should_print_n_records 1
49
49
  it_should_print_columns ["Id", "Login", "Name", "Email", "Admin", "Effective admin"]
@@ -54,11 +54,11 @@ describe HammerCLIForeman::User do
54
54
  end
55
55
 
56
56
 
57
- context "CreateCommand" do
57
+ describe "CreateCommand" do
58
58
 
59
59
  let(:cmd) { cmd_module::CreateCommand.new("", ctx) }
60
60
 
61
- context "parameters" do
61
+ describe "parameters" do
62
62
  it_should_accept "all required", ["--login=login", "--mail=mail", "--password=paswd", "--auth-source-id=1"]
63
63
  it_should_accept "all required plus names", ["--login=login", "--firstname=fname", "--lastname=lname", "--mail=mail", "--password=paswd", "--auth-source-id=1"]
64
64
  # it_should_fail_with "login missing", ["--firstname=fname", "--lastname=lname", "--mail=mail", "--password=paswd", "--auth-source-id=1"]
@@ -71,11 +71,11 @@ describe HammerCLIForeman::User do
71
71
  end
72
72
 
73
73
 
74
- context "DeleteCommand" do
74
+ describe "DeleteCommand" do
75
75
 
76
76
  let(:cmd) { cmd_module::DeleteCommand.new("", ctx) }
77
77
 
78
- context "parameters" do
78
+ describe "parameters" do
79
79
  it_should_accept "id", ["--id=1"]
80
80
  it_should_accept "login", ["--login=admin"]
81
81
  # it_should_fail_with "id and login missing", [] # TODO: temporarily disabled, parameters are checked in the id resolver
@@ -84,7 +84,7 @@ describe HammerCLIForeman::User do
84
84
  end
85
85
 
86
86
 
87
- context "UpdateCommand" do
87
+ describe "UpdateCommand" do
88
88
 
89
89
  let(:cmd) { cmd_module::UpdateCommand.new("", ctx) }
90
90
 
@@ -92,7 +92,7 @@ describe HammerCLIForeman::User do
92
92
  HammerCLIForeman::OptionSources::UserParams.any_instance.stubs(:ask_password).returns("password")
93
93
  end
94
94
 
95
- context "parameters" do
95
+ describe "parameters" do
96
96
  it_should_accept "password and current password interactively", ["--login=jane", "--ask-password=true"]
97
97
  it_should_accept "id", ["--id=1"]
98
98
  it_should_accept "login", ["--login=admin"]
@@ -8,21 +8,21 @@ describe HammerCLIForeman::Usergroup do
8
8
  include CommandTestHelper
9
9
 
10
10
 
11
- context "ListCommand" do
11
+ describe "ListCommand" do
12
12
  before do
13
13
  ResourceMocks.mock_action_call(:usergroups, :index, [])
14
14
  end
15
15
 
16
16
  let(:cmd) { HammerCLIForeman::Usergroup::ListCommand.new("", ctx) }
17
17
 
18
- context "parameters" do
18
+ describe "parameters" do
19
19
  it_should_accept "no arguments"
20
20
  it_should_accept_search_params
21
21
  it_should_accept 'organization', ['--organization-id=1']
22
22
  it_should_accept 'location', ['--location-id=1']
23
23
  end
24
24
 
25
- context "output" do
25
+ describe "output" do
26
26
  it_should_print_column "Id"
27
27
  it_should_print_column "Name"
28
28
  it_should_print_column "Admin"
@@ -30,18 +30,18 @@ describe HammerCLIForeman::Usergroup do
30
30
 
31
31
  end
32
32
 
33
- context "InfoCommand" do
33
+ describe "InfoCommand" do
34
34
 
35
35
  let(:cmd) { HammerCLIForeman::Usergroup::InfoCommand.new("", ctx) }
36
36
 
37
- context "parameters" do
37
+ describe "parameters" do
38
38
  it_should_accept "id", ["--id=1"]
39
39
  it_should_accept "name", ["--name=ug"]
40
40
  it_should_accept 'organization', %w[--id=1 --organization-id=1]
41
41
  it_should_accept 'location', %w[--id=1 --location-id=1]
42
42
  end
43
43
 
44
- context "output" do
44
+ describe "output" do
45
45
  with_params ["--id=1"] do
46
46
  it_should_print_column "Id"
47
47
  it_should_print_column "Name"
@@ -55,11 +55,11 @@ describe HammerCLIForeman::Usergroup do
55
55
  end
56
56
  end
57
57
 
58
- context "CreateCommand" do
58
+ describe "CreateCommand" do
59
59
 
60
60
  let(:cmd) { HammerCLIForeman::Usergroup::CreateCommand.new("", ctx) }
61
61
 
62
- context "parameters" do
62
+ describe "parameters" do
63
63
  it_should_accept "name", ["--name=ug"]
64
64
  it_should_accept "name, role ids, user group ids and user ids", ["--name=ug", "--role-ids=1,2,3", "--user-group-ids=1,2,3", "--user-ids=1,2,3"]
65
65
  it_should_accept 'organization', %w[--name=ug --organization-id=1]
@@ -67,11 +67,11 @@ describe HammerCLIForeman::Usergroup do
67
67
  end
68
68
  end
69
69
 
70
- context "DeleteCommand" do
70
+ describe "DeleteCommand" do
71
71
 
72
72
  let(:cmd) { HammerCLIForeman::Usergroup::DeleteCommand.new("", ctx) }
73
73
 
74
- context "parameters" do
74
+ describe "parameters" do
75
75
  it_should_accept "name", ["--name=ug"]
76
76
  it_should_accept "id", ["--id=1"]
77
77
  it_should_accept 'organization', %w[--id=1 --organization-id=1]
@@ -79,11 +79,11 @@ describe HammerCLIForeman::Usergroup do
79
79
  end
80
80
  end
81
81
 
82
- context "UpdateCommand" do
82
+ describe "UpdateCommand" do
83
83
 
84
84
  let(:cmd) { HammerCLIForeman::Usergroup::UpdateCommand.new("", ctx) }
85
85
 
86
- context "parameters" do
86
+ describe "parameters" do
87
87
  it_should_accept "name", ["--name=ug"]
88
88
  it_should_accept "id", ["--id=1"]
89
89
  it_should_accept "name and new name", ["--name=ug", "--new-name=ug2"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hammer_cli_foreman
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.7.0
4
+ version: 3.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomáš Strachota
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-05-23 00:00:00.000000000 Z
12
+ date: 2023-08-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: hammer_cli
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: 3.7.0
20
+ version: 3.8.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: 3.7.0
27
+ version: 3.8.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: apipie-bindings
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -219,6 +219,7 @@ files:
219
219
  - lib/minitest/coverage_reporter.rb
220
220
  - lib/minitest/hammer_coverage_plugin.rb
221
221
  - locale/ca/LC_MESSAGES/hammer-cli-foreman.mo
222
+ - locale/cs_CZ/LC_MESSAGES/hammer-cli-foreman.mo
222
223
  - locale/de/LC_MESSAGES/hammer-cli-foreman.mo
223
224
  - locale/en/LC_MESSAGES/hammer-cli-foreman.mo
224
225
  - locale/en_GB/LC_MESSAGES/hammer-cli-foreman.mo
@@ -226,6 +227,7 @@ files:
226
227
  - locale/fr/LC_MESSAGES/hammer-cli-foreman.mo
227
228
  - locale/it/LC_MESSAGES/hammer-cli-foreman.mo
228
229
  - locale/ja/LC_MESSAGES/hammer-cli-foreman.mo
230
+ - locale/ka/LC_MESSAGES/hammer-cli-foreman.mo
229
231
  - locale/ko/LC_MESSAGES/hammer-cli-foreman.mo
230
232
  - locale/pt_BR/LC_MESSAGES/hammer-cli-foreman.mo
231
233
  - locale/ru/LC_MESSAGES/hammer-cli-foreman.mo
@@ -392,20 +394,23 @@ test_files:
392
394
  - test/data/3.4/foreman_api.json
393
395
  - test/data/README.md
394
396
  - test/functional/architecture_test.rb
395
- - test/functional/associating_commands_test.rb
396
397
  - test/functional/audit_test.rb
397
398
  - test/functional/auth_source_test.rb
399
+ - test/functional/bookmark_test.rb
398
400
  - test/functional/commands/list_test.rb
399
401
  - test/functional/compute_attribute_test.rb
400
402
  - test/functional/compute_profile_test.rb
401
403
  - test/functional/compute_resource_test.rb
402
404
  - test/functional/domain/create_test.rb
403
405
  - test/functional/domain/update_test.rb
406
+ - test/functional/filter_test.rb
404
407
  - test/functional/host_test.rb
405
408
  - test/functional/hostgroup/create_test.rb
406
409
  - test/functional/hostgroup/update_test.rb
407
410
  - test/functional/http_proxy_test.rb
411
+ - test/functional/location_test.rb
408
412
  - test/functional/mail_notification_test.rb
413
+ - test/functional/media_test.rb
409
414
  - test/functional/model_test.rb
410
415
  - test/functional/operating_system_test.rb
411
416
  - test/functional/organization_test.rb
@@ -414,8 +419,8 @@ test_files:
414
419
  - test/functional/ping_test.rb
415
420
  - test/functional/realm_test.rb
416
421
  - test/functional/registration_test.rb
417
- - test/functional/report_template_test.rb
418
422
  - test/functional/role_test.rb
423
+ - test/functional/settings_test.rb
419
424
  - test/functional/ssh_keys_test.rb
420
425
  - test/functional/status_test.rb
421
426
  - test/functional/subnet/create_test.rb
@@ -426,13 +431,9 @@ test_files:
426
431
  - test/functional/user_mail_notification_test.rb
427
432
  - test/functional/user_test.rb
428
433
  - test/functional/usergroup_test.rb
434
+ - test/functional/associating_commands_test.rb
435
+ - test/functional/report_template_test.rb
429
436
  - test/functional/virtual_machine_test.rb
430
- - test/functional/bookmark_test.rb
431
- - test/functional/filter_test.rb
432
- - test/functional/location_test.rb
433
- - test/functional/media_test.rb
434
- - test/functional/settings_test.rb
435
- - test/test_helper.rb
436
437
  - test/unit/api/oauth/oauth_authentication_code_grant_test.rb
437
438
  - test/unit/api/oauth/oauth_password_grant_test.rb
438
439
  - test/unit/api/void_auth_test.rb
@@ -440,52 +441,53 @@ test_files:
440
441
  - test/unit/api/session_authenticator_wrapper_test.rb
441
442
  - test/unit/api_test.rb
442
443
  - test/unit/apipie_resource_mock.rb
444
+ - test/unit/data/test_api.json
445
+ - test/unit/defaults_test.rb
446
+ - test/unit/dependency_resolver_test.rb
447
+ - test/unit/helpers/fake_searchables.rb
448
+ - test/unit/helpers/command.rb
449
+ - test/unit/helpers/resource_disabled.rb
450
+ - test/unit/id_resolver_test.rb
451
+ - test/unit/messages_test.rb
452
+ - test/unit/option_sources/id_params_test.rb
453
+ - test/unit/option_sources/ids_params_test.rb
454
+ - test/unit/output/formatters_test.rb
455
+ - test/unit/sessions_test.rb
456
+ - test/unit/test_helper.rb
457
+ - test/unit/test_output_adapter.rb
443
458
  - test/unit/architecture_test.rb
444
459
  - test/unit/audit_test.rb
445
460
  - test/unit/auth_source_external.rb
446
461
  - test/unit/auth_source_ldap_test.rb
447
462
  - test/unit/bookmark_test.rb
463
+ - test/unit/commands_test.rb
448
464
  - test/unit/common_parameter_test.rb
449
465
  - test/unit/compute_profile_test.rb
450
466
  - test/unit/compute_resource_test.rb
451
467
  - test/unit/config_report_test.rb
452
- - test/unit/data/test_api.json
453
- - test/unit/defaults_test.rb
454
- - test/unit/dependency_resolver_test.rb
455
468
  - test/unit/domain_test.rb
456
469
  - test/unit/exception_handler_test.rb
457
470
  - test/unit/external_usergroup_test.rb
458
471
  - test/unit/fact_test.rb
459
472
  - test/unit/filter_test.rb
460
- - test/unit/helpers/fake_searchables.rb
461
- - test/unit/helpers/resource_disabled.rb
462
- - test/unit/helpers/command.rb
463
473
  - test/unit/host_test.rb
464
474
  - test/unit/hostgroup_test.rb
465
475
  - test/unit/image_test.rb
466
476
  - test/unit/location_test.rb
467
477
  - test/unit/mail_notification_test.rb
468
478
  - test/unit/media_test.rb
469
- - test/unit/messages_test.rb
470
479
  - test/unit/model_test.rb
471
480
  - test/unit/operating_system_test.rb
472
481
  - test/unit/option_builders_test.rb
473
- - test/unit/option_sources/id_params_test.rb
474
- - test/unit/option_sources/ids_params_test.rb
475
482
  - test/unit/organization_test.rb
476
- - test/unit/output/formatters_test.rb
477
483
  - test/unit/param_filters_test.rb
478
484
  - test/unit/partition_table_test.rb
479
485
  - test/unit/realm_test.rb
480
486
  - test/unit/role_test.rb
481
- - test/unit/sessions_test.rb
482
487
  - test/unit/settings_test.rb
483
488
  - test/unit/smart_proxy_test.rb
484
489
  - test/unit/subnet_test.rb
485
490
  - test/unit/template_test.rb
486
- - test/unit/test_helper.rb
487
- - test/unit/test_output_adapter.rb
488
491
  - test/unit/user_test.rb
489
492
  - test/unit/usergroup_test.rb
490
- - test/unit/commands_test.rb
491
- - test/unit/id_resolver_test.rb
493
+ - test/test_helper.rb