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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d56cf67111c3a47096df2c6936b9a66329648bc4
4
- data.tar.gz: cc63a8071f98e2e1efb3e1281886c104e0709e20
3
+ metadata.gz: 7343801d33cd7284635f64439201546a196cafbe
4
+ data.tar.gz: b21b94bd2691c4b295dc521c9ab7f0f6c1b3c08b
5
5
  SHA512:
6
- metadata.gz: ce7e54be719abd78fd9c87d0adfd69445820b019776df34062f284a284344be608ff414a322aa4c05ba9294c0507f28a33fce189ab03e2c6dfb420b22c5a9ab5
7
- data.tar.gz: 0a3306cccb1edc161543003c6c41d3ef5686645b45bf507c112002f09cc6565a27dbfdca6531572dc1cc11f9994b821de730892db9f3bfaa575e3e46b783d322
6
+ metadata.gz: f60918e1da256d70c85474ce4e898286ca793715baf437f3cc2b212ecd884239bb4e92785665ee7135450aa0ad2efc27e4d4234fed2af2fadabf5b0413ec481f
7
+ data.tar.gz: ec3a51cbba42f4694ee49809798dffa4008fe9d997b6ae4f7e4ecca774823e75d5687dd6b5bc701423cca5d302ac9f6e447898c5943af11f53d4f56f1b4ab40b
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.2
@@ -69,7 +69,15 @@ class Skein::Config < OpenStruct
69
69
  config_path = options
70
70
  end
71
71
  when Hash
72
- super(options)
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
@@ -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.1 ruby lib
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.1"
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-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.1
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-12 00:00:00.000000000 Z
11
+ date: 2016-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: birling