puppet_factset 0.1.1 → 0.2.0

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: a808ed81117d60d3da9efd520cf9580c3e9587c7
4
- data.tar.gz: 9f1ced3d7607807cbf5133973f2960aef960d8e9
3
+ metadata.gz: b0754749c4c870dcded710129b236ad4ea27af8f
4
+ data.tar.gz: 69547a6d57eff94c09409cab141c5593353da983
5
5
  SHA512:
6
- metadata.gz: 693677fb65bc9f48b46380dfb2b5b05535b0f805a313827c6fac80439300843a2b3b8015e1fc590001a2ecbaf275cca91464440366c21184757308d6a04a634f
7
- data.tar.gz: d99dc198614ba3296f06969071a8e9a71a92e92eb10305c9148308a21809882dc9a1ddb2dce9fa84e144f3a8e6becc6d09663c4ef3b2fc3754fc47a55cd5c3fb
6
+ metadata.gz: c3a9ae9415a6d3fe4171f674c7c5c621d9ec5d513b610943b0f85ea8abbdf0e6492478115e5dad1ca4fe7f133e654190905fbfd3cf429fcdf343b79ae4660fb0
7
+ data.tar.gz: eba0d2c2464e03a5c072d7008f55cd2c556d9fa4946e467d3c1d4ed9483335655b894f320d2cf5aee92fb6634243a686ebd6c0bc0f47b73f3c87b67e69471232
data/README.md CHANGED
@@ -13,7 +13,7 @@ puppet facts > OSNAME-OSVERSION-ARCH.json
13
13
  Where:
14
14
 
15
15
  * OSNAME is the Operating System name, eg `Debian`
16
- * OSVERSION is the Operating System versoin number, eg `7.8`
16
+ * OSVERSION is the Operating System version number, eg `7.8`
17
17
  * ARCH indicates the CPU architecture, eg `32`, `64`, `powerpc`
18
18
 
19
19
  `puppet facts` will give raw json output of every fact which puppet knows about.
@@ -61,6 +61,14 @@ fact_hash = PuppetFactset::factset_hash(system_name)
61
61
  * `system_name` needs to correspond to a file in the factset dir, eg use 'Debian-7.8-64' to access the `'Debian-7.8-64.json'` file.
62
62
  * If required system is absent a `RuntimeError` will be raised
63
63
 
64
+ ### Available Factsets
65
+ To obtain the list of available factsets suitable for use with `factset_hash`:
66
+
67
+ ```ruby
68
+ require 'puppet_factset'
69
+ factsets = PuppetFactset::factsets
70
+ ```
71
+
64
72
  ## Development
65
73
 
66
74
  * RSpec tests are provided, please ensure these pass before and after adding any ruby code to the project
@@ -14,4 +14,11 @@ module PuppetFactset
14
14
  # The facts are tucked away inside the 'values' element so just return that
15
15
  data["values"]
16
16
  end
17
+
18
+ # List the available factsets
19
+ def self.factsets()
20
+ Dir.glob(File.join(factset_dir, '*.json')).map { |f|
21
+ File.basename(f).gsub('.json','')
22
+ }
23
+ end
17
24
  end
@@ -1,3 +1,3 @@
1
1
  module PuppetFactset
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet_factset
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geoff Williams