chef-zero 1.5.4 → 1.5.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -49,18 +49,24 @@ module ChefZero
|
|
49
49
|
@index+=1
|
50
50
|
end
|
51
51
|
@index+=1 if !eof?
|
52
|
-
end
|
52
|
+
end while !eof? && peek_term_token
|
53
53
|
@query_string[start_index..@index-1]
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
57
57
|
def skip_whitespace
|
58
58
|
if @query_string[@index] =~ /\s/
|
59
|
-
whitespace = /\s+/.match(@query_string, @index)
|
59
|
+
whitespace = /\s+/.match(@query_string, @index) || peek
|
60
60
|
@index += whitespace[0].length
|
61
61
|
end
|
62
62
|
end
|
63
63
|
|
64
|
+
def peek_term_token
|
65
|
+
return nil if @query_string[@index] =~ /\s/
|
66
|
+
op = peek_operator_token
|
67
|
+
return !op || op == '-'
|
68
|
+
end
|
69
|
+
|
64
70
|
def peek_operator_token
|
65
71
|
if ['"', '+', '-', '!', '(', ')', '{', '}', '[', ']', '^', ':'].include?(@query_string[@index])
|
66
72
|
return @query_string[@index]
|
@@ -142,7 +148,7 @@ module ChefZero
|
|
142
148
|
right = next_token
|
143
149
|
parse_error(right, "Expected left term in range query") if !right
|
144
150
|
end_range = next_token
|
145
|
-
parse_error(right, "Expected end range '#{
|
151
|
+
parse_error(right, "Expected end range '#{end_range}") if !['}', ']'].include?(end_range)
|
146
152
|
Query::RangeQuery.new(left, right, token == '[', end_range == ']')
|
147
153
|
|
148
154
|
elsif token == '('
|
data/lib/chef_zero/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-zero
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-08-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: puma
|
@@ -193,7 +193,8 @@ files:
|
|
193
193
|
- !binary |-
|
194
194
|
YmluL2NoZWYtemVybw==
|
195
195
|
homepage: http://www.opscode.com
|
196
|
-
licenses:
|
196
|
+
licenses:
|
197
|
+
- Apache 2.0
|
197
198
|
post_install_message:
|
198
199
|
rdoc_options: []
|
199
200
|
require_paths:
|