hammer_cli_foreman_webhooks 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/hammer_cli_foreman_webhooks/version.rb +1 -1
- data/lib/hammer_cli_foreman_webhooks/webhook.rb +1 -0
- data/lib/hammer_cli_foreman_webhooks/webhook_template.rb +15 -0
- data/test/data/3.3/foreman_api.json +1 -0
- data/test/functional/test_helper.rb +11 -0
- data/test/functional/webhook_template_test.rb +63 -0
- data/test/test_helper.rb +18 -0
- metadata +11 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39d7e941934be4b7423126f92dce297e653866a903ea936e6b9551293c0881c0
|
4
|
+
data.tar.gz: 5e39bdea6ab727a502fb9e2a71d5e4382ad420e9c51f2fcabff193a7582f4996
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa5c5cf321e38a1e22046b194c65a47c1ec522de0f7fb86632aff62fd16704eccd0ab256fd0dc650fe4a5294d6d6ae70d18c7591bd300326118cbb9ea7b35eb9
|
7
|
+
data.tar.gz: 810fdf342cceb67558f09ff437e6f1a5819e6c798d485a9344c33c4169b7d881d619961eb4be8377452edb488267e6435d4c803a2cbe8465ec781d364601576b
|
data/README.md
CHANGED
@@ -8,9 +8,9 @@ This Hammer CLI plugin contains set of commands for [foreman_webhooks](
|
|
8
8
|
|
9
9
|
This is the list of which version of Foreman Webhooks is needed to which version of this plugin.
|
10
10
|
|
11
|
-
| hammer_cli_foreman_webhooks | v0.0.1 |
|
12
|
-
|
13
|
-
| foreman_webhooks | v0.0.1 |
|
11
|
+
| hammer_cli_foreman_webhooks | v0.0.1 | v0.0.3 |
|
12
|
+
|-----------------------------|--------|--------|
|
13
|
+
| foreman_webhooks | v0.0.1 | v3.0.2 |
|
14
14
|
|
15
15
|
## Installation
|
16
16
|
|
@@ -23,6 +23,7 @@ module HammerCLIForemanWebhooks
|
|
23
23
|
custom_field Fields::Reference, label: _('Webhook Template'), path: [:webhook_template]
|
24
24
|
field :user, _('User'), Fields::Field, sets: %w[ADDITIONAL ALL]
|
25
25
|
field :verify_sll, _('Verify SSL'), Fields::Boolean, sets: %w[ADDITIONAL ALL]
|
26
|
+
field :proxy_authorization, _('Proxy Authorization'), Fields::Boolean, sets: %w[ADDITIONAL ALL]
|
26
27
|
field :ssl_ca_certs, _('X509 Certification Authorities'), Fields::Text, sets: %w[ADDITIONAL ALL]
|
27
28
|
collection :http_headers, _('HTTP Headers'), sets: %w[ADDITIONAL ALL] do
|
28
29
|
custom_field Fields::KeyValue
|
@@ -95,6 +95,21 @@ module HammerCLIForemanWebhooks
|
|
95
95
|
build_options
|
96
96
|
end
|
97
97
|
|
98
|
+
class ExportCommand < HammerCLIForeman::DownloadCommand
|
99
|
+
command_name "export"
|
100
|
+
action :export
|
101
|
+
|
102
|
+
def saved_response_message(filepath)
|
103
|
+
_("The webhook template has been saved to %{path}.") % { path: filepath }
|
104
|
+
end
|
105
|
+
|
106
|
+
def default_filename
|
107
|
+
"Webhook Template-#{Time.new.strftime("%Y-%m-%d")}.txt"
|
108
|
+
end
|
109
|
+
|
110
|
+
build_options
|
111
|
+
end
|
112
|
+
|
98
113
|
autoload_subcommands
|
99
114
|
end
|
100
115
|
end
|