riak-record 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f9fc3f21c82333d4407dafb67bbb07f7541cae9a
4
- data.tar.gz: d09d48df6dd73ba14739d052554e6cbde3aab138
3
+ metadata.gz: 848a3c84ab9c29295f67aeb95fadb9588644ff05
4
+ data.tar.gz: 9c339a757a57412bccad2a9a6efbfcd12de4ca57
5
5
  SHA512:
6
- metadata.gz: 6824a1da62874f8531ae438ff5584d130352cf10ba1c66eb555868ab9b90d3aff6f0a15a3a60dffd6954a2e99bdbe7294e43b9430c8a79fbf01ca1e92c3adc16
7
- data.tar.gz: 1cd486fbfeda0b2fdedd06314c0045d733218acc91de0f1be09bd98329bc8f2c62fe237e430be0154256e9a959cd2c9076d608df8e1990703af49e69d2db1b13
6
+ metadata.gz: f1e8c13cdf5b5ca515ce38a26637760ed9e1840eec464d5e6b66e5d1505a613155677ee12ae0bcd399359da1419202d99570c809a276ff47090295b58effe951
7
+ data.tar.gz: d52c6e5cedd503f9ef692988f0ad72a4616598c4b3488e95c839fd82800359942c070a7aafa66bab3c2f46f842b681ad8aeabcffd39b7473e024d8dffadf7a10
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 0.5.1
@@ -192,7 +192,8 @@ module RiakRecord
192
192
 
193
193
  def self.find_many(keys)
194
194
  hash = bucket.get_many(keys.map(&:to_s))
195
- keys.map{ |k| hash[k] }
195
+ values = keys.map{ |k| hash[k] }.compact
196
+ values.map{|robject| new(robject) }
196
197
  end
197
198
 
198
199
  @@namespace = nil
Binary file
data/riak-record.gemspec CHANGED
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: riak-record 0.5.0 ruby lib
5
+ # stub: riak-record 0.5.1 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "riak-record"
9
- s.version = "0.5.0"
9
+ s.version = "0.5.1"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Robert Graff"]
14
- s.date = "2014-10-15"
14
+ s.date = "2014-10-16"
15
15
  s.description = "RiakRecord is a thin and immature wrapper around riak-ruby-client. It creates a bucket for\n each class, provides a simple finder, and creates attribute reader."
16
16
  s.email = "robert_graff@yahoo.com"
17
17
  s.extra_rdoc_files = [
@@ -34,6 +34,7 @@ Gem::Specification.new do |s|
34
34
  "lib/riak_record/base.rb",
35
35
  "lib/riak_record/callbacks.rb",
36
36
  "lib/riak_record/finder.rb",
37
+ "riak-record-0.5.0.gem",
37
38
  "riak-record.gemspec",
38
39
  "spec/riak_record/associations_spec.rb",
39
40
  "spec/riak_record/base_spec.rb",
@@ -228,6 +228,15 @@ describe RiakRecord::Base do
228
228
  end
229
229
  end
230
230
 
231
+ describe "find many" do
232
+ before :each do
233
+ ExampleA.new("a").save
234
+ end
235
+ it "should return an instance of class for each found" do
236
+ expect(ExampleA.find_many(["a","b","c"]).map(&:id)).to eq(["a"])
237
+ end
238
+ end
239
+
231
240
  describe "where" do
232
241
  it "should return an instance of RiakRecord::Finder" do
233
242
  expect( ExampleA.where(:index1 => 'hello') ).to be_an_instance_of(RiakRecord::Finder)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riak-record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Graff
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-15 00:00:00.000000000 Z
11
+ date: 2014-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: riak-client
@@ -161,6 +161,7 @@ files:
161
161
  - lib/riak_record/base.rb
162
162
  - lib/riak_record/callbacks.rb
163
163
  - lib/riak_record/finder.rb
164
+ - riak-record-0.5.0.gem
164
165
  - riak-record.gemspec
165
166
  - spec/riak_record/associations_spec.rb
166
167
  - spec/riak_record/base_spec.rb