goodguide-gibbon 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/goodguide/gibbon/version.rb +1 -1
- data/lib/goodguide/gibbon.rb +3 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c61efe121d23db7a49c70a68f0a043a48dd8cc22
|
4
|
+
data.tar.gz: 0ba5e9f089eef69f035a5890086b3584c5199212
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9808a033ec1fcdc705e4ddfd96b476d4537de9bcca07f0198df3d947da1fa741cc7e862c3d1a16ff7f1289acd486a2e3eb5c44c14ad13a3c8543790a60a17772
|
7
|
+
data.tar.gz: 2bb8a4a01ff84e2b29fbcb97bece26eed9ad56fb767aa0d59606b2d69ebe1be83ab3eaf4c4d1cb757f18dc1556b47ebd16af621712780c2894bb6f3beaa0681a
|
data/lib/goodguide/gibbon.rb
CHANGED
@@ -266,9 +266,7 @@ module GoodGuide
|
|
266
266
|
|
267
267
|
private
|
268
268
|
def get_query(type)
|
269
|
-
|
270
|
-
raise "no such query #{type}" if query.nil?
|
271
|
-
query
|
269
|
+
self.class.queries[type.to_s]
|
272
270
|
end
|
273
271
|
|
274
272
|
def proc_for(method)
|
@@ -309,7 +307,7 @@ module GoodGuide
|
|
309
307
|
end
|
310
308
|
|
311
309
|
def analyze_query(input_id, query, t)
|
312
|
-
query_impl = get_query(query.type)
|
310
|
+
query_impl = get_query(query.type) or query_error! "no such query #{query.type.inspect}"
|
313
311
|
analysis = instance_exec(input_id, obj_to_ruby(query.args), t, &query_impl)
|
314
312
|
analysis[:annotations]['_query_type'] = query.type
|
315
313
|
analysis
|
@@ -332,7 +330,7 @@ module GoodGuide
|
|
332
330
|
@last_annotations = annotations
|
333
331
|
@last_id = id
|
334
332
|
|
335
|
-
query = get_query(query_type)
|
333
|
+
query = get_query(query_type) or raise "invalid query type in compiled code: #{query_type.inspect}"
|
336
334
|
instance_exec(id, annotations, &query)
|
337
335
|
end
|
338
336
|
|