hashr 0.0.16 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +2 -1
- data/lib/hashr.rb +1 -1
- data/lib/hashr/version.rb +1 -1
- data/test/hashr_test.rb +12 -0
- metadata +8 -7
data/Gemfile.lock
CHANGED
data/lib/hashr.rb
CHANGED
data/lib/hashr/version.rb
CHANGED
data/test/hashr_test.rb
CHANGED
@@ -77,6 +77,18 @@ class HashrTest < Test::Unit::TestCase
|
|
77
77
|
assert_equal 'foo', hashr.foo
|
78
78
|
end
|
79
79
|
|
80
|
+
test 'method using a string key works' do
|
81
|
+
hashr = Hashr.new
|
82
|
+
hashr['foo'] = 'foo'
|
83
|
+
assert_equal 'foo', hashr.foo
|
84
|
+
end
|
85
|
+
|
86
|
+
test 'using a symbol key works' do
|
87
|
+
hashr = Hashr.new
|
88
|
+
hashr[:foo] = 'foo'
|
89
|
+
assert_equal 'foo', hashr.foo
|
90
|
+
end
|
91
|
+
|
80
92
|
test 'defining defaults' do
|
81
93
|
klass = Class.new(Hashr) do
|
82
94
|
define :foo => 'foo', :bar => { :baz => 'baz' }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hashr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.17
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
12
|
+
date: 2011-11-18 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
16
|
-
requirement: &
|
16
|
+
requirement: &70265474354120 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70265474354120
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: test_declarative
|
27
|
-
requirement: &
|
27
|
+
requirement: &70265474353320 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: 0.0.2
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70265474353320
|
36
36
|
description: Simple Hash extension to make working with nested hashes (e.g. for configuration)
|
37
37
|
easier and less error-prone.
|
38
38
|
email: svenfuchs@artweb-design.de
|
@@ -72,9 +72,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
72
|
version: '0'
|
73
73
|
requirements: []
|
74
74
|
rubyforge_project: ! '[none]'
|
75
|
-
rubygems_version: 1.8.
|
75
|
+
rubygems_version: 1.8.10
|
76
76
|
signing_key:
|
77
77
|
specification_version: 3
|
78
78
|
summary: Simple Hash extension to make working with nested hashes (e.g. for configuration)
|
79
79
|
easier and less error-prone
|
80
80
|
test_files: []
|
81
|
+
has_rdoc:
|