chef-zero 1.5.1 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,8 +6,10 @@ module ChefZero
6
6
  @subquery = subquery
7
7
  end
8
8
 
9
+ attr_reader :subquery
10
+
9
11
  def to_s
10
- "(#{@subquery})"
12
+ "(#{subquery})"
11
13
  end
12
14
 
13
15
  def literal_string
@@ -108,8 +108,7 @@ module ChefZero
108
108
  end
109
109
 
110
110
  def parse_error(token, str)
111
- error = "Error on token '#{token}' at #{@index} of '#{@query_string}': #{str}"
112
- raise error
111
+ raise "Error on token '#{token}' at #{@index} of '#{@query_string}': #{str}"
113
112
  end
114
113
 
115
114
  def read_single_expression
@@ -162,7 +161,12 @@ module ChefZero
162
161
 
163
162
  # Otherwise it's a term.
164
163
  else
165
- Query::Term.new(token)
164
+ term = Query::Term.new(token)
165
+ if peek_token == ':'
166
+ Query::BinaryOperator.new(term, next_token, read_single_expression)
167
+ else
168
+ term
169
+ end
166
170
  end
167
171
  end
168
172
 
@@ -1,3 +1,3 @@
1
1
  module ChefZero
2
- VERSION = '1.5.1'
2
+ VERSION = '1.5.2'
3
3
  end
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.1
4
+ version: 1.5.2
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-06-19 00:00:00.000000000 Z
12
+ date: 2013-06-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: puma