rufus-cloche 0.1.16 → 0.1.17

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/CHANGELOG.txt CHANGED
@@ -2,6 +2,11 @@
2
2
  = rufus-cloche CHANGELOG.txt
3
3
 
4
4
 
5
+ == rufus-cloche - 0.1.17 released 2010/05/04
6
+
7
+ - for ruote-beanstalk : put/get_many now accept strings or symbols as opts keys
8
+
9
+
5
10
  == rufus-cloche - 0.1.16 released 2010/03/14
6
11
 
7
12
  - :nolock option for JRuby 1.4.0 on Ubuntu
data/lib/rufus/cloche.rb CHANGED
@@ -43,7 +43,7 @@ module Rufus
43
43
  #
44
44
  class Cloche
45
45
 
46
- VERSION = '0.1.16'
46
+ VERSION = '0.1.17'
47
47
 
48
48
  WIN = (RUBY_PLATFORM.match(/mswin|mingw/) != nil)
49
49
 
@@ -82,8 +82,10 @@ module Rufus
82
82
  #
83
83
  def put (doc, opts={})
84
84
 
85
- doc = Rufus::Json.dup(doc) unless opts[:update_rev]
86
- # work with a copy, don't touch orgiinal
85
+ opts = opts.inject({}) { |h, (k, v)| h[k.to_s] = v; h }
86
+
87
+ doc = Rufus::Json.dup(doc) unless opts['update_rev']
88
+ # work with a copy, don't touch original
87
89
 
88
90
  type, key = doc['type'], doc['_id']
89
91
 
@@ -175,12 +177,14 @@ module Rufus
175
177
  #
176
178
  def get_many (type, key_match=nil, opts={})
177
179
 
180
+ opts = opts.inject({}) { |h, (k, v)| h[k.to_s] = v; h }
181
+
178
182
  d = dir_for(type)
179
183
 
180
184
  return [] unless File.exist?(d)
181
185
 
182
186
  docs = []
183
- limit = opts[:limit]
187
+ limit = opts['limit']
184
188
 
185
189
  files = Dir[File.join(d, '**', '*.json')].sort { |p0, p1|
186
190
  File.basename(p0) <=> File.basename(p1)
data/rufus-cloche.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rufus-cloche}
8
- s.version = "0.1.16"
8
+ s.version = "0.1.17"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["John Mettraux"]
12
- s.date = %q{2010-03-14}
12
+ s.date = %q{2010-05-04}
13
13
  s.description = %q{
14
14
  A very stupid JSON hash store.
15
15
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 16
9
- version: 0.1.16
8
+ - 17
9
+ version: 0.1.17
10
10
  platform: ruby
11
11
  authors:
12
12
  - John Mettraux
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-03-14 00:00:00 +09:00
17
+ date: 2010-05-04 00:00:00 +09:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency