sucker 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +16 -11
- data/lib/sucker.rb +3 -3
- data/lib/sucker.rbc +18 -34
- data/lib/sucker/hash.rb +7 -0
- data/lib/sucker/hash.rbc +914 -0
- data/lib/sucker/parameters.rb +3 -4
- data/lib/sucker/parameters.rbc +177 -122
- data/lib/sucker/request.rb +13 -11
- data/lib/sucker/request.rbc +257 -792
- data/lib/sucker/response.rb +25 -20
- data/lib/sucker/response.rbc +356 -472
- data/lib/sucker/version.rb +1 -1
- data/lib/sucker/version.rbc +4 -4
- data/spec/sucker/hash_spec.rbc +861 -0
- data/spec/sucker/parameters_spec.rbc +5 -6
- data/spec/sucker/request_spec.rbc +38 -420
- data/spec/sucker/response_spec.rb +2 -2
- data/spec/sucker/response_spec.rbc +1258 -349
- metadata +5 -90
@@ -297,15 +297,15 @@ i
|
|
297
297
|
2
|
298
298
|
0
|
299
299
|
5
|
300
|
-
|
300
|
+
44
|
301
|
+
43
|
301
302
|
3
|
302
|
-
4
|
303
303
|
47
|
304
304
|
49
|
305
|
-
|
305
|
+
4
|
306
306
|
1
|
307
307
|
49
|
308
|
-
|
308
|
+
5
|
309
309
|
1
|
310
310
|
11
|
311
311
|
I
|
@@ -319,7 +319,7 @@ I
|
|
319
319
|
I
|
320
320
|
-2
|
321
321
|
p
|
322
|
-
|
322
|
+
6
|
323
323
|
x
|
324
324
|
10
|
325
325
|
Parameters
|
@@ -330,7 +330,6 @@ ancestors
|
|
330
330
|
x
|
331
331
|
4
|
332
332
|
Hash
|
333
|
-
n
|
334
333
|
x
|
335
334
|
7
|
336
335
|
include
|
@@ -123,7 +123,7 @@ x
|
|
123
123
|
6
|
124
124
|
Sucker
|
125
125
|
i
|
126
|
-
|
126
|
+
112
|
127
127
|
5
|
128
128
|
7
|
129
129
|
0
|
@@ -235,17 +235,6 @@ i
|
|
235
235
|
50
|
236
236
|
12
|
237
237
|
1
|
238
|
-
15
|
239
|
-
5
|
240
|
-
7
|
241
|
-
25
|
242
|
-
64
|
243
|
-
56
|
244
|
-
26
|
245
|
-
47
|
246
|
-
50
|
247
|
-
12
|
248
|
-
1
|
249
238
|
11
|
250
239
|
I
|
251
240
|
7
|
@@ -258,7 +247,7 @@ I
|
|
258
247
|
I
|
259
248
|
-2
|
260
249
|
p
|
261
|
-
|
250
|
+
25
|
262
251
|
s
|
263
252
|
19
|
264
253
|
spec/sucker/request
|
@@ -695,7 +684,7 @@ x
|
|
695
684
|
6
|
696
685
|
Sucker
|
697
686
|
i
|
698
|
-
|
687
|
+
11
|
699
688
|
5
|
700
689
|
7
|
701
690
|
0
|
@@ -706,17 +695,6 @@ i
|
|
706
695
|
50
|
707
696
|
2
|
708
697
|
1
|
709
|
-
15
|
710
|
-
5
|
711
|
-
7
|
712
|
-
3
|
713
|
-
64
|
714
|
-
56
|
715
|
-
4
|
716
|
-
47
|
717
|
-
50
|
718
|
-
5
|
719
|
-
1
|
720
698
|
11
|
721
699
|
I
|
722
700
|
4
|
@@ -729,7 +707,7 @@ I
|
|
729
707
|
I
|
730
708
|
-2
|
731
709
|
p
|
732
|
-
|
710
|
+
3
|
733
711
|
s
|
734
712
|
18
|
735
713
|
returns a response
|
@@ -821,228 +799,14 @@ p
|
|
821
799
|
x
|
822
800
|
2
|
823
801
|
it
|
824
|
-
s
|
825
|
-
26
|
826
|
-
when local IP is specified
|
827
|
-
M
|
828
|
-
1
|
829
802
|
p
|
830
|
-
2
|
831
|
-
x
|
832
|
-
9
|
833
|
-
for_block
|
834
|
-
t
|
835
|
-
n
|
836
|
-
x
|
837
|
-
6
|
838
|
-
Sucker
|
839
|
-
i
|
840
|
-
19
|
841
|
-
5
|
842
|
-
56
|
843
|
-
0
|
844
|
-
47
|
845
|
-
50
|
846
|
-
1
|
847
|
-
0
|
848
|
-
15
|
849
|
-
5
|
850
|
-
7
|
851
|
-
2
|
852
|
-
64
|
853
|
-
56
|
854
803
|
3
|
855
|
-
47
|
856
|
-
50
|
857
|
-
4
|
858
|
-
1
|
859
|
-
11
|
860
|
-
I
|
861
|
-
4
|
862
|
-
I
|
863
|
-
0
|
864
|
-
I
|
865
|
-
0
|
866
|
-
I
|
867
|
-
0
|
868
|
-
I
|
869
|
-
-2
|
870
|
-
p
|
871
|
-
5
|
872
|
-
M
|
873
|
-
1
|
874
|
-
p
|
875
|
-
2
|
876
|
-
x
|
877
|
-
9
|
878
|
-
for_block
|
879
|
-
t
|
880
|
-
n
|
881
|
-
x
|
882
|
-
6
|
883
|
-
Sucker
|
884
|
-
i
|
885
|
-
14
|
886
|
-
5
|
887
|
-
48
|
888
|
-
0
|
889
|
-
7
|
890
|
-
1
|
891
|
-
64
|
892
|
-
13
|
893
|
-
18
|
894
|
-
2
|
895
|
-
49
|
896
|
-
2
|
897
|
-
1
|
898
|
-
15
|
899
|
-
11
|
900
|
-
I
|
901
|
-
4
|
902
|
-
I
|
903
|
-
0
|
904
|
-
I
|
905
|
-
0
|
906
|
-
I
|
907
|
-
0
|
908
|
-
I
|
909
|
-
-2
|
910
|
-
p
|
911
|
-
3
|
912
|
-
x
|
913
|
-
6
|
914
|
-
worker
|
915
|
-
s
|
916
|
-
11
|
917
|
-
192.168.0.1
|
918
|
-
x
|
919
|
-
9
|
920
|
-
local_ip=
|
921
|
-
p
|
922
|
-
3
|
923
|
-
I
|
924
|
-
0
|
925
|
-
I
|
926
|
-
1c
|
927
|
-
I
|
928
|
-
e
|
929
|
-
x
|
930
|
-
58
|
931
|
-
/Users/hakanensari/code/sucker/spec/sucker/request_spec.rb
|
932
|
-
p
|
933
|
-
0
|
934
|
-
x
|
935
|
-
6
|
936
|
-
before
|
937
|
-
s
|
938
|
-
30
|
939
|
-
routes request through that IP
|
940
|
-
M
|
941
|
-
1
|
942
|
-
p
|
943
|
-
2
|
944
|
-
x
|
945
|
-
9
|
946
|
-
for_block
|
947
|
-
t
|
948
|
-
n
|
949
|
-
x
|
950
|
-
6
|
951
|
-
Sucker
|
952
|
-
i
|
953
|
-
16
|
954
|
-
5
|
955
|
-
7
|
956
|
-
0
|
957
|
-
64
|
958
|
-
47
|
959
|
-
49
|
960
|
-
1
|
961
|
-
1
|
962
|
-
15
|
963
|
-
5
|
964
|
-
48
|
965
|
-
2
|
966
|
-
49
|
967
|
-
3
|
968
|
-
0
|
969
|
-
11
|
970
|
-
I
|
971
|
-
3
|
972
|
-
I
|
973
|
-
0
|
974
|
-
I
|
975
|
-
0
|
976
|
-
I
|
977
|
-
0
|
978
|
-
I
|
979
|
-
-2
|
980
|
-
p
|
981
|
-
4
|
982
|
-
s
|
983
|
-
27
|
984
|
-
Figure out how to test this
|
985
|
-
x
|
986
|
-
7
|
987
|
-
pending
|
988
|
-
x
|
989
|
-
6
|
990
|
-
worker
|
991
|
-
x
|
992
|
-
3
|
993
|
-
get
|
994
|
-
p
|
995
|
-
5
|
996
|
-
I
|
997
|
-
0
|
998
|
-
I
|
999
|
-
20
|
1000
|
-
I
|
1001
|
-
9
|
1002
|
-
I
|
1003
|
-
21
|
1004
|
-
I
|
1005
|
-
10
|
1006
|
-
x
|
1007
|
-
58
|
1008
|
-
/Users/hakanensari/code/sucker/spec/sucker/request_spec.rb
|
1009
|
-
p
|
1010
|
-
0
|
1011
|
-
x
|
1012
|
-
2
|
1013
|
-
it
|
1014
|
-
p
|
1015
|
-
5
|
1016
|
-
I
|
1017
|
-
0
|
1018
|
-
I
|
1019
|
-
1b
|
1020
|
-
I
|
1021
|
-
8
|
1022
|
-
I
|
1023
|
-
1f
|
1024
|
-
I
|
1025
|
-
13
|
1026
|
-
x
|
1027
|
-
58
|
1028
|
-
/Users/hakanensari/code/sucker/spec/sucker/request_spec.rb
|
1029
|
-
p
|
1030
|
-
0
|
1031
|
-
x
|
1032
|
-
7
|
1033
|
-
context
|
1034
|
-
p
|
1035
|
-
5
|
1036
804
|
I
|
1037
805
|
0
|
1038
806
|
I
|
1039
807
|
16
|
1040
808
|
I
|
1041
809
|
b
|
1042
|
-
I
|
1043
|
-
1a
|
1044
|
-
I
|
1045
|
-
16
|
1046
810
|
x
|
1047
811
|
58
|
1048
812
|
/Users/hakanensari/code/sucker/spec/sucker/request_spec.rb
|
@@ -1184,11 +948,11 @@ p
|
|
1184
948
|
I
|
1185
949
|
0
|
1186
950
|
I
|
1187
|
-
|
951
|
+
1d
|
1188
952
|
I
|
1189
953
|
e
|
1190
954
|
I
|
1191
|
-
|
955
|
+
1e
|
1192
956
|
I
|
1193
957
|
26
|
1194
958
|
x
|
@@ -1204,7 +968,7 @@ p
|
|
1204
968
|
I
|
1205
969
|
0
|
1206
970
|
I
|
1207
|
-
|
971
|
+
1c
|
1208
972
|
I
|
1209
973
|
b
|
1210
974
|
x
|
@@ -1336,7 +1100,7 @@ p
|
|
1336
1100
|
I
|
1337
1101
|
0
|
1338
1102
|
I
|
1339
|
-
|
1103
|
+
24
|
1340
1104
|
I
|
1341
1105
|
9
|
1342
1106
|
x
|
@@ -1430,7 +1194,7 @@ p
|
|
1430
1194
|
I
|
1431
1195
|
0
|
1432
1196
|
I
|
1433
|
-
|
1197
|
+
28
|
1434
1198
|
I
|
1435
1199
|
1e
|
1436
1200
|
x
|
@@ -1502,7 +1266,7 @@ p
|
|
1502
1266
|
I
|
1503
1267
|
0
|
1504
1268
|
I
|
1505
|
-
|
1269
|
+
2c
|
1506
1270
|
I
|
1507
1271
|
f
|
1508
1272
|
x
|
@@ -1628,11 +1392,11 @@ p
|
|
1628
1392
|
I
|
1629
1393
|
0
|
1630
1394
|
I
|
1631
|
-
|
1395
|
+
30
|
1632
1396
|
I
|
1633
1397
|
14
|
1634
1398
|
I
|
1635
|
-
|
1399
|
+
31
|
1636
1400
|
I
|
1637
1401
|
32
|
1638
1402
|
x
|
@@ -1645,19 +1409,19 @@ p
|
|
1645
1409
|
I
|
1646
1410
|
0
|
1647
1411
|
I
|
1648
|
-
|
1412
|
+
23
|
1649
1413
|
I
|
1650
1414
|
a
|
1651
1415
|
I
|
1652
|
-
|
1416
|
+
27
|
1653
1417
|
I
|
1654
1418
|
15
|
1655
1419
|
I
|
1656
|
-
|
1420
|
+
2b
|
1657
1421
|
I
|
1658
1422
|
20
|
1659
1423
|
I
|
1660
|
-
|
1424
|
+
2f
|
1661
1425
|
I
|
1662
1426
|
2b
|
1663
1427
|
x
|
@@ -1789,7 +1553,7 @@ p
|
|
1789
1553
|
I
|
1790
1554
|
0
|
1791
1555
|
I
|
1792
|
-
|
1556
|
+
36
|
1793
1557
|
I
|
1794
1558
|
9
|
1795
1559
|
x
|
@@ -1884,11 +1648,11 @@ p
|
|
1884
1648
|
I
|
1885
1649
|
0
|
1886
1650
|
I
|
1887
|
-
|
1651
|
+
39
|
1888
1652
|
I
|
1889
1653
|
e
|
1890
1654
|
I
|
1891
|
-
|
1655
|
+
3a
|
1892
1656
|
I
|
1893
1657
|
1d
|
1894
1658
|
x
|
@@ -1983,11 +1747,11 @@ p
|
|
1983
1747
|
I
|
1984
1748
|
0
|
1985
1749
|
I
|
1986
|
-
|
1750
|
+
3e
|
1987
1751
|
I
|
1988
1752
|
e
|
1989
1753
|
I
|
1990
|
-
|
1754
|
+
3f
|
1991
1755
|
I
|
1992
1756
|
1d
|
1993
1757
|
x
|
@@ -2072,11 +1836,11 @@ p
|
|
2072
1836
|
I
|
2073
1837
|
0
|
2074
1838
|
I
|
2075
|
-
|
1839
|
+
43
|
2076
1840
|
I
|
2077
1841
|
b
|
2078
1842
|
I
|
2079
|
-
|
1843
|
+
44
|
2080
1844
|
I
|
2081
1845
|
19
|
2082
1846
|
x
|
@@ -2092,19 +1856,19 @@ p
|
|
2092
1856
|
I
|
2093
1857
|
0
|
2094
1858
|
I
|
2095
|
-
|
1859
|
+
36
|
2096
1860
|
I
|
2097
1861
|
a
|
2098
1862
|
I
|
2099
|
-
|
1863
|
+
38
|
2100
1864
|
I
|
2101
1865
|
15
|
2102
1866
|
I
|
2103
|
-
|
1867
|
+
3d
|
2104
1868
|
I
|
2105
1869
|
20
|
2106
1870
|
I
|
2107
|
-
|
1871
|
+
42
|
2108
1872
|
I
|
2109
1873
|
2b
|
2110
1874
|
x
|
@@ -2230,7 +1994,7 @@ p
|
|
2230
1994
|
I
|
2231
1995
|
0
|
2232
1996
|
I
|
2233
|
-
|
1997
|
+
4a
|
2234
1998
|
I
|
2235
1999
|
17
|
2236
2000
|
x
|
@@ -2246,7 +2010,7 @@ p
|
|
2246
2010
|
I
|
2247
2011
|
0
|
2248
2012
|
I
|
2249
|
-
|
2013
|
+
49
|
2250
2014
|
I
|
2251
2015
|
b
|
2252
2016
|
x
|
@@ -2385,11 +2149,11 @@ p
|
|
2385
2149
|
I
|
2386
2150
|
0
|
2387
2151
|
I
|
2388
|
-
|
2152
|
+
50
|
2389
2153
|
I
|
2390
2154
|
d
|
2391
2155
|
I
|
2392
|
-
|
2156
|
+
51
|
2393
2157
|
I
|
2394
2158
|
21
|
2395
2159
|
x
|
@@ -2405,149 +2169,7 @@ p
|
|
2405
2169
|
I
|
2406
2170
|
0
|
2407
2171
|
I
|
2408
|
-
|
2409
|
-
I
|
2410
|
-
b
|
2411
|
-
x
|
2412
|
-
58
|
2413
|
-
/Users/hakanensari/code/sucker/spec/sucker/request_spec.rb
|
2414
|
-
p
|
2415
|
-
0
|
2416
|
-
s
|
2417
|
-
4
|
2418
|
-
#uri
|
2419
|
-
M
|
2420
|
-
1
|
2421
|
-
p
|
2422
|
-
2
|
2423
|
-
x
|
2424
|
-
9
|
2425
|
-
for_block
|
2426
|
-
t
|
2427
|
-
n
|
2428
|
-
x
|
2429
|
-
6
|
2430
|
-
Sucker
|
2431
|
-
i
|
2432
|
-
11
|
2433
|
-
5
|
2434
|
-
7
|
2435
|
-
0
|
2436
|
-
64
|
2437
|
-
56
|
2438
|
-
1
|
2439
|
-
47
|
2440
|
-
50
|
2441
|
-
2
|
2442
|
-
1
|
2443
|
-
11
|
2444
|
-
I
|
2445
|
-
4
|
2446
|
-
I
|
2447
|
-
0
|
2448
|
-
I
|
2449
|
-
0
|
2450
|
-
I
|
2451
|
-
0
|
2452
|
-
I
|
2453
|
-
-2
|
2454
|
-
p
|
2455
|
-
3
|
2456
|
-
s
|
2457
|
-
42
|
2458
|
-
returns the URI with which to query Amazon
|
2459
|
-
M
|
2460
|
-
1
|
2461
|
-
p
|
2462
|
-
2
|
2463
|
-
x
|
2464
|
-
9
|
2465
|
-
for_block
|
2466
|
-
t
|
2467
|
-
n
|
2468
|
-
x
|
2469
|
-
6
|
2470
|
-
Sucker
|
2471
|
-
i
|
2472
|
-
22
|
2473
|
-
5
|
2474
|
-
48
|
2475
|
-
0
|
2476
|
-
7
|
2477
|
-
1
|
2478
|
-
49
|
2479
|
-
2
|
2480
|
-
1
|
2481
|
-
5
|
2482
|
-
45
|
2483
|
-
3
|
2484
|
-
4
|
2485
|
-
43
|
2486
|
-
5
|
2487
|
-
47
|
2488
|
-
49
|
2489
|
-
6
|
2490
|
-
1
|
2491
|
-
49
|
2492
|
-
7
|
2493
|
-
1
|
2494
|
-
11
|
2495
|
-
I
|
2496
|
-
4
|
2497
|
-
I
|
2498
|
-
0
|
2499
|
-
I
|
2500
|
-
0
|
2501
|
-
I
|
2502
|
-
0
|
2503
|
-
I
|
2504
|
-
-2
|
2505
|
-
p
|
2506
|
-
8
|
2507
|
-
x
|
2508
|
-
6
|
2509
|
-
worker
|
2510
|
-
x
|
2511
|
-
3
|
2512
|
-
uri
|
2513
|
-
x
|
2514
|
-
4
|
2515
|
-
send
|
2516
|
-
x
|
2517
|
-
3
|
2518
|
-
URI
|
2519
|
-
n
|
2520
|
-
x
|
2521
|
-
4
|
2522
|
-
HTTP
|
2523
|
-
x
|
2524
|
-
17
|
2525
|
-
be_an_instance_of
|
2526
|
-
x
|
2527
|
-
6
|
2528
|
-
should
|
2529
|
-
p
|
2530
|
-
3
|
2531
|
-
I
|
2532
|
-
0
|
2533
|
-
I
|
2534
|
-
62
|
2535
|
-
I
|
2536
|
-
16
|
2537
|
-
x
|
2538
|
-
58
|
2539
|
-
/Users/hakanensari/code/sucker/spec/sucker/request_spec.rb
|
2540
|
-
p
|
2541
|
-
0
|
2542
|
-
x
|
2543
|
-
2
|
2544
|
-
it
|
2545
|
-
p
|
2546
|
-
3
|
2547
|
-
I
|
2548
|
-
0
|
2549
|
-
I
|
2550
|
-
61
|
2172
|
+
4f
|
2551
2173
|
I
|
2552
2174
|
b
|
2553
2175
|
x
|
@@ -2556,7 +2178,7 @@ x
|
|
2556
2178
|
p
|
2557
2179
|
0
|
2558
2180
|
p
|
2559
|
-
|
2181
|
+
19
|
2560
2182
|
I
|
2561
2183
|
0
|
2562
2184
|
I
|
@@ -2576,29 +2198,25 @@ I
|
|
2576
2198
|
I
|
2577
2199
|
39
|
2578
2200
|
I
|
2579
|
-
|
2201
|
+
1b
|
2580
2202
|
I
|
2581
2203
|
44
|
2582
2204
|
I
|
2583
|
-
|
2205
|
+
22
|
2584
2206
|
I
|
2585
2207
|
4f
|
2586
2208
|
I
|
2587
|
-
|
2209
|
+
35
|
2588
2210
|
I
|
2589
2211
|
5a
|
2590
2212
|
I
|
2591
|
-
|
2213
|
+
48
|
2592
2214
|
I
|
2593
2215
|
65
|
2594
2216
|
I
|
2595
|
-
|
2217
|
+
4e
|
2596
2218
|
I
|
2597
2219
|
70
|
2598
|
-
I
|
2599
|
-
60
|
2600
|
-
I
|
2601
|
-
7b
|
2602
2220
|
x
|
2603
2221
|
58
|
2604
2222
|
/Users/hakanensari/code/sucker/spec/sucker/request_spec.rb
|