fastapi 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/fastapi.rb +22 -6
- 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: f63fbcf57897ab8ecee8a900a93516b97acff713
|
4
|
+
data.tar.gz: 423602ac6ead2c5a13601358a5d6dc0cd908dc9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 427a8df5aa5fb190764684dfbc50aca87c78fe430b860c0e94898f72d78c5c16791682fdb8f9f49e0b9fbcddd72090f4679370db924a295ea1d4cde2f02f1928
|
7
|
+
data.tar.gz: aceba336fc6a779b0e26e0a4f59aa5965bdcbf02446147b478ced92eac26bd6b0c23b5470ee281ec2506fc59f494a2b66d7e674a6296c29fdf18c81663d461ef
|
data/lib/fastapi.rb
CHANGED
@@ -236,7 +236,7 @@ class FastAPI
|
|
236
236
|
types: model.fastapi_fields_sub.map { |field| (columns_hash.has_key? field.to_s) ? columns_hash[field.to_s].type : nil },
|
237
237
|
}
|
238
238
|
end
|
239
|
-
|
239
|
+
|
240
240
|
error = nil
|
241
241
|
|
242
242
|
begin
|
@@ -306,7 +306,7 @@ class FastAPI
|
|
306
306
|
|
307
307
|
my_end = Time.now()
|
308
308
|
|
309
|
-
#
|
309
|
+
# puts dataset.size.to_s + '-length array parsed in ' + (my_end - start).to_s
|
310
310
|
|
311
311
|
{
|
312
312
|
data: dataset,
|
@@ -337,31 +337,46 @@ class FastAPI
|
|
337
337
|
|
338
338
|
while i < len
|
339
339
|
|
340
|
-
|
340
|
+
c = str[i]
|
341
|
+
|
342
|
+
if c == ')'
|
341
343
|
|
342
344
|
rows << cur_row
|
343
345
|
cur_row = {}
|
344
346
|
entry_index = 0
|
345
347
|
i = i + 3
|
346
348
|
|
347
|
-
elsif
|
349
|
+
elsif c == '"'
|
348
350
|
|
349
351
|
i = i + 1
|
350
352
|
nextIndex = str.index('"', i)
|
351
353
|
|
352
354
|
while str[nextIndex - 1] == '\\'
|
355
|
+
|
356
|
+
j = 1
|
357
|
+
while str[nextIndex - j] == '\\'
|
358
|
+
j = j + 1
|
359
|
+
end
|
360
|
+
|
361
|
+
if j & 1 == 1
|
362
|
+
break
|
363
|
+
end
|
364
|
+
|
353
365
|
nextIndex = str.index('"', nextIndex + 1)
|
366
|
+
|
354
367
|
end
|
355
368
|
|
356
369
|
cur_row[fields[entry_index]] = api_convert_type(str[i...nextIndex], types[entry_index])
|
357
370
|
entry_index = entry_index + 1
|
358
371
|
|
359
372
|
i = nextIndex + 1
|
373
|
+
|
360
374
|
else
|
361
375
|
|
362
|
-
if
|
376
|
+
if c == ','
|
363
377
|
i = i + 1
|
364
378
|
end
|
379
|
+
|
365
380
|
parensIndex = str.index(')', i)
|
366
381
|
nextIndex = str.index(',', i)
|
367
382
|
|
@@ -394,6 +409,7 @@ class FastAPI
|
|
394
409
|
|
395
410
|
end
|
396
411
|
|
412
|
+
|
397
413
|
def api_comparison(comparator, value)
|
398
414
|
|
399
415
|
if comparator == 'is'
|
@@ -595,7 +611,7 @@ class FastAPI
|
|
595
611
|
if model.nil? and self_obj.reflect_on_all_associations(:has_many).map(&:name).include? key
|
596
612
|
|
597
613
|
filter_result = parse_filters(value, safe, field.singularize.classify.constantize)
|
598
|
-
#
|
614
|
+
# puts filter_result
|
599
615
|
filter_has_many[key] = filter_result[:main]
|
600
616
|
order_has_many[key] = filter_result[:main_order]
|
601
617
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Keith Horwood
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oj
|