foreman_hooks 0.3.10 → 0.3.11

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
  SHA1:
3
- metadata.gz: a89ac7b975601cb22c02b50fe94047bb880e6989
4
- data.tar.gz: 7c631de38f23086fedbc7936acef69b5f365d15a
3
+ metadata.gz: 6f58ca523ae7bc8b6cf7aa5aa431e55313864e7f
4
+ data.tar.gz: f2eca1f34608ea8e1cd7da4ed7f304d1db5c2ed8
5
5
  SHA512:
6
- metadata.gz: 6fb5a5d108bc7ada61a789127f7fab55aed8e8a5ee1b40b6a7c42f342f02bbd60db681fbcfe026a51252f7105a7be7a33b0106cb91ae8bd23047dc905a888ebf
7
- data.tar.gz: efba9aa79b1355ad157613b249c7c84e35dfce71f2317b40edb9b9749deee2d1d9ecee7125d10ef3d94a6aa4fc5d34fab84e7ff9e4b235f4bd0a0c5bef14c0e7
6
+ metadata.gz: 7ddb67b6ceb55bb8d5a0862ef9a46924a7e5403843a1d656475908ddf56c8d91274acb8792885cdaeb37b2cd79615c76fa245f573972c82912753f4b6a70121f
7
+ data.tar.gz: 71c044b7883ba0445a62ac9e9f11641ec9b9ae82fea9116b5bcd972241792a8d8bebf85065f006c7a35796cb566a53eb9689e6c42686bad6e45684fd33e11ce0
data/README.md CHANGED
@@ -87,7 +87,8 @@ documentation.
87
87
 
88
88
  The host object has two additional callbacks that you can use:
89
89
 
90
- * `host/managed/after_build` triggers when a host is put into build mode
90
+ * `host/managed/after_build` triggers when a host is put into build mode (does
91
+ not trigger upon new host creation, even when build flag is set)
91
92
  * `host/managed/before_provision` triggers when a host completes the OS install
92
93
 
93
94
  ## Execution of hooks
@@ -19,7 +19,7 @@ module ForemanHooks::Util
19
19
  def render_hook_json
20
20
  # APIv2 has some pretty good templates. We could extend them later in special cases.
21
21
  # Wrap them in a root node for pre-1.4 compatibility
22
- view_path = Rails.root.join('app', 'views')
22
+ view_path = ActionController::Base.view_paths.collect(&:to_path)
23
23
  json = Rabl.render(self, "api/v2/#{render_hook_type.tableize}/show", :view_path => view_path, :format => :json)
24
24
  %Q|{"#{render_hook_type}":#{json}}|
25
25
  rescue => e
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.10
4
+ version: 0.3.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominic Cleal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-16 00:00:00.000000000 Z
11
+ date: 2016-06-20 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