skein 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/skein/config.rb +9 -1
- data/skein.gemspec +3 -3
- data/test/unit/test_skein_config.rb +26 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7343801d33cd7284635f64439201546a196cafbe
|
4
|
+
data.tar.gz: b21b94bd2691c4b295dc521c9ab7f0f6c1b3c08b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f60918e1da256d70c85474ce4e898286ca793715baf437f3cc2b212ecd884239bb4e92785665ee7135450aa0ad2efc27e4d4234fed2af2fadabf5b0413ec481f
|
7
|
+
data.tar.gz: ec3a51cbba42f4694ee49809798dffa4008fe9d997b6ae4f7e4ecca774823e75d5687dd6b5bc701423cca5d302ac9f6e447898c5943af11f53d4f56f1b4ab40b
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.2
|
data/lib/skein/config.rb
CHANGED
@@ -69,7 +69,15 @@ class Skein::Config < OpenStruct
|
|
69
69
|
config_path = options
|
70
70
|
end
|
71
71
|
when Hash
|
72
|
-
super(
|
72
|
+
super(
|
73
|
+
DEFAULTS.merge(
|
74
|
+
Hash[
|
75
|
+
options.map do |k, v|
|
76
|
+
[ k.nil? ? nil : k.to_sym, v ]
|
77
|
+
end
|
78
|
+
]
|
79
|
+
)
|
80
|
+
)
|
73
81
|
|
74
82
|
return
|
75
83
|
when false, :default
|
data/skein.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: skein 0.3.
|
5
|
+
# stub: skein 0.3.2 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "skein".freeze
|
9
|
-
s.version = "0.3.
|
9
|
+
s.version = "0.3.2"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["Scott Tadman".freeze]
|
14
|
-
s.date = "2016-12-
|
14
|
+
s.date = "2016-12-14"
|
15
15
|
s.description = "Wrapper for RabbitMQ that makes blocking RPC calls and handles pub-sub broadcasts.".freeze
|
16
16
|
s.email = "tadman@postageapp.com".freeze
|
17
17
|
s.executables = ["skein".freeze]
|
@@ -30,4 +30,30 @@ class TestSkeinConfig < Test::Unit::TestCase
|
|
30
30
|
def test_config_exists
|
31
31
|
assert_equal(true, Skein::Config.exist?)
|
32
32
|
end
|
33
|
+
|
34
|
+
def test_config_with_hash_string_keys
|
35
|
+
config = Skein::Config.new(
|
36
|
+
'host' => 'custom.host',
|
37
|
+
'namespace' => 'custom'
|
38
|
+
)
|
39
|
+
|
40
|
+
assert_equal('custom.host', config.host)
|
41
|
+
assert_equal(5672, config.port)
|
42
|
+
assert_equal('guest', config.username)
|
43
|
+
assert_equal('guest', config.password)
|
44
|
+
assert_equal('custom', config.namespace)
|
45
|
+
end
|
46
|
+
|
47
|
+
def test_config_with_hash_symbol_keys
|
48
|
+
config = Skein::Config.new(
|
49
|
+
host: 'symbol.host',
|
50
|
+
namespace: 'symbol'
|
51
|
+
)
|
52
|
+
|
53
|
+
assert_equal('symbol.host', config.host)
|
54
|
+
assert_equal(5672, config.port)
|
55
|
+
assert_equal('guest', config.username)
|
56
|
+
assert_equal('guest', config.password)
|
57
|
+
assert_equal('symbol', config.namespace)
|
58
|
+
end
|
33
59
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: skein
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Tadman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: birling
|