libcouchbase 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.
- checksums.yaml +4 -4
- data/lib/libcouchbase/bucket.rb +1 -1
- data/lib/libcouchbase/query_view.rb +19 -13
- data/lib/libcouchbase/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26368148c775a1b8ff41c8f5df22f7e0ae6a3663
|
4
|
+
data.tar.gz: a9e0969cd096210f2ca09703bb8ef4bf82f2dd2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21464a359588ad05cbd13c7048d137e9dfffc05bb1e28e271ded728083b9dd425c6d9c5a8079289e5b6c4fd646dca612666a5e612b9b49d33c678f2b018faa39
|
7
|
+
data.tar.gz: 666f01eeada599787f09e1fe957b4305103eaeec621ecd5b71b9a43a4134e8363ea54e03c2557574be370e9b23a8108f3e865172087eb068689acc838db39d44
|
data/lib/libcouchbase/bucket.rb
CHANGED
@@ -622,7 +622,7 @@ module Libcouchbase
|
|
622
622
|
# @param [String, Symbol] id ID of the design doc
|
623
623
|
# @param [String] rev Optional revision
|
624
624
|
def delete_design_doc(id, rev = nil, async: false)
|
625
|
-
id = id.sub(/^_design\//, '')
|
625
|
+
id = id.to_s.sub(/^_design\//, '')
|
626
626
|
rev = "?rev=#{rev}" if rev
|
627
627
|
result @connection.http("/_design/#{id}#{rev}", method: :delete, type: :view), async
|
628
628
|
end
|
@@ -37,24 +37,30 @@ module Libcouchbase
|
|
37
37
|
raise 'query already in progress' if @cmd
|
38
38
|
raise 'callback required' unless block_given?
|
39
39
|
|
40
|
-
@
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
end
|
48
|
-
pairs = []
|
40
|
+
options = @options.merge(options)
|
41
|
+
# We should never exceed the users results limit
|
42
|
+
orig_limit = @options[:limit]
|
43
|
+
limit = options[:limit]
|
44
|
+
if orig_limit && limit
|
45
|
+
options[:limit] = orig_limit if limit > orig_limit
|
46
|
+
end
|
49
47
|
|
50
|
-
|
51
|
-
|
48
|
+
pairs = []
|
49
|
+
options.each { |key, val|
|
50
|
+
if key.to_s.include? 'key'
|
51
|
+
pairs << "#{key}=#{[val].to_json[1...-1]}"
|
52
|
+
else
|
53
|
+
pairs << "#{key}=#{val}"
|
54
|
+
end
|
55
|
+
}
|
56
|
+
opts = pairs.join('&')
|
52
57
|
|
58
|
+
@reactor.schedule {
|
53
59
|
@error = nil
|
54
|
-
|
55
60
|
@callback = blk
|
61
|
+
|
56
62
|
@cmd = Ext::CMDVIEWQUERY.new
|
57
|
-
Ext.view_query_initcmd(@cmd, @design, @view, opts, @connection.get_callback(:viewquery_callback))
|
63
|
+
Ext.view_query_initcmd(@cmd, @design.to_s, @view.to_s, opts, @connection.get_callback(:viewquery_callback))
|
58
64
|
@cmd[:cmdflags] |= F_INCLUDE_DOCS if include_docs
|
59
65
|
@cmd[:cmdflags] |= F_SPATIAL if is_spatial
|
60
66
|
|
data/lib/libcouchbase/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libcouchbase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen von Takach
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|