ocm 0.0.2 → 0.0.3

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.
@@ -1,17 +1,17 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ocm (0.0.1)
4
+ ocm (0.0.2)
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.1.2)
12
- iron_core (>= 0.2.0)
13
- iron_core (0.3.3)
14
- rest (>= 2.0.0)
11
+ iron_cache (1.2.1)
12
+ iron_core (>= 0.4.2)
13
+ iron_core (0.4.2)
14
+ rest (>= 2.0.2)
15
15
  jsonable (0.0.3)
16
16
  mime-types (1.19)
17
17
  minitest (3.3.0)
@@ -3,9 +3,9 @@ require 'iron_cache'
3
3
  module Ocm
4
4
  class Orm
5
5
 
6
- def initialize(options={})
7
- @iron_cache = IronCache::Client.new(options)
8
- @cache = @iron_cache.cache(options[:cache_name] || "ocm")
6
+ # initialize with a cache object from IronCache::Client, eg: iron_cache.cache("my_object_cache")
7
+ def initialize(cache)
8
+ @cache = cache
9
9
  end
10
10
 
11
11
  def key_for(idable, id=nil)
@@ -3,6 +3,7 @@ require 'ostruct'
3
3
  require_relative 'idable'
4
4
 
5
5
  module Ocm
6
+ # todo: Name this something better, lame name
6
7
  module Ormable
7
8
 
8
9
  def self.included(by)
@@ -1,3 +1,3 @@
1
1
  module Ocm
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -12,7 +12,8 @@ class TestOcm < TestBase
12
12
  end
13
13
 
14
14
  def test_basics
15
- orm = Ocm::Orm.new
15
+ ic = IronCache::Client.new()
16
+ orm = Ocm::Orm.new(ic.cache("ocm_gem_tests"))
16
17
 
17
18
  contact = Contact.new(:name=>"t2")
18
19
  puts contact.name
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.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: