hiera-postgres-backend 0.0.4 → 0.0.5

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: ae0eae161bce8929542a785a6edf2c43391c88de
4
- data.tar.gz: ededbec5f1d0b38538f5c0e33982cf20d3e3f942
3
+ metadata.gz: 5a6f8d82771db81ad3dac6e646aeab6377afefa4
4
+ data.tar.gz: 03c3483be3bb3c6f4bac236225aade9f3b82658d
5
5
  SHA512:
6
- metadata.gz: 8d173d87da3823cb9772f287248d16b88cd44748260d89123258cbab74d78199a6dc92a0c7c71b06fee7f6f0cea72a9a82e145fb867a809249239b3c90007bd9
7
- data.tar.gz: e1846468968bdb6e51192c810aa56f69304538e6932e6cf4729b7c8a5988e507bda02ea7286c42c73b61224b5d8617bbc2611d4a6ae33f481837497319954f56
6
+ metadata.gz: 61f9fdd355fff6886ccda2af914192723d62bbc453ef70f2fac7417afef49bf915d54dd8a3fbcad93ea1f0fada57fc594b8a70c10183f350f61dc16cda145fa8
7
+ data.tar.gz: e38f5a5678d2146818abd63444790089dbdc4e28e6711d46666af99d85eaeeb668f9bcec0d0b136d83594ba4b7f3ee419dcc8a7bc4723b869f798080e75b0328
data/README.md CHANGED
@@ -22,6 +22,7 @@ running `hiera applications` would run the query against the configured database
22
22
 
23
23
  The default_query key is special: it is in fact a default for anything in this hierarchy that is not specified with its own key. For example, running `hiera booksdb` would run default_query with the key variable in the query being interpolated as "booksdb".
24
24
 
25
+ Empty arrays and empty hashes returned from the database will be collapsed to nil as Puppet modules expect. Empty (zero-length) non-nil string values returned by the query suggest an actual empty column in the database and are returned as empty strings.
25
26
 
26
27
  ### Using
27
28
 
@@ -58,8 +59,7 @@ Hiera configuration is pretty simple
58
59
 
59
60
  ## Known issues
60
61
 
61
- 1. It always return an Array of hashes regardless of the number of items returned. (I did this on purpose because it is what I needed but I may be persuaded to do otherwise)
62
- 2. This README is poorly written.
62
+ 1. This README is poorly written.
63
63
 
64
64
 
65
65
  ## Contributing
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = "hiera-postgres-backend"
5
- gem.version = "0.0.4"
5
+ gem.version = "0.0.5"
6
6
  gem.authors = ["Adrian"]
7
7
  gem.email = ["adrianlzt@gmail.com"]
8
8
  gem.description = %q{Alternative PostgreSQL backend for hiera}
@@ -61,7 +61,12 @@ class Hiera
61
61
  end
62
62
 
63
63
  end
64
- return answer
64
+ unless answer.kind_of? String
65
+ if answer.empty?
66
+ answer = nil
67
+ end
68
+ end
69
+ return answer
65
70
  end
66
71
 
67
72
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiera-postgres-backend
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adrian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-14 00:00:00.000000000 Z
11
+ date: 2014-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg