esapiserver 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/esapiserver/version.rb +1 -1
- data/lib/esapiserver.rb +4 -2
- 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: 02e712cfab8f66fde6adaac61b7362a41c6ab292
|
4
|
+
data.tar.gz: 66c11aacd9b13f8d8d4216bd5b890f91160a1964
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00825142271faa45b2b06af86dc9498e9729f18c94b7c628b5f7244733addc8a0f62fe037d2d531703d07016ab8e8e3aa521dcedae8ba892a9c37722bb2799e2
|
7
|
+
data.tar.gz: 07347c7bd0d059e58a8aeca639f3008d606ecc668169bb96c52a9c84ff36e50584755b02e76a306559695da670c0159104e8090c0df32db416f4603c96de0aa2
|
data/lib/esapiserver/version.rb
CHANGED
data/lib/esapiserver.rb
CHANGED
@@ -75,14 +75,14 @@ module Esapiserver
|
|
75
75
|
if request.query_string.empty?
|
76
76
|
result = collection.find.to_a.map{|t| frombsonid(t, params[:thing])}.to_json
|
77
77
|
else
|
78
|
-
if request.query_string.include? 'ids[]' or request.query_string.include? 'ids%5B%5D'
|
78
|
+
if request.query_string.include? 'ids[]' or request.query_string.include? 'ids%5B%5D' #don't know why it does not get unescaped
|
79
79
|
ids = []
|
80
80
|
|
81
81
|
if request.query_string.include? '&'
|
82
82
|
queries = request.query_string.split('&')
|
83
83
|
queries.each do |q|
|
84
84
|
key, value = q.split('=')
|
85
|
-
if key != 'ids[]'
|
85
|
+
if key != 'ids[]' and key != 'ids%5B%5D' #check to see if all the keys match
|
86
86
|
throw 'multiple query parameters not supported yet, except _ids[]='
|
87
87
|
end
|
88
88
|
ids << tobsonid(value)
|
@@ -92,6 +92,8 @@ module Esapiserver
|
|
92
92
|
ids << tobsonid(value)
|
93
93
|
end
|
94
94
|
query = {"_id" => { "$in" => ids }}
|
95
|
+
elsif request.query_string.include? '&'
|
96
|
+
throw 'multiple query parameters not supported yet, except _ids[]='
|
95
97
|
else
|
96
98
|
key, value = request.query_string.split('=')
|
97
99
|
query = {modelName(params[:thing]) + "." + key => value}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: esapiserver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Miles
|
@@ -263,12 +263,12 @@ files:
|
|
263
263
|
- LICENSE.txt
|
264
264
|
- README.md
|
265
265
|
- Rakefile
|
266
|
+
- bin/esapiserver
|
266
267
|
- esapiserver.gemspec
|
267
268
|
- lib/esapiserver.rb
|
268
269
|
- lib/esapiserver/version.rb
|
269
270
|
- spec/esapiserver_spec.rb
|
270
271
|
- spec/spec_helper.rb
|
271
|
-
- bin/esapiserver
|
272
272
|
homepage: https://github.com/mawiza/esapiserver
|
273
273
|
licenses:
|
274
274
|
- MIT
|