hammer_cli_foreman_webhooks 0.0.1 → 0.0.4

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: 0feb157669e6b414e8b3a9ac20b2a6f02bd1c070cf8e8c29a57c8e80e7c7420d
4
- data.tar.gz: 51b5e1e238c9218dac0968f1127eb45ce2e1b52c51e08babda53d69241237efb
3
+ metadata.gz: f3349e5ec869114bfd9b702fa6f1e43204ec39b63d47dd0a2557fdc071fab3e1
4
+ data.tar.gz: 00424fc9386abcd61e9aee533b73b2dbce63dfafaf46cc5f59303e826b75455a
5
5
  SHA512:
6
- metadata.gz: 25f6a72ed3e8d8b5c6ed21b2d5da48bdf49c2f2d56a35b479167832a88191a03d81e51f29d83f384c2b0e8fdda185a7d70033be397b3a78e5639a027e7b1c0bc
7
- data.tar.gz: 5133fc734abaef5a43a5690b4929817c5e2c49cd606108966590c78d526824d606bb7b44ae809636b27633147de5abba57aac720f499549735ba9d68f80398d6
6
+ metadata.gz: 81d6d4db570f2e88a9706cf79a579488b86d690848dacc52101ec3c45fd487b2643879bc2bb9e558f63764ecf7b31f9810111912668ec14f37b1bf6267c5bdda
7
+ data.tar.gz: cdc9dcf879643d4d4aefbd7673393f8e9bda5d0e2035be834604bb6e408715f34772b90f2fea5b914b4d5a94a0f48e2e9b5edb6da2621e14bc67f5861a12c672
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
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module HammerCLIForemanWebhooks
4
4
  def self.version
5
- @version ||= Gem::Version.new '0.0.1'
5
+ @version ||= Gem::Version.new '0.0.4'
6
6
  end
7
7
  end
@@ -21,10 +21,11 @@ module HammerCLIForemanWebhooks
21
21
  field :http_method, _('HTTP Method')
22
22
  field :http_content_type, _('HTTP Content Type')
23
23
  custom_field Fields::Reference, label: _('Webhook Template'), path: [:webhook_template]
24
- field :user, _('User'), Fields::Field, sets: %w[ADDITIONAL ALL]
25
- field :verify_sll, _('Verify SSL'), Fields::Boolean, sets: %w[ADDITIONAL ALL]
24
+ field :user, _('User'), Fields::Field
25
+ field :verify_ssl, _('Verify SSL'), Fields::Boolean
26
+ field :proxy_authorization, _('Proxy Authorization'), Fields::Boolean
26
27
  field :ssl_ca_certs, _('X509 Certification Authorities'), Fields::Text, sets: %w[ADDITIONAL ALL]
27
- collection :http_headers, _('HTTP Headers'), sets: %w[ADDITIONAL ALL] do
28
+ collection :http_headers, _('HTTP Headers') do
28
29
  custom_field Fields::KeyValue
29
30
  end
30
31
  HammerCLIForeman::References.timestamps(self)
@@ -41,7 +42,7 @@ module HammerCLIForemanWebhooks
41
42
 
42
43
  build_options without: %i[ssl_ca_certs http_headers]
43
44
 
44
- extend_with(HammerCLIForemanWebhooks::CommandExtensions::Webhook.new(only: :options))
45
+ extend_with(HammerCLIForemanWebhooks::CommandExtensions::Webhook.new(only: %i[option request_params]))
45
46
  end
46
47
 
47
48
  class UpdateCommand < HammerCLIForeman::UpdateCommand
@@ -50,7 +51,7 @@ module HammerCLIForemanWebhooks
50
51
 
51
52
  build_options without: %i[ssl_ca_certs http_headers]
52
53
 
53
- extend_with(HammerCLIForemanWebhooks::CommandExtensions::Webhook.new(only: :options))
54
+ extend_with(HammerCLIForemanWebhooks::CommandExtensions::Webhook.new(only: %i[option request_params]))
54
55
  end
55
56
 
56
57
  class DeleteCommand < HammerCLIForeman::DeleteCommand
@@ -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