goodguide-gibbon 0.11.6 → 0.11.7
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.rb +8 -13
- data/vendor/gibbon/gibbon.browser.dev.js +4 -4
- data/vendor/gibbon/gibbon.browser.js +4 -4
- data/vendor/gibbon/package.json +1 -1
- 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: 2b87fbbaef96ba223caea6829637a4c7ab6daba5
|
4
|
+
data.tar.gz: 4ed0b5550c8c267f29e81f2a7adfa9f43ab092d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 08fdfed3ab060c75e60be231ba3a508a5a7293f772471015882789636bf4c77b2e4931b06a792045d6ee38ba4a143824b85564ea51ab75a192454a8607343064
|
7
|
+
data.tar.gz: 8c0da5fc5e7d391895b21da974bc95321d1a3ce309afa5503b8c646b1f0a640bee5c0eee10ff95ebb2ceec204ffc9c96416c502e52d7dfcc7e3db882a3323548
|
data/lib/goodguide/gibbon.rb
CHANGED
@@ -176,18 +176,16 @@ module GoodGuide
|
|
176
176
|
|
177
177
|
class RuntimeError < StandardError; end
|
178
178
|
class MissingData < RuntimeError
|
179
|
-
attr_reader :query_type, :id, :
|
180
|
-
|
181
|
-
|
182
|
-
@query_type, @id, @latest_annotation = type, id, latest_annotation
|
179
|
+
attr_reader :query_type, :id, :annotations
|
180
|
+
def initialize(type, id, annotations)
|
181
|
+
@query_type, @id, @annotations = type, id, annotations
|
183
182
|
end
|
184
183
|
|
185
184
|
def equals(other)
|
186
185
|
[
|
187
186
|
query_type == other.query_type,
|
188
187
|
id == other.id,
|
189
|
-
annotations == other.annotations
|
190
|
-
latest_annotation == other.latest_annotation
|
188
|
+
annotations == other.annotations
|
191
189
|
].all?
|
192
190
|
end
|
193
191
|
|
@@ -196,24 +194,21 @@ module GoodGuide
|
|
196
194
|
'status' => 'missing_data',
|
197
195
|
'query_type' => query_type,
|
198
196
|
'entity_id' => id,
|
199
|
-
'latest_annotation' => latest_annotation,
|
200
197
|
'annotations' => annotations,
|
201
198
|
}
|
202
199
|
end
|
203
200
|
end
|
204
201
|
|
205
202
|
class Failure < RuntimeError
|
206
|
-
attr_reader :message
|
207
|
-
def initialize(message
|
203
|
+
attr_reader :message
|
204
|
+
def initialize(message)
|
208
205
|
@message = message
|
209
|
-
@annotations = annotations
|
210
206
|
end
|
211
207
|
|
212
208
|
def as_json(*)
|
213
209
|
{
|
214
210
|
'status' => 'failure',
|
215
211
|
'message' => message,
|
216
|
-
'annotations' => annotations
|
217
212
|
}
|
218
213
|
end
|
219
214
|
end
|
@@ -273,11 +268,10 @@ module GoodGuide
|
|
273
268
|
|
274
269
|
case error
|
275
270
|
when String
|
276
|
-
raise GoodGuide::Gibbon::Failure.new(error
|
271
|
+
raise GoodGuide::Gibbon::Failure.new(error)
|
277
272
|
when nil
|
278
273
|
values
|
279
274
|
else
|
280
|
-
error.annotations = values
|
281
275
|
raise error
|
282
276
|
end
|
283
277
|
end
|
@@ -354,6 +348,7 @@ module GoodGuide
|
|
354
348
|
include Util
|
355
349
|
def perform_query(id, annotations)
|
356
350
|
annotations = obj_to_ruby(annotations)
|
351
|
+
|
357
352
|
query_type = annotations.delete('_query_type')
|
358
353
|
|
359
354
|
# stash this data in case missing_data! is called
|
@@ -5875,7 +5875,7 @@ stdlib = Gibbon.stdlib = (function() {
|
|
5875
5875
|
first: {
|
5876
5876
|
type: parse.type('first = [%a] -> %a'),
|
5877
5877
|
compile: function(list) {
|
5878
|
-
return
|
5878
|
+
return list.delist(ZERO);
|
5879
5879
|
}
|
5880
5880
|
},
|
5881
5881
|
left: {
|
@@ -6205,7 +6205,7 @@ Gibbon.Dependency = Dependency = (function(_super) {
|
|
6205
6205
|
Dependency.variants({
|
6206
6206
|
query: ['entity', 'query', 'value'],
|
6207
6207
|
lexical: ['key'],
|
6208
|
-
failure: ['
|
6208
|
+
failure: ['failure']
|
6209
6209
|
});
|
6210
6210
|
|
6211
6211
|
Dependency.prototype.equals = function(other) {
|
@@ -6351,7 +6351,7 @@ Gibbon.CompiledCode = CompiledCode = (function() {
|
|
6351
6351
|
};
|
6352
6352
|
onFailure = function(err) {
|
6353
6353
|
failures.set(key, err);
|
6354
|
-
return fail(err
|
6354
|
+
return fail(err);
|
6355
6355
|
};
|
6356
6356
|
return _this.functionFor(key)(input, query, onFailure, onSuccess);
|
6357
6357
|
};
|
@@ -6367,7 +6367,7 @@ Gibbon.CompiledCode = CompiledCode = (function() {
|
|
6367
6367
|
out = client.performQuery(id, annotations, function(err, data) {
|
6368
6368
|
var publicValue;
|
6369
6369
|
if (err) {
|
6370
|
-
pushDep(Dependency.failure(
|
6370
|
+
pushDep(Dependency.failure(err));
|
6371
6371
|
if (isSynchronous) {
|
6372
6372
|
return function() {
|
6373
6373
|
return onFailure(err);
|
@@ -5812,7 +5812,7 @@ stdlib = Gibbon.stdlib = (function() {
|
|
5812
5812
|
first: {
|
5813
5813
|
type: parse.type('first = [%a] -> %a'),
|
5814
5814
|
compile: function(list) {
|
5815
|
-
return
|
5815
|
+
return list.delist(ZERO);
|
5816
5816
|
}
|
5817
5817
|
},
|
5818
5818
|
left: {
|
@@ -6142,7 +6142,7 @@ Gibbon.Dependency = Dependency = (function(_super) {
|
|
6142
6142
|
Dependency.variants({
|
6143
6143
|
query: ['entity', 'query', 'value'],
|
6144
6144
|
lexical: ['key'],
|
6145
|
-
failure: ['
|
6145
|
+
failure: ['failure']
|
6146
6146
|
});
|
6147
6147
|
|
6148
6148
|
Dependency.prototype.equals = function(other) {
|
@@ -6288,7 +6288,7 @@ Gibbon.CompiledCode = CompiledCode = (function() {
|
|
6288
6288
|
};
|
6289
6289
|
onFailure = function(err) {
|
6290
6290
|
failures.set(key, err);
|
6291
|
-
return fail(err
|
6291
|
+
return fail(err);
|
6292
6292
|
};
|
6293
6293
|
return _this.functionFor(key)(input, query, onFailure, onSuccess);
|
6294
6294
|
};
|
@@ -6304,7 +6304,7 @@ Gibbon.CompiledCode = CompiledCode = (function() {
|
|
6304
6304
|
out = client.performQuery(id, annotations, function(err, data) {
|
6305
6305
|
var publicValue;
|
6306
6306
|
if (err) {
|
6307
|
-
pushDep(Dependency.failure(
|
6307
|
+
pushDep(Dependency.failure(err));
|
6308
6308
|
if (isSynchronous) {
|
6309
6309
|
return function() {
|
6310
6310
|
return onFailure(err);
|
data/vendor/gibbon/package.json
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: goodguide-gibbon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jay Adkisson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Run and analyze gibbon code from ruby or a browser (via a ruby app).
|
14
14
|
email:
|