jgm-cloudlib 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/cloudlib.gemspec +1 -1
- data/lib/cloudlib.rb +1 -1
- metadata +1 -1
data/cloudlib.gemspec
CHANGED
data/lib/cloudlib.rb
CHANGED
@@ -143,7 +143,7 @@ class Entry
|
|
143
143
|
# if their titles contain both word1 and word2.
|
144
144
|
def self.query(query_string, numitems=10, token=nil)
|
145
145
|
query_parts = query_string.downcase.scan(/((ti(?:tle)?|au(?:thors?)?|jo(?:urnal)?|bo(?:ooktitle)?|pu(?:blisher)?|ad(?:ddress)?|ed(?:itors?)?|ye(?:ar)?)\s*([<=>])\s*('[^']*'|"[^"]*"|\S*)|\S+)\s*/)
|
146
|
-
query = query_parts.reject {|part| part[0] == '*'}.map do |part|
|
146
|
+
query = query_parts.reject {|part| part && part[0] == '*'}.map do |part|
|
147
147
|
whole, key, comparison, val = part
|
148
148
|
if val then val = val.gsub(/^['"](.*)['"]$/, "\\1") end
|
149
149
|
if not val then val = whole end
|