riak-record 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/riak_record/finder.rb +5 -3
- data/riak-record.gemspec +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9058471a2084e933c3282f8268fba62d96d5b75d
|
4
|
+
data.tar.gz: 0ac7e0feec44f68e44da0158fe392151a19634ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3aa0d524f82368db76422995dbad286ce37e318111663b2ff005426dcef4214253dc2991fdf824365756a6b5ffcc5d90892d90e9d5737a7e575967a0a0022f43
|
7
|
+
data.tar.gz: 13b15afeb1d71a422e83233e20d00183f6c548478b0fe911f8512c4c8c67ae8623dc1c99a87639119b55f015755365b229093ff86c37bc36a1649e8369efb8fd
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.1
|
data/lib/riak_record/finder.rb
CHANGED
@@ -98,12 +98,14 @@ module RiakRecord
|
|
98
98
|
return results, querier.keys.continuation
|
99
99
|
end
|
100
100
|
|
101
|
-
def pluck_by_map_reduce(attribute)
|
101
|
+
def pluck_by_map_reduce(attribute, timeout = nil)
|
102
102
|
pluck_by_index = @finder_class.index_names[attribute.to_sym].present?
|
103
103
|
parsed_attribute = pluck_by_index ? "v.values[0].metadata.index.#{@finder_class.index_names[attribute.to_sym]}" : "JSON.parse(v.values[0].data).#{attribute}"
|
104
|
-
Riak::MapReduce.new(@finder_class.client).
|
104
|
+
mr = Riak::MapReduce.new(@finder_class.client).
|
105
105
|
index(@bucket, @index, @value).
|
106
|
-
map("function(v){ return [#{parsed_attribute}] }", :keep => true)
|
106
|
+
map("function(v){ return [#{parsed_attribute}] }", :keep => true)
|
107
|
+
mr.timeout = timeout if timeout.present?
|
108
|
+
mr.run
|
107
109
|
end
|
108
110
|
|
109
111
|
private
|
data/riak-record.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
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.6.
|
5
|
+
# stub: riak-record 0.6.1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "riak-record"
|
9
|
-
s.version = "0.6.
|
9
|
+
s.version = "0.6.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"]
|