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
data/lib/sucker/response.rb
CHANGED
@@ -3,13 +3,13 @@ require 'sucker/hash'
|
|
3
3
|
|
4
4
|
module Sucker
|
5
5
|
|
6
|
-
# A wrapper around the response
|
6
|
+
# A wrapper around the API response.
|
7
7
|
class Response
|
8
8
|
|
9
|
-
# The response body
|
9
|
+
# The response body.
|
10
10
|
attr_accessor :body
|
11
11
|
|
12
|
-
# The HTTP status code of the response
|
12
|
+
# The HTTP status code of the response.
|
13
13
|
attr_accessor :code
|
14
14
|
|
15
15
|
def initialize(response)
|
@@ -17,61 +17,66 @@ module Sucker
|
|
17
17
|
self.code = response.code
|
18
18
|
end
|
19
19
|
|
20
|
-
# A shorthand that
|
20
|
+
# A shorthand that queries for a specified attribute and yields to a given
|
21
|
+
# block each matching document.
|
21
22
|
#
|
22
23
|
# response.each('Item') { |item| process_item(item) }
|
23
24
|
#
|
24
|
-
def each(path)
|
25
|
-
find(path).each { |match|
|
25
|
+
def each(path, &block)
|
26
|
+
find(path).each { |match| block.call(match) }
|
26
27
|
end
|
27
28
|
|
28
|
-
# Returns an array of errors in the
|
29
|
+
# Returns an array of errors in the response.
|
29
30
|
def errors
|
30
31
|
find('Error')
|
31
32
|
end
|
32
33
|
|
33
|
-
# Queries
|
34
|
+
# Queries for a specified attribute and returns an array of matching
|
35
|
+
# documents.
|
34
36
|
#
|
35
37
|
# items = response.find('Item')
|
36
38
|
#
|
37
|
-
def find(
|
38
|
-
xml.xpath("//xmlns:#{
|
39
|
+
def find(attribute)
|
40
|
+
xml.xpath("//xmlns:#{attribute}").map do |element|
|
41
|
+
Hash.from_xml(element)
|
42
|
+
end
|
39
43
|
end
|
40
|
-
|
41
44
|
alias_method :[], :find
|
42
45
|
|
43
|
-
# Returns true if response contains errors
|
46
|
+
# Returns true if the response contains errors.
|
44
47
|
def has_errors?
|
45
48
|
errors.count > 0
|
46
49
|
end
|
47
50
|
|
48
|
-
# A shorthand that
|
51
|
+
# A shorthand that queries for a specifed attribute, yields to a given
|
52
|
+
# block matching documents, and collects final values.
|
49
53
|
#
|
50
|
-
#
|
54
|
+
# items = response.map('Item') { |item| # do something }
|
51
55
|
#
|
52
|
-
def map(path)
|
53
|
-
find(path).map { |match|
|
56
|
+
def map(path, &block)
|
57
|
+
find(path).map { |match| block.call(match) }
|
54
58
|
end
|
55
59
|
|
56
|
-
# Parses response into a simple hash
|
60
|
+
# Parses the response into a simple hash.
|
57
61
|
def to_hash
|
58
62
|
Hash.from_xml(xml)
|
59
63
|
end
|
60
64
|
|
61
|
-
# Checks if the HTTP response is OK
|
65
|
+
# Checks if the HTTP response is OK.
|
62
66
|
#
|
63
67
|
# response = worker.get
|
64
|
-
#
|
68
|
+
# response.valid?
|
65
69
|
# => true
|
66
70
|
#
|
67
71
|
def valid?
|
68
72
|
code == '200'
|
69
73
|
end
|
70
74
|
|
71
|
-
# The XML document
|
75
|
+
# The XML document.
|
72
76
|
#
|
73
77
|
# response = worker.get
|
74
78
|
# response.xml
|
79
|
+
#
|
75
80
|
def xml
|
76
81
|
@xml ||= Nokogiri::XML(body)
|
77
82
|
end
|
data/lib/sucker/response.rbc
CHANGED
@@ -9,7 +9,7 @@ x
|
|
9
9
|
10
|
10
10
|
__script__
|
11
11
|
i
|
12
|
-
|
12
|
+
46
|
13
13
|
5
|
14
14
|
7
|
15
15
|
0
|
@@ -19,30 +19,39 @@ i
|
|
19
19
|
1
|
20
20
|
1
|
21
21
|
15
|
22
|
-
|
22
|
+
5
|
23
23
|
7
|
24
24
|
2
|
25
|
-
|
25
|
+
64
|
26
|
+
47
|
26
27
|
49
|
28
|
+
1
|
29
|
+
1
|
30
|
+
15
|
31
|
+
99
|
32
|
+
7
|
27
33
|
3
|
34
|
+
65
|
35
|
+
49
|
36
|
+
4
|
28
37
|
2
|
29
38
|
13
|
30
39
|
99
|
31
40
|
12
|
32
41
|
7
|
33
|
-
|
42
|
+
5
|
34
43
|
12
|
35
44
|
7
|
36
|
-
|
45
|
+
6
|
37
46
|
12
|
38
47
|
65
|
39
48
|
12
|
40
49
|
49
|
41
|
-
|
50
|
+
7
|
42
51
|
4
|
43
52
|
15
|
44
53
|
49
|
45
|
-
|
54
|
+
5
|
46
55
|
0
|
47
56
|
15
|
48
57
|
2
|
@@ -57,13 +66,16 @@ I
|
|
57
66
|
0
|
58
67
|
n
|
59
68
|
p
|
60
|
-
|
69
|
+
8
|
61
70
|
s
|
62
|
-
|
63
|
-
|
71
|
+
8
|
72
|
+
nokogiri
|
64
73
|
x
|
65
74
|
7
|
66
75
|
require
|
76
|
+
s
|
77
|
+
11
|
78
|
+
sucker/hash
|
67
79
|
x
|
68
80
|
6
|
69
81
|
Sucker
|
@@ -139,7 +151,7 @@ x
|
|
139
151
|
8
|
140
152
|
Response
|
141
153
|
i
|
142
|
-
|
154
|
+
154
|
143
155
|
5
|
144
156
|
66
|
145
157
|
5
|
@@ -214,11 +226,21 @@ i
|
|
214
226
|
6
|
215
227
|
4
|
216
228
|
15
|
217
|
-
|
229
|
+
5
|
218
230
|
7
|
219
231
|
13
|
220
232
|
7
|
233
|
+
11
|
234
|
+
47
|
235
|
+
49
|
221
236
|
14
|
237
|
+
2
|
238
|
+
15
|
239
|
+
99
|
240
|
+
7
|
241
|
+
15
|
242
|
+
7
|
243
|
+
16
|
222
244
|
65
|
223
245
|
67
|
224
246
|
49
|
@@ -230,9 +252,9 @@ i
|
|
230
252
|
15
|
231
253
|
99
|
232
254
|
7
|
233
|
-
|
255
|
+
17
|
234
256
|
7
|
235
|
-
|
257
|
+
18
|
236
258
|
65
|
237
259
|
67
|
238
260
|
49
|
@@ -244,9 +266,9 @@ i
|
|
244
266
|
15
|
245
267
|
99
|
246
268
|
7
|
247
|
-
|
269
|
+
19
|
248
270
|
7
|
249
|
-
|
271
|
+
20
|
250
272
|
65
|
251
273
|
67
|
252
274
|
49
|
@@ -256,15 +278,25 @@ i
|
|
256
278
|
6
|
257
279
|
4
|
258
280
|
15
|
281
|
+
99
|
282
|
+
7
|
283
|
+
21
|
284
|
+
7
|
285
|
+
22
|
286
|
+
65
|
287
|
+
67
|
288
|
+
49
|
259
289
|
5
|
260
|
-
|
261
|
-
|
290
|
+
0
|
291
|
+
49
|
292
|
+
6
|
293
|
+
4
|
262
294
|
15
|
263
295
|
99
|
264
296
|
7
|
265
|
-
|
297
|
+
23
|
266
298
|
7
|
267
|
-
|
299
|
+
24
|
268
300
|
65
|
269
301
|
67
|
270
302
|
49
|
@@ -284,7 +316,7 @@ I
|
|
284
316
|
0
|
285
317
|
n
|
286
318
|
p
|
287
|
-
|
319
|
+
25
|
288
320
|
x
|
289
321
|
4
|
290
322
|
body
|
@@ -364,23 +396,23 @@ p
|
|
364
396
|
I
|
365
397
|
-1
|
366
398
|
I
|
367
|
-
|
399
|
+
f
|
368
400
|
I
|
369
401
|
0
|
370
402
|
I
|
371
|
-
|
403
|
+
50
|
372
404
|
I
|
373
405
|
1
|
374
406
|
I
|
375
|
-
|
407
|
+
10
|
376
408
|
I
|
377
409
|
f
|
378
410
|
I
|
379
|
-
|
411
|
+
50
|
380
412
|
I
|
381
413
|
10
|
382
414
|
I
|
383
|
-
|
415
|
+
11
|
384
416
|
I
|
385
417
|
1e
|
386
418
|
x
|
@@ -398,6 +430,118 @@ x
|
|
398
430
|
15
|
399
431
|
add_defn_method
|
400
432
|
x
|
433
|
+
4
|
434
|
+
each
|
435
|
+
M
|
436
|
+
1
|
437
|
+
n
|
438
|
+
n
|
439
|
+
x
|
440
|
+
4
|
441
|
+
each
|
442
|
+
i
|
443
|
+
13
|
444
|
+
5
|
445
|
+
20
|
446
|
+
0
|
447
|
+
47
|
448
|
+
49
|
449
|
+
0
|
450
|
+
1
|
451
|
+
56
|
452
|
+
1
|
453
|
+
50
|
454
|
+
2
|
455
|
+
0
|
456
|
+
11
|
457
|
+
I
|
458
|
+
3
|
459
|
+
I
|
460
|
+
1
|
461
|
+
I
|
462
|
+
1
|
463
|
+
I
|
464
|
+
1
|
465
|
+
n
|
466
|
+
p
|
467
|
+
3
|
468
|
+
x
|
469
|
+
4
|
470
|
+
find
|
471
|
+
M
|
472
|
+
1
|
473
|
+
p
|
474
|
+
2
|
475
|
+
x
|
476
|
+
9
|
477
|
+
for_block
|
478
|
+
t
|
479
|
+
n
|
480
|
+
x
|
481
|
+
4
|
482
|
+
each
|
483
|
+
i
|
484
|
+
9
|
485
|
+
57
|
486
|
+
19
|
487
|
+
0
|
488
|
+
15
|
489
|
+
20
|
490
|
+
0
|
491
|
+
60
|
492
|
+
1
|
493
|
+
11
|
494
|
+
I
|
495
|
+
3
|
496
|
+
I
|
497
|
+
1
|
498
|
+
I
|
499
|
+
1
|
500
|
+
I
|
501
|
+
1
|
502
|
+
n
|
503
|
+
p
|
504
|
+
0
|
505
|
+
p
|
506
|
+
3
|
507
|
+
I
|
508
|
+
0
|
509
|
+
I
|
510
|
+
19
|
511
|
+
I
|
512
|
+
9
|
513
|
+
x
|
514
|
+
53
|
515
|
+
/Users/hakanensari/code/sucker/lib/sucker/response.rb
|
516
|
+
p
|
517
|
+
1
|
518
|
+
x
|
519
|
+
5
|
520
|
+
match
|
521
|
+
x
|
522
|
+
4
|
523
|
+
each
|
524
|
+
p
|
525
|
+
5
|
526
|
+
I
|
527
|
+
-1
|
528
|
+
I
|
529
|
+
18
|
530
|
+
I
|
531
|
+
0
|
532
|
+
I
|
533
|
+
19
|
534
|
+
I
|
535
|
+
d
|
536
|
+
x
|
537
|
+
53
|
538
|
+
/Users/hakanensari/code/sucker/lib/sucker/response.rb
|
539
|
+
p
|
540
|
+
1
|
541
|
+
x
|
542
|
+
4
|
543
|
+
path
|
544
|
+
x
|
401
545
|
6
|
402
546
|
errors
|
403
547
|
M
|
@@ -440,11 +584,11 @@ p
|
|
440
584
|
I
|
441
585
|
-1
|
442
586
|
I
|
443
|
-
|
587
|
+
1d
|
444
588
|
I
|
445
589
|
0
|
446
590
|
I
|
447
|
-
|
591
|
+
1e
|
448
592
|
I
|
449
593
|
9
|
450
594
|
x
|
@@ -521,30 +665,22 @@ x
|
|
521
665
|
4
|
522
666
|
find
|
523
667
|
i
|
524
|
-
|
668
|
+
13
|
525
669
|
57
|
526
670
|
19
|
527
671
|
0
|
528
672
|
15
|
529
|
-
|
530
|
-
20
|
531
|
-
0
|
532
|
-
49
|
533
|
-
0
|
673
|
+
45
|
534
674
|
0
|
535
|
-
21
|
536
675
|
1
|
676
|
+
20
|
537
677
|
0
|
538
678
|
49
|
539
|
-
1
|
540
|
-
1
|
541
|
-
47
|
542
|
-
49
|
543
679
|
2
|
544
680
|
1
|
545
681
|
11
|
546
682
|
I
|
547
|
-
|
683
|
+
4
|
548
684
|
I
|
549
685
|
1
|
550
686
|
I
|
@@ -555,30 +691,28 @@ n
|
|
555
691
|
p
|
556
692
|
3
|
557
693
|
x
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
2
|
562
|
-
[]
|
694
|
+
4
|
695
|
+
Hash
|
696
|
+
n
|
563
697
|
x
|
564
|
-
|
565
|
-
|
698
|
+
8
|
699
|
+
from_xml
|
566
700
|
p
|
567
701
|
3
|
568
702
|
I
|
569
703
|
0
|
570
704
|
I
|
571
|
-
|
705
|
+
26
|
572
706
|
I
|
573
|
-
|
707
|
+
d
|
574
708
|
x
|
575
709
|
53
|
576
710
|
/Users/hakanensari/code/sucker/lib/sucker/response.rb
|
577
711
|
p
|
578
712
|
1
|
579
713
|
x
|
580
|
-
|
581
|
-
|
714
|
+
7
|
715
|
+
element
|
582
716
|
x
|
583
717
|
3
|
584
718
|
map
|
@@ -587,11 +721,11 @@ p
|
|
587
721
|
I
|
588
722
|
-1
|
589
723
|
I
|
590
|
-
|
724
|
+
25
|
591
725
|
I
|
592
726
|
0
|
593
727
|
I
|
594
|
-
|
728
|
+
26
|
595
729
|
I
|
596
730
|
15
|
597
731
|
x
|
@@ -603,6 +737,12 @@ x
|
|
603
737
|
4
|
604
738
|
path
|
605
739
|
x
|
740
|
+
2
|
741
|
+
[]
|
742
|
+
x
|
743
|
+
12
|
744
|
+
alias_method
|
745
|
+
x
|
606
746
|
11
|
607
747
|
has_errors?
|
608
748
|
M
|
@@ -649,11 +789,11 @@ p
|
|
649
789
|
I
|
650
790
|
-1
|
651
791
|
I
|
652
|
-
|
792
|
+
2c
|
653
793
|
I
|
654
794
|
0
|
655
795
|
I
|
656
|
-
|
796
|
+
2d
|
657
797
|
I
|
658
798
|
a
|
659
799
|
x
|
@@ -662,153 +802,138 @@ x
|
|
662
802
|
p
|
663
803
|
0
|
664
804
|
x
|
665
|
-
|
666
|
-
|
805
|
+
3
|
806
|
+
map
|
667
807
|
M
|
668
808
|
1
|
669
809
|
n
|
670
810
|
n
|
671
811
|
x
|
672
|
-
|
673
|
-
|
812
|
+
3
|
813
|
+
map
|
674
814
|
i
|
675
|
-
|
676
|
-
5
|
815
|
+
13
|
677
816
|
5
|
678
|
-
|
679
|
-
0
|
680
|
-
49
|
681
|
-
1
|
817
|
+
20
|
682
818
|
0
|
683
819
|
47
|
684
820
|
49
|
685
|
-
|
821
|
+
0
|
686
822
|
1
|
823
|
+
56
|
824
|
+
1
|
825
|
+
50
|
826
|
+
2
|
827
|
+
0
|
687
828
|
11
|
688
829
|
I
|
689
|
-
|
830
|
+
3
|
690
831
|
I
|
691
|
-
|
832
|
+
1
|
692
833
|
I
|
693
|
-
|
834
|
+
1
|
694
835
|
I
|
695
|
-
|
836
|
+
1
|
696
837
|
n
|
697
838
|
p
|
698
839
|
3
|
699
840
|
x
|
700
|
-
|
701
|
-
|
702
|
-
x
|
703
|
-
7
|
704
|
-
to_hash
|
705
|
-
x
|
706
|
-
13
|
707
|
-
strip_content
|
708
|
-
p
|
709
|
-
5
|
710
|
-
I
|
711
|
-
-1
|
712
|
-
I
|
713
|
-
2d
|
714
|
-
I
|
715
|
-
0
|
716
|
-
I
|
717
|
-
2e
|
718
|
-
I
|
719
|
-
c
|
720
|
-
x
|
721
|
-
53
|
722
|
-
/Users/hakanensari/code/sucker/lib/sucker/response.rb
|
723
|
-
p
|
724
|
-
0
|
725
|
-
x
|
726
|
-
6
|
727
|
-
valid?
|
841
|
+
4
|
842
|
+
find
|
728
843
|
M
|
729
844
|
1
|
730
|
-
|
845
|
+
p
|
846
|
+
2
|
847
|
+
x
|
848
|
+
9
|
849
|
+
for_block
|
850
|
+
t
|
731
851
|
n
|
732
852
|
x
|
733
|
-
|
734
|
-
|
853
|
+
3
|
854
|
+
map
|
735
855
|
i
|
736
856
|
9
|
737
|
-
|
738
|
-
|
857
|
+
57
|
858
|
+
19
|
739
859
|
0
|
740
|
-
|
860
|
+
15
|
861
|
+
20
|
862
|
+
0
|
863
|
+
60
|
741
864
|
1
|
742
|
-
64
|
743
|
-
83
|
744
|
-
2
|
745
865
|
11
|
746
866
|
I
|
747
|
-
|
867
|
+
3
|
748
868
|
I
|
749
|
-
|
869
|
+
1
|
750
870
|
I
|
751
|
-
|
871
|
+
1
|
752
872
|
I
|
753
|
-
|
873
|
+
1
|
754
874
|
n
|
755
875
|
p
|
876
|
+
0
|
877
|
+
p
|
756
878
|
3
|
879
|
+
I
|
880
|
+
0
|
881
|
+
I
|
882
|
+
36
|
883
|
+
I
|
884
|
+
9
|
757
885
|
x
|
758
|
-
|
759
|
-
code
|
760
|
-
|
761
|
-
|
762
|
-
200
|
886
|
+
53
|
887
|
+
/Users/hakanensari/code/sucker/lib/sucker/response.rb
|
888
|
+
p
|
889
|
+
1
|
763
890
|
x
|
764
|
-
|
765
|
-
|
891
|
+
5
|
892
|
+
match
|
893
|
+
x
|
894
|
+
3
|
895
|
+
map
|
766
896
|
p
|
767
897
|
5
|
768
898
|
I
|
769
899
|
-1
|
770
900
|
I
|
771
|
-
|
901
|
+
35
|
772
902
|
I
|
773
903
|
0
|
774
904
|
I
|
775
|
-
|
905
|
+
36
|
776
906
|
I
|
777
|
-
|
907
|
+
d
|
778
908
|
x
|
779
909
|
53
|
780
910
|
/Users/hakanensari/code/sucker/lib/sucker/response.rb
|
781
911
|
p
|
782
|
-
|
912
|
+
1
|
783
913
|
x
|
784
|
-
|
785
|
-
|
914
|
+
4
|
915
|
+
path
|
916
|
+
x
|
917
|
+
7
|
918
|
+
to_hash
|
786
919
|
M
|
787
920
|
1
|
788
921
|
n
|
789
922
|
n
|
790
923
|
x
|
791
|
-
|
792
|
-
|
924
|
+
7
|
925
|
+
to_hash
|
793
926
|
i
|
794
|
-
18
|
795
|
-
39
|
796
|
-
0
|
797
|
-
13
|
798
927
|
10
|
799
|
-
17
|
800
|
-
15
|
801
928
|
45
|
929
|
+
0
|
802
930
|
1
|
803
|
-
2
|
804
931
|
5
|
805
932
|
48
|
806
|
-
|
933
|
+
2
|
807
934
|
49
|
808
|
-
|
935
|
+
3
|
809
936
|
1
|
810
|
-
38
|
811
|
-
0
|
812
937
|
11
|
813
938
|
I
|
814
939
|
2
|
@@ -820,462 +945,217 @@ I
|
|
820
945
|
0
|
821
946
|
n
|
822
947
|
p
|
823
|
-
5
|
824
|
-
x
|
825
948
|
4
|
826
|
-
@xml
|
827
|
-
x
|
828
|
-
8
|
829
|
-
Nokogiri
|
830
|
-
n
|
831
949
|
x
|
832
950
|
4
|
833
|
-
|
951
|
+
Hash
|
952
|
+
n
|
834
953
|
x
|
835
954
|
3
|
836
|
-
|
955
|
+
xml
|
956
|
+
x
|
957
|
+
8
|
958
|
+
from_xml
|
837
959
|
p
|
838
960
|
5
|
839
961
|
I
|
840
962
|
-1
|
841
963
|
I
|
842
|
-
|
964
|
+
3a
|
843
965
|
I
|
844
966
|
0
|
845
967
|
I
|
846
|
-
|
968
|
+
3b
|
847
969
|
I
|
848
|
-
|
970
|
+
a
|
849
971
|
x
|
850
972
|
53
|
851
973
|
/Users/hakanensari/code/sucker/lib/sucker/response.rb
|
852
974
|
p
|
853
975
|
0
|
854
976
|
x
|
855
|
-
|
856
|
-
|
857
|
-
x
|
858
|
-
13
|
859
|
-
strip_content
|
977
|
+
6
|
978
|
+
valid?
|
860
979
|
M
|
861
980
|
1
|
862
981
|
n
|
863
982
|
n
|
864
983
|
x
|
865
|
-
|
866
|
-
|
984
|
+
6
|
985
|
+
valid?
|
867
986
|
i
|
868
|
-
88
|
869
|
-
20
|
870
|
-
0
|
871
|
-
13
|
872
|
-
45
|
873
|
-
0
|
874
|
-
1
|
875
|
-
12
|
876
|
-
49
|
877
|
-
2
|
878
|
-
1
|
879
|
-
9
|
880
|
-
22
|
881
|
-
15
|
882
|
-
20
|
883
|
-
0
|
884
|
-
56
|
885
|
-
3
|
886
|
-
50
|
887
|
-
4
|
888
|
-
0
|
889
987
|
8
|
890
|
-
87
|
891
|
-
13
|
892
|
-
45
|
893
988
|
5
|
894
|
-
|
895
|
-
12
|
896
|
-
49
|
897
|
-
2
|
898
|
-
1
|
899
|
-
9
|
900
|
-
84
|
901
|
-
15
|
902
|
-
20
|
903
|
-
0
|
904
|
-
49
|
905
|
-
7
|
906
|
-
0
|
907
|
-
49
|
908
|
-
8
|
989
|
+
48
|
909
990
|
0
|
910
|
-
|
991
|
+
4
|
992
|
+
200
|
911
993
|
83
|
912
|
-
9
|
913
|
-
13
|
914
|
-
9
|
915
|
-
56
|
916
|
-
15
|
917
|
-
20
|
918
|
-
0
|
919
|
-
7
|
920
|
-
10
|
921
|
-
64
|
922
|
-
49
|
923
|
-
11
|
924
|
-
1
|
925
|
-
9
|
926
|
-
68
|
927
|
-
20
|
928
|
-
0
|
929
|
-
7
|
930
|
-
10
|
931
|
-
64
|
932
|
-
49
|
933
|
-
11
|
934
|
-
1
|
935
|
-
8
|
936
|
-
82
|
937
|
-
20
|
938
|
-
0
|
939
|
-
44
|
940
|
-
43
|
941
|
-
5
|
942
|
-
78
|
943
|
-
49
|
944
|
-
12
|
945
|
-
1
|
946
|
-
56
|
947
|
-
13
|
948
|
-
50
|
949
|
-
14
|
950
994
|
1
|
951
|
-
8
|
952
|
-
87
|
953
|
-
15
|
954
|
-
20
|
955
|
-
0
|
956
995
|
11
|
957
996
|
I
|
958
|
-
|
997
|
+
2
|
959
998
|
I
|
960
|
-
|
999
|
+
0
|
961
1000
|
I
|
962
|
-
|
1001
|
+
0
|
963
1002
|
I
|
964
|
-
|
965
|
-
n
|
966
|
-
p
|
967
|
-
15
|
968
|
-
x
|
969
|
-
5
|
970
|
-
Array
|
1003
|
+
0
|
971
1004
|
n
|
972
|
-
x
|
973
|
-
3
|
974
|
-
===
|
975
|
-
M
|
976
|
-
1
|
977
1005
|
p
|
978
1006
|
2
|
979
1007
|
x
|
980
|
-
|
981
|
-
|
982
|
-
t
|
983
|
-
n
|
1008
|
+
4
|
1009
|
+
code
|
984
1010
|
x
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
12
|
989
|
-
57
|
990
|
-
19
|
991
|
-
0
|
992
|
-
15
|
1011
|
+
2
|
1012
|
+
==
|
1013
|
+
p
|
993
1014
|
5
|
994
|
-
20
|
995
|
-
0
|
996
|
-
47
|
997
|
-
49
|
998
|
-
0
|
999
|
-
1
|
1000
|
-
11
|
1001
|
-
I
|
1002
|
-
4
|
1003
|
-
I
|
1004
|
-
1
|
1005
1015
|
I
|
1006
|
-
1
|
1016
|
+
-1
|
1007
1017
|
I
|
1008
|
-
|
1009
|
-
n
|
1010
|
-
p
|
1011
|
-
1
|
1012
|
-
x
|
1013
|
-
13
|
1014
|
-
strip_content
|
1015
|
-
p
|
1016
|
-
3
|
1018
|
+
44
|
1017
1019
|
I
|
1018
1020
|
0
|
1019
1021
|
I
|
1020
|
-
|
1022
|
+
45
|
1021
1023
|
I
|
1022
|
-
|
1024
|
+
8
|
1023
1025
|
x
|
1024
1026
|
53
|
1025
1027
|
/Users/hakanensari/code/sucker/lib/sucker/response.rb
|
1026
1028
|
p
|
1027
|
-
|
1028
|
-
x
|
1029
|
-
5
|
1030
|
-
child
|
1029
|
+
0
|
1031
1030
|
x
|
1032
1031
|
3
|
1033
|
-
|
1034
|
-
x
|
1035
|
-
4
|
1036
|
-
Hash
|
1037
|
-
n
|
1038
|
-
x
|
1039
|
-
4
|
1040
|
-
keys
|
1041
|
-
x
|
1042
|
-
4
|
1043
|
-
size
|
1044
|
-
x
|
1045
|
-
2
|
1046
|
-
==
|
1047
|
-
s
|
1048
|
-
11
|
1049
|
-
__content__
|
1050
|
-
x
|
1051
|
-
2
|
1052
|
-
[]
|
1053
|
-
x
|
1054
|
-
16
|
1055
|
-
new_from_literal
|
1032
|
+
xml
|
1056
1033
|
M
|
1057
1034
|
1
|
1058
|
-
|
1059
|
-
2
|
1060
|
-
x
|
1061
|
-
9
|
1062
|
-
for_block
|
1063
|
-
t
|
1035
|
+
n
|
1064
1036
|
n
|
1065
1037
|
x
|
1066
|
-
|
1067
|
-
|
1038
|
+
3
|
1039
|
+
xml
|
1068
1040
|
i
|
1069
|
-
|
1070
|
-
|
1071
|
-
37
|
1072
|
-
19
|
1041
|
+
21
|
1042
|
+
39
|
1073
1043
|
0
|
1074
|
-
|
1075
|
-
|
1076
|
-
19
|
1077
|
-
1
|
1078
|
-
15
|
1079
|
-
15
|
1044
|
+
13
|
1045
|
+
10
|
1080
1046
|
20
|
1081
|
-
1
|
1082
|
-
97
|
1083
|
-
37
|
1084
|
-
19
|
1085
|
-
2
|
1086
|
-
15
|
1087
|
-
37
|
1088
|
-
19
|
1089
|
-
3
|
1090
|
-
15
|
1091
1047
|
15
|
1092
|
-
|
1093
|
-
15
|
1094
|
-
20
|
1095
|
-
0
|
1096
|
-
44
|
1097
|
-
43
|
1098
|
-
0
|
1099
|
-
79
|
1100
|
-
49
|
1101
|
-
1
|
1048
|
+
45
|
1102
1049
|
1
|
1103
|
-
13
|
1104
|
-
20
|
1105
1050
|
2
|
1106
1051
|
5
|
1107
|
-
|
1108
|
-
3
|
1109
|
-
47
|
1110
|
-
49
|
1111
|
-
2
|
1112
|
-
1
|
1113
|
-
49
|
1052
|
+
48
|
1114
1053
|
3
|
1115
|
-
2
|
1116
|
-
15
|
1117
1054
|
49
|
1118
1055
|
4
|
1056
|
+
0
|
1057
|
+
49
|
1058
|
+
5
|
1119
1059
|
1
|
1060
|
+
38
|
1061
|
+
0
|
1120
1062
|
11
|
1121
1063
|
I
|
1122
|
-
|
1064
|
+
2
|
1123
1065
|
I
|
1124
|
-
|
1066
|
+
0
|
1125
1067
|
I
|
1126
|
-
|
1068
|
+
0
|
1127
1069
|
I
|
1128
|
-
|
1070
|
+
0
|
1129
1071
|
n
|
1130
1072
|
p
|
1131
|
-
|
1073
|
+
6
|
1132
1074
|
x
|
1133
1075
|
4
|
1134
|
-
|
1135
|
-
x
|
1136
|
-
16
|
1137
|
-
new_from_literal
|
1138
|
-
x
|
1139
|
-
13
|
1140
|
-
strip_content
|
1141
|
-
x
|
1142
|
-
3
|
1143
|
-
[]=
|
1076
|
+
@xml
|
1144
1077
|
x
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
7
|
1149
|
-
I
|
1150
|
-
0
|
1151
|
-
I
|
1152
|
-
4e
|
1153
|
-
I
|
1154
|
-
a
|
1155
|
-
I
|
1156
|
-
4f
|
1157
|
-
I
|
1158
|
-
18
|
1159
|
-
I
|
1160
|
-
50
|
1161
|
-
I
|
1162
|
-
33
|
1078
|
+
8
|
1079
|
+
Nokogiri
|
1080
|
+
n
|
1163
1081
|
x
|
1164
|
-
53
|
1165
|
-
/Users/hakanensari/code/sucker/lib/sucker/response.rb
|
1166
|
-
p
|
1167
1082
|
4
|
1083
|
+
body
|
1168
1084
|
x
|
1169
|
-
|
1170
|
-
|
1171
|
-
x
|
1172
|
-
2
|
1173
|
-
kv
|
1174
|
-
x
|
1175
|
-
1
|
1176
|
-
k
|
1177
|
-
x
|
1178
|
-
1
|
1179
|
-
v
|
1085
|
+
4
|
1086
|
+
dump
|
1180
1087
|
x
|
1181
|
-
|
1182
|
-
|
1088
|
+
3
|
1089
|
+
XML
|
1183
1090
|
p
|
1184
|
-
|
1091
|
+
5
|
1185
1092
|
I
|
1186
1093
|
-1
|
1187
1094
|
I
|
1188
|
-
46
|
1189
|
-
I
|
1190
|
-
0
|
1191
|
-
I
|
1192
|
-
47
|
1193
|
-
I
|
1194
|
-
2
|
1195
|
-
I
|
1196
|
-
48
|
1197
|
-
I
|
1198
|
-
d
|
1199
|
-
I
|
1200
|
-
49
|
1201
|
-
I
|
1202
|
-
16
|
1203
|
-
I
|
1204
|
-
4a
|
1205
|
-
I
|
1206
|
-
21
|
1207
|
-
I
|
1208
|
-
4b
|
1209
|
-
I
|
1210
|
-
3a
|
1211
|
-
I
|
1212
1095
|
4c
|
1213
1096
|
I
|
1214
|
-
|
1215
|
-
I
|
1216
|
-
4e
|
1217
|
-
I
|
1218
|
-
55
|
1097
|
+
0
|
1219
1098
|
I
|
1220
|
-
|
1099
|
+
4d
|
1221
1100
|
I
|
1222
|
-
|
1101
|
+
15
|
1223
1102
|
x
|
1224
1103
|
53
|
1225
1104
|
/Users/hakanensari/code/sucker/lib/sucker/response.rb
|
1226
1105
|
p
|
1227
|
-
|
1228
|
-
x
|
1229
|
-
4
|
1230
|
-
node
|
1106
|
+
0
|
1231
1107
|
p
|
1232
|
-
|
1108
|
+
25
|
1233
1109
|
I
|
1234
1110
|
2
|
1235
1111
|
I
|
1236
|
-
|
1112
|
+
a
|
1237
1113
|
I
|
1238
1114
|
a
|
1239
1115
|
I
|
1240
|
-
|
1116
|
+
d
|
1241
1117
|
I
|
1242
1118
|
12
|
1243
1119
|
I
|
1244
|
-
|
1120
|
+
f
|
1245
1121
|
I
|
1246
1122
|
20
|
1247
1123
|
I
|
1248
|
-
|
1124
|
+
18
|
1249
1125
|
I
|
1250
1126
|
2e
|
1251
1127
|
I
|
1252
|
-
|
1128
|
+
1d
|
1253
1129
|
I
|
1254
1130
|
3c
|
1255
1131
|
I
|
1256
|
-
|
1132
|
+
25
|
1257
1133
|
I
|
1258
1134
|
4a
|
1259
1135
|
I
|
1260
|
-
|
1136
|
+
29
|
1261
1137
|
I
|
1262
|
-
|
1138
|
+
54
|
1263
1139
|
I
|
1264
|
-
|
1140
|
+
2c
|
1265
1141
|
I
|
1266
|
-
|
1142
|
+
62
|
1267
1143
|
I
|
1268
|
-
|
1144
|
+
35
|
1269
1145
|
I
|
1270
|
-
|
1146
|
+
70
|
1271
1147
|
I
|
1272
|
-
|
1148
|
+
3a
|
1273
1149
|
I
|
1274
|
-
|
1150
|
+
7e
|
1275
1151
|
I
|
1276
|
-
|
1152
|
+
44
|
1153
|
+
I
|
1154
|
+
8c
|
1155
|
+
I
|
1156
|
+
4c
|
1277
1157
|
I
|
1278
|
-
|
1158
|
+
9a
|
1279
1159
|
x
|
1280
1160
|
53
|
1281
1161
|
/Users/hakanensari/code/sucker/lib/sucker/response.rb
|
@@ -1289,7 +1169,7 @@ p
|
|
1289
1169
|
I
|
1290
1170
|
2
|
1291
1171
|
I
|
1292
|
-
|
1172
|
+
7
|
1293
1173
|
I
|
1294
1174
|
1d
|
1295
1175
|
x
|
@@ -1301,17 +1181,21 @@ x
|
|
1301
1181
|
13
|
1302
1182
|
attach_method
|
1303
1183
|
p
|
1304
|
-
|
1184
|
+
7
|
1305
1185
|
I
|
1306
1186
|
0
|
1307
1187
|
I
|
1308
|
-
|
1188
|
+
1
|
1309
1189
|
I
|
1310
1190
|
9
|
1311
1191
|
I
|
1312
|
-
|
1192
|
+
2
|
1313
1193
|
I
|
1314
|
-
|
1194
|
+
12
|
1195
|
+
I
|
1196
|
+
4
|
1197
|
+
I
|
1198
|
+
2e
|
1315
1199
|
x
|
1316
1200
|
53
|
1317
1201
|
/Users/hakanensari/code/sucker/lib/sucker/response.rb
|