hammer_cli_foreman 2.1.0 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/release_notes.md +33 -0
- data/doc/testing.md +13 -0
- data/lib/hammer_cli_foreman.rb +1 -5
- data/lib/hammer_cli_foreman/api/connection.rb +1 -18
- data/lib/hammer_cli_foreman/api/session_authenticator_wrapper.rb +0 -1
- data/lib/hammer_cli_foreman/associating_commands.rb +4 -5
- data/lib/hammer_cli_foreman/audit.rb +7 -0
- data/lib/hammer_cli_foreman/auth.rb +4 -4
- data/lib/hammer_cli_foreman/command_extensions/ping.rb +10 -1
- data/lib/hammer_cli_foreman/commands.rb +3 -1
- data/lib/hammer_cli_foreman/compute_resource/ovirt.rb +1 -0
- data/lib/hammer_cli_foreman/hosts/common_update_options.rb +16 -9
- data/lib/hammer_cli_foreman/id_resolver.rb +2 -2
- data/lib/hammer_cli_foreman/location.rb +2 -0
- data/lib/hammer_cli_foreman/option_builders.rb +1 -1
- data/lib/hammer_cli_foreman/organization.rb +2 -0
- data/lib/hammer_cli_foreman/output/fields.rb +1 -1
- data/lib/hammer_cli_foreman/output/formatters.rb +1 -1
- data/lib/hammer_cli_foreman/ping.rb +20 -11
- data/lib/hammer_cli_foreman/references.rb +16 -0
- data/lib/hammer_cli_foreman/sessions.rb +1 -3
- data/lib/hammer_cli_foreman/settings.rb +14 -0
- data/lib/hammer_cli_foreman/testing/api_expectations.rb +10 -0
- data/lib/hammer_cli_foreman/user.rb +4 -0
- data/lib/hammer_cli_foreman/user_mail_notification.rb +51 -0
- data/lib/hammer_cli_foreman/version.rb +1 -1
- data/lib/minitest/coverage_reporter.rb +94 -0
- data/lib/minitest/hammer_coverage_plugin.rb +19 -0
- data/locale/ca/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/de/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/en/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/en_GB/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/es/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/fr/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/it/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/ja/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/ko/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/pt_BR/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/ru/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/zh_CN/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/locale/zh_TW/LC_MESSAGES/hammer-cli-foreman.mo +0 -0
- data/test/data/2.1/foreman_api.json +1 -1
- data/test/functional/audit_test.rb +86 -63
- data/test/functional/commands/list_test.rb +11 -11
- data/test/functional/compute_profile_test.rb +4 -2
- data/test/functional/host_test.rb +29 -18
- data/test/functional/http_proxy_test.rb +1 -4
- data/test/functional/location_test.rb +134 -0
- data/test/functional/media_test.rb +130 -0
- data/test/functional/organization_test.rb +52 -0
- data/test/functional/realm_test.rb +103 -0
- data/test/functional/role_test.rb +9 -12
- data/test/functional/settings_test.rb +57 -1
- data/test/functional/user_mail_notification_test.rb +89 -0
- data/test/functional/user_test.rb +39 -0
- data/test/reports/TEST-Minitest-Result.xml +4344 -0
- data/test/test_helper.rb +5 -2
- data/test/unit/api/interactive_basic_auth_test.rb +3 -1
- data/test/unit/api/oauth/oauth_authentication_code_grant_test.rb +2 -2
- data/test/unit/api/oauth/oauth_password_grant_test.rb +2 -2
- data/test/unit/api_test.rb +3 -4
- data/test/unit/apipie_resource_mock.rb +4 -4
- data/test/unit/audit_test.rb +1 -0
- data/test/unit/commands_test.rb +19 -19
- data/test/unit/common_parameter_test.rb +1 -1
- data/test/unit/dependency_resolver_test.rb +4 -4
- data/test/unit/exception_handler_test.rb +13 -13
- data/test/unit/helpers/command.rb +5 -5
- data/test/unit/helpers/resource_disabled.rb +2 -2
- data/test/unit/host_test.rb +2 -2
- data/test/unit/id_resolver_test.rb +23 -23
- data/test/unit/media_test.rb +1 -1
- data/test/unit/option_builders_test.rb +49 -49
- data/test/unit/option_sources/id_params_test.rb +2 -2
- data/test/unit/option_sources/ids_params_test.rb +2 -2
- data/test/unit/output/formatters_test.rb +21 -21
- data/test/unit/param_filters_test.rb +17 -17
- data/test/unit/partition_table_test.rb +2 -2
- data/test/unit/role_test.rb +2 -2
- data/test/unit/sessions_test.rb +26 -37
- data/test/unit/template_test.rb +1 -1
- metadata +15 -7
- data/lib/hammer_cli_foreman/trend.rb +0 -47
- data/test/functional/trend_test.rb +0 -22
data/test/unit/template_test.rb
CHANGED
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: 2.
|
4
|
+
version: 2.3.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: 2020-
|
12
|
+
date: 2020-11-03 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: 2.
|
20
|
+
version: 2.3.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: 2.
|
27
|
+
version: 2.3.0
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: apipie-bindings
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -211,11 +211,13 @@ files:
|
|
211
211
|
- lib/hammer_cli_foreman/task_helper.rb
|
212
212
|
- lib/hammer_cli_foreman/template.rb
|
213
213
|
- lib/hammer_cli_foreman/testing/api_expectations.rb
|
214
|
-
- lib/hammer_cli_foreman/trend.rb
|
215
214
|
- lib/hammer_cli_foreman/user.rb
|
215
|
+
- lib/hammer_cli_foreman/user_mail_notification.rb
|
216
216
|
- lib/hammer_cli_foreman/usergroup.rb
|
217
217
|
- lib/hammer_cli_foreman/version.rb
|
218
218
|
- lib/hammer_cli_foreman/virtual_machine.rb
|
219
|
+
- lib/minitest/coverage_reporter.rb
|
220
|
+
- lib/minitest/hammer_coverage_plugin.rb
|
219
221
|
- locale/ca/LC_MESSAGES/hammer-cli-foreman.mo
|
220
222
|
- locale/de/LC_MESSAGES/hammer-cli-foreman.mo
|
221
223
|
- locale/en/LC_MESSAGES/hammer-cli-foreman.mo
|
@@ -259,10 +261,12 @@ files:
|
|
259
261
|
- test/functional/http_proxy_test.rb
|
260
262
|
- test/functional/location_test.rb
|
261
263
|
- test/functional/mail_notification_test.rb
|
264
|
+
- test/functional/media_test.rb
|
262
265
|
- test/functional/organization_test.rb
|
263
266
|
- test/functional/personal_access_token_test.rb
|
264
267
|
- test/functional/ping_test.rb
|
265
268
|
- test/functional/proxy_test.rb
|
269
|
+
- test/functional/realm_test.rb
|
266
270
|
- test/functional/report_template_test.rb
|
267
271
|
- test/functional/role_test.rb
|
268
272
|
- test/functional/settings_test.rb
|
@@ -273,9 +277,10 @@ files:
|
|
273
277
|
- test/functional/subnet/update_test.rb
|
274
278
|
- test/functional/template_test.rb
|
275
279
|
- test/functional/test_helper.rb
|
276
|
-
- test/functional/
|
280
|
+
- test/functional/user_mail_notification_test.rb
|
277
281
|
- test/functional/user_test.rb
|
278
282
|
- test/functional/virtual_machine_test.rb
|
283
|
+
- test/reports/TEST-Minitest-Result.xml
|
279
284
|
- test/test_helper.rb
|
280
285
|
- test/unit/api/interactive_basic_auth_test.rb
|
281
286
|
- test/unit/api/oauth/oauth_authentication_code_grant_test.rb
|
@@ -432,13 +437,16 @@ test_files:
|
|
432
437
|
- test/data/1.16/foreman_api.json
|
433
438
|
- test/functional/http_proxy_test.rb
|
434
439
|
- test/functional/commands/list_test.rb
|
440
|
+
- test/functional/user_mail_notification_test.rb
|
435
441
|
- test/functional/user_test.rb
|
442
|
+
- test/functional/realm_test.rb
|
436
443
|
- test/functional/personal_access_token_test.rb
|
437
444
|
- test/functional/audit_test.rb
|
438
445
|
- test/functional/test_helper.rb
|
439
446
|
- test/functional/mail_notification_test.rb
|
440
447
|
- test/functional/ping_test.rb
|
441
448
|
- test/functional/smart_class_parameter_test.rb
|
449
|
+
- test/functional/media_test.rb
|
442
450
|
- test/functional/role_test.rb
|
443
451
|
- test/functional/location_test.rb
|
444
452
|
- test/functional/hostgroup/create_test.rb
|
@@ -452,7 +460,6 @@ test_files:
|
|
452
460
|
- test/functional/compute_resource_test.rb
|
453
461
|
- test/functional/compute_attribute_test.rb
|
454
462
|
- test/functional/filter_test.rb
|
455
|
-
- test/functional/trend_test.rb
|
456
463
|
- test/functional/report_template_test.rb
|
457
464
|
- test/functional/compute_profile_test.rb
|
458
465
|
- test/functional/host_test.rb
|
@@ -463,3 +470,4 @@ test_files:
|
|
463
470
|
- test/functional/virtual_machine_test.rb
|
464
471
|
- test/functional/bookmark_test.rb
|
465
472
|
- test/test_helper.rb
|
473
|
+
- test/reports/TEST-Minitest-Result.xml
|
@@ -1,47 +0,0 @@
|
|
1
|
-
module HammerCLIForeman
|
2
|
-
|
3
|
-
class Trend < HammerCLIForeman::Command
|
4
|
-
|
5
|
-
resource :trends
|
6
|
-
|
7
|
-
class ListCommand < HammerCLIForeman::ListCommand
|
8
|
-
output do
|
9
|
-
field :id, _("Id")
|
10
|
-
field :name, _("Name")
|
11
|
-
field :label, _("Label")
|
12
|
-
end
|
13
|
-
|
14
|
-
build_options
|
15
|
-
end
|
16
|
-
|
17
|
-
class CreateCommand < HammerCLIForeman::CreateCommand
|
18
|
-
success_message _("Trend for %<trendable_type>s created.")
|
19
|
-
failure_message _("Could not create the trend")
|
20
|
-
|
21
|
-
build_options
|
22
|
-
end
|
23
|
-
|
24
|
-
class DeleteCommand < HammerCLIForeman::DeleteCommand
|
25
|
-
success_message _("Trend for %<trendable_type>s deleted.")
|
26
|
-
failure_message _("Could not delete the trend")
|
27
|
-
|
28
|
-
build_options
|
29
|
-
end
|
30
|
-
|
31
|
-
class InfoCommand < HammerCLIForeman::InfoCommand
|
32
|
-
output do
|
33
|
-
field :id, _('Id')
|
34
|
-
field :name, _('Name')
|
35
|
-
field :label, _("Label")
|
36
|
-
field :trendable_type, _('Type')
|
37
|
-
HammerCLIForeman::References.taxonomies(self)
|
38
|
-
HammerCLIForeman::References.timestamps(self)
|
39
|
-
end
|
40
|
-
|
41
|
-
build_options
|
42
|
-
end
|
43
|
-
|
44
|
-
autoload_subcommands
|
45
|
-
end
|
46
|
-
end
|
47
|
-
|
@@ -1,22 +0,0 @@
|
|
1
|
-
require File.join(File.dirname(__FILE__), 'test_helper')
|
2
|
-
|
3
|
-
describe 'trend' do
|
4
|
-
describe 'list' do
|
5
|
-
before do
|
6
|
-
@cmd = %w(trend list)
|
7
|
-
@trends =
|
8
|
-
[{
|
9
|
-
id: 1,
|
10
|
-
label: "Operatingsystem",
|
11
|
-
trendable_type: "Operatingsystem",
|
12
|
-
name: "os_trend" }]
|
13
|
-
end
|
14
|
-
|
15
|
-
it 'should return a list of trends' do
|
16
|
-
api_expects(:trends, :index, 'List trends').returns(@trends)
|
17
|
-
|
18
|
-
result = run_cmd(@cmd)
|
19
|
-
result.exit_code.must_equal HammerCLI::EX_OK
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|