hash_with_struct_access 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  class HashWithStructAccess < Hash
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
 
4
4
  def initialize(hash = {})
5
5
  hash.each_pair do |key, value|
@@ -11,4 +11,9 @@ class HashWithStructAccess < Hash
11
11
  def method_missing(method_name)
12
12
  self[method_name] || self[method_name.to_s] || super
13
13
  end
14
+
15
+ # Method stub to be overriden by plugins
16
+ def self.compute_path(path)
17
+ path
18
+ end
14
19
  end
@@ -72,4 +72,8 @@ class HashWithStructAccessTest < Test::Unit::TestCase
72
72
  assert_equal(HashLike.call_me_with_options(HashWithStructAccess.new(:foo => {:bar => :baz})),
73
73
  HashLike.call_me_with_options(:foo => {:bar => :baz}))
74
74
  end
75
+
76
+ def test_should_have_dummy_method_for_path_computation
77
+ assert_equal(HashWithStructAccess.compute_path("/foo/bar"), "/foo/bar")
78
+ end
75
79
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hash_with_struct_access
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-02-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- requirement: &70247841423260 !ruby/object:Gem::Requirement
16
+ requirement: &70362545394640 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70247841423260
24
+ version_requirements: *70362545394640
25
25
  description: Hash object with struct access
26
26
  email:
27
27
  - kostiantyn.kahanskyi@googlemail.com