foreman_hooks 0.3.8 → 0.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a218348f896e043f637737ed1c14bdbcd14060bd
4
- data.tar.gz: 68eb1264e93c645d1364161558c3c28adb0c63cb
3
+ metadata.gz: 46c0a89abfd88c3504155a968576b0bda74eb5d1
4
+ data.tar.gz: 706af60156c35ae99e53b9c19a7326075d6b938e
5
5
  SHA512:
6
- metadata.gz: d3bcc0e43b0b3661891da6cf79bfeb015684555ad29d7b185495b067606fba11587aa8ba215025b032acd1e2ef2d68b7170c638fcd6127899ae1554e3f36558e
7
- data.tar.gz: df5ed8979e28adf964da737b382825e2697bba28953a02767d7adcf18c8f8a09c20c7799d4144eb801d94bc9f01005dd4cec80b5a642d8f2728dee0fa2dfadcb
6
+ metadata.gz: f613b965f1671fabebc64ea67ce1afbd883f3a17324f21e118c695ea5eb0bdc63398ee928fa2859f3d804c31b3f3a839264750d1fe949be33b5361bb6221c101
7
+ data.tar.gz: 01afb060d70cbec9d50170e40bcef5c8960502fb77ba3ebdfc8d48bb92d944066d0370d485927c2300f9df448ad21848c91b91620a4844b28dcc579a608a9057
data/README.md CHANGED
@@ -31,8 +31,7 @@ Examples:
31
31
  ~foreman/config/hooks/host/managed/create/50_register_system.sh
32
32
  ~foreman/config/hooks/host/managed/destroy/15_cleanup_database.sh
33
33
  ~foreman/config/hooks/smart_proxy/after_create/01_email_operations.sh
34
-
35
- (`host/managed` is for Foreman 1.2+, change to just `host` for Foreman 1.1)
34
+ ~foreman/config/hooks/audited/adapters/active_record/audit/after_create/01_syslog.sh
36
35
 
37
36
  ## SELinux notes
38
37
 
@@ -4,9 +4,11 @@ module ForemanHooks::Util
4
4
  extend ActiveSupport::Concern
5
5
 
6
6
  def render_hook_type
7
- case self
8
- when Host::Managed
7
+ case self.class.name
8
+ when "Host::Managed"
9
9
  'host'
10
+ when "Host::Discovered"
11
+ 'discovered_host'
10
12
  else
11
13
  self.class.name.downcase
12
14
  end
@@ -36,6 +38,7 @@ module ForemanHooks::Util
36
38
  end
37
39
 
38
40
  def exec_hook_int(stdin_data, *args)
41
+ args.map!(&:to_s)
39
42
  output, status = if Open3.respond_to? :capture2e
40
43
  Open3.capture2e(*args.push(:stdin_data => stdin_data))
41
44
  else # 1.8
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_hooks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominic Cleal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-30 00:00:00.000000000 Z
11
+ date: 2015-09-16 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Plugin engine for Foreman that enables running custom hook scripts on
14
14
  Foreman events