railsmachine-shadow_facter 0.1.1 → 0.1.2

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.
@@ -118,33 +118,3 @@ module ShadowFacter
118
118
  end
119
119
  end
120
120
  end
121
-
122
- # Return an array of defined namespaces names.
123
- def namespaces()
124
- ShadowFacter::Base.namespaces
125
- end
126
-
127
- # Define a namespace.
128
- def namespace(name, &b)
129
- ShadowFacter::Base.namespace(name, &b)
130
- end
131
-
132
- # Define a fact in Facter using a value or block. Can be confined with a hash
133
- # of Facter keys (namespace_key) and value.
134
- # Examples:
135
- # fact :tea, "oolong"
136
- # fact :tea, "puerh", {:drinks_season => "winter"}
137
- # fact(:rand) { rand }
138
- def fact(key, value=nil, confine_args={}, &b)
139
- ShadowFacter::Base.fact(key, value, confine_args, &b)
140
- end
141
-
142
- # Return an instance of the Facts class for the specified namespace.
143
- def facts(namespace)
144
- ShadowFacter::Base.facts(namespace)
145
- end
146
-
147
- # Execute a system command via Facter.
148
- def exec(command)
149
- Facter::Util::Resolution.exec(command)
150
- end
data/lib/shadow_facter.rb CHANGED
@@ -1,4 +1,33 @@
1
1
  require File.join(File.dirname(__FILE__) + '/shadow_facter', 'base.rb')
2
2
 
3
+ #Return an array of defined namespaces names.
4
+ def namespaces()
5
+ ShadowFacter::Base.namespaces
6
+ end
7
+
8
+ # Define a namespace.
9
+ def namespace(name, &b)
10
+ ShadowFacter::Base.namespace(name, &b)
11
+ end
12
+
13
+ # Define a fact in Facter using a value or block. Can be confined with a hash
14
+ # of Facter keys (namespace_key) and value.
15
+ # Examples:
16
+ # fact :tea, "oolong"
17
+ # fact :tea, "puerh", {:drinks_season => "winter"}
18
+ # fact(:rand) { rand }
19
+ def fact(key, value=nil, confine_args={}, &b)
20
+ ShadowFacter::Base.fact(key, value, confine_args, &b)
21
+ end
22
+
23
+ # Return an instance of the Facts class for the specified namespace.
24
+ def facts(namespace)
25
+ ShadowFacter::Base.facts(namespace)
26
+ end
27
+
28
+ # Execute a system command via Facter.
29
+ def exec(command)
30
+ Facter::Util::Resolution.exec(command)
31
+ end
3
32
 
4
33
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railsmachine-shadow_facter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bradley Taylor
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-01-19 00:00:00 -08:00
12
+ date: 2009-02-20 00:00:00 -08:00
13
13
  default_executable: shadow_facter
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency