foreman_hooks 0.3.6 → 0.3.7

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: ca4c45197b6dd1e9d38ed412e3e2fd9fae3f1844
4
- data.tar.gz: b98aba29653f4882ed38a97828480e3e1e77dd84
3
+ metadata.gz: 97c36beb194d82ae065e7406562726963aaf6879
4
+ data.tar.gz: 67f0434ca73f34dbc158ef028fcf4e2120c5d790
5
5
  SHA512:
6
- metadata.gz: cfcbdfd2c820781b0454923a4d137300a77720f934d3e4b11b0dde3bfedffcbf6d57272d6484b5de8c87e285316217fa911d517b549ad699178655720103fc0c
7
- data.tar.gz: 402e9ed0709d131741786ec441f0904bfbe92d99df96d6bfd17637f2280ef334cb453dc086ce0ad12175b6234df4486214a30db98130cd9cde1b54626a47622e
6
+ metadata.gz: 54368599bd9b7b0624b51be7a574c237609d76b9c60a2f696f4a6947797fe17c4eb2241f7b8c7867614cb119e8b1248514824063d17f9e9c00daa100b6e1507c
7
+ data.tar.gz: 11a59aa886d2d1b6129837c18ecda49e7ea40767c5fc09edf3db3fba4e3934cebd1aef5116ae3b6d756227324cf94a69d78301f1c62b111cae661ab3d83e9a81
@@ -9,7 +9,7 @@ module ForemanHooks::CallbackHooks
9
9
  filter, name = event.to_s.split('_', 2)
10
10
  next unless name
11
11
 
12
- set_callback name, "#{event}_hooks"
12
+ set_callback name.to_sym, filter.to_sym, "#{event}_hooks".to_sym
13
13
  define_method("#{event}_hooks") do
14
14
  Rails.logger.debug "Observed #{event} hook on #{self}"
15
15
  return unless hooks = ForemanHooks.find_hooks(self.class, event)
data/lib/foreman_hooks.rb CHANGED
@@ -55,8 +55,7 @@ module ForemanHooks
55
55
  else
56
56
  hooks
57
57
  end
58
- @events = filtered.values.map(&:keys).flatten.uniq.map(&:to_sym) unless @events
59
- @events
58
+ filtered.values.map(&:keys).flatten.uniq.map(&:to_sym)
60
59
  end
61
60
 
62
61
  def find_hooks(klass, event)
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.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dominic Cleal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-14 00:00:00.000000000 Z
11
+ date: 2014-02-26 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