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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ff0956b1087675795458772e87ba168c045ef2f6
4
- data.tar.gz: 715ef9e7bd70e6fe4996fdaf9eaee7ec3a5c9ccd
3
+ metadata.gz: 26368148c775a1b8ff41c8f5df22f7e0ae6a3663
4
+ data.tar.gz: a9e0969cd096210f2ca09703bb8ef4bf82f2dd2e
5
5
  SHA512:
6
- metadata.gz: e8d2e5dc66ff778f2353837027e746a38fa56fc2f81163fea892c43d15151625f4e6bfb70d0447b4c9a627af050c0a10f830cb92bde36f4c9778e66cac7a2474
7
- data.tar.gz: 028f7bfb147658012fb3556f4fdf86601f7d8b7c64a5f0b4435e5b7f6c74180225e1201166d1bcea462c2da2f4cfb8a02046a55d01bb7813608859d73c168a08
6
+ metadata.gz: 21464a359588ad05cbd13c7048d137e9dfffc05bb1e28e271ded728083b9dd425c6d9c5a8079289e5b6c4fd646dca612666a5e612b9b49d33c678f2b018faa39
7
+ data.tar.gz: 666f01eeada599787f09e1fe957b4305103eaeec621ecd5b71b9a43a4134e8363ea54e03c2557574be370e9b23a8108f3e865172087eb068689acc838db39d44
@@ -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
- @reactor.schedule {
41
- options = @options.merge(options)
42
- # We should never exceed the users results limit
43
- orig_limit = @options[:limit]
44
- limit = options[:limit]
45
- if orig_limit && limit
46
- options[:limit] = orig_limit if limit > orig_limit
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
- @options.each { |key, val| pairs << "#{key}=#{val}" }
51
- opts = pairs.join('&')
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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true, encoding: ASCII-8BIT
2
2
 
3
3
  module Libcouchbase
4
- VERSION = '0.0.2'
4
+ VERSION = '0.0.3'
5
5
  end
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.2
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-04 00:00:00.000000000 Z
11
+ date: 2016-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi