ocm 0.0.5 → 0.0.6

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/Gemfile.lock CHANGED
@@ -1,29 +1,29 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ocm (0.0.4)
4
+ ocm (0.0.6)
5
5
  iron_cache
6
6
  jsonable
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- iron_cache (1.2.1)
11
+ iron_cache (1.3.0)
12
12
  iron_core (>= 0.4.2)
13
- iron_core (0.4.2)
13
+ iron_core (0.4.3)
14
14
  rest (>= 2.0.2)
15
15
  jsonable (0.0.3)
16
16
  mime-types (1.19)
17
- minitest (3.3.0)
18
- net-http-persistent (2.7)
17
+ minitest (4.2.0)
18
+ net-http-persistent (2.8)
19
19
  rake (0.9.2.2)
20
- rest (2.0.2)
20
+ rest (2.1.0)
21
21
  net-http-persistent
22
22
  rest-client (>= 0.3.0)
23
23
  rest-client (1.6.7)
24
24
  mime-types (>= 1.16)
25
- test-unit (2.5.1)
26
- uber_config (0.0.6)
25
+ test-unit (2.5.2)
26
+ uber_config (1.0.5)
27
27
 
28
28
  PLATFORMS
29
29
  ruby
@@ -156,7 +156,18 @@ module Ocm
156
156
  puts "done increment"
157
157
  return 1
158
158
  end
159
- puts 'end inc'
159
+ end
160
+
161
+ # You can add these to allow multiple ways to look up an object, rather than just a single key
162
+ def add_alias(key_from, ob_to)
163
+ put(key_for(ob_to.class, key_from), key_for(ob_to))
164
+ end
165
+
166
+ # returns the object found by the key contained in the alias entry
167
+ def get_alias(clz, key_from)
168
+ real_key = get(key_for(clz, key_from))
169
+ return nil unless real_key
170
+ get(real_key)
160
171
  end
161
172
  end
162
173
  end
data/lib/ocm/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ocm
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ocm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-28 00:00:00.000000000 Z
12
+ date: 2012-11-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: iron_cache