shadow_puppet 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/shadow_puppet/manifest.rb +12 -9
- metadata +2 -2
@@ -183,18 +183,21 @@ module ShadowPuppet
|
|
183
183
|
|
184
184
|
#Create an instance method for every type that either creates or references
|
185
185
|
#a resource
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
186
|
+
def self.register_puppet_types
|
187
|
+
Puppet::Type.loadall
|
188
|
+
Puppet::Type.eachtype do |type|
|
189
|
+
#undefine the method rdoc placeholders
|
190
|
+
undef_method(type.name) rescue nil
|
191
|
+
define_method(type.name) do |*args|
|
192
|
+
if args && args.flatten.size == 1
|
193
|
+
reference(type.name, args.first)
|
194
|
+
else
|
195
|
+
new_resource(type, args.first, args.last)
|
196
|
+
end
|
195
197
|
end
|
196
198
|
end
|
197
199
|
end
|
200
|
+
register_puppet_types
|
198
201
|
|
199
202
|
# Returns true if this Manifest <tt>respond_to?</tt> all methods named by
|
200
203
|
# calls to recipe, and if this Manifest has not been executed before.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shadow_puppet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jesse Newland
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-02-
|
12
|
+
date: 2009-02-27 00:00:00 -05:00
|
13
13
|
default_executable: shadow_puppet
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|