hiera-redis 0.1.0 → 0.1.1
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.
- data/lib/hiera/backend/redis_backend.rb +8 -2
- metadata +4 -4
@@ -2,17 +2,23 @@ class Hiera
|
|
2
2
|
module Backend
|
3
3
|
class Redis_backend
|
4
4
|
|
5
|
-
VERSION="0.1.
|
5
|
+
VERSION="0.1.1"
|
6
6
|
|
7
7
|
def initialize
|
8
8
|
|
9
9
|
require 'redis'
|
10
10
|
Hiera.debug("Hiera Redis backend starting")
|
11
11
|
|
12
|
+
# better error checking needed here?
|
13
|
+
path = Config[:redis][:path]
|
12
14
|
port = Config[:redis][:port] || 6397
|
13
15
|
host = Config[:redis][:host] || '127.0.0.1'
|
14
16
|
|
15
|
-
|
17
|
+
if path.nil?
|
18
|
+
@r = Redis.new(:host => host, :port => port)
|
19
|
+
else
|
20
|
+
@r = Redis.new(:path => path)
|
21
|
+
end
|
16
22
|
end
|
17
23
|
|
18
24
|
def lookup(key, scope, order_override, resolution_type)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hiera-redis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Adam Kosmin c/o Reliant Security, Inc.
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-03-
|
18
|
+
date: 2012-03-06 00:00:00 Z
|
19
19
|
dependencies: []
|
20
20
|
|
21
21
|
description: Allows hiera functions to pull data from a Redis database.
|