mock_search 0.20.1 → 0.20.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjlkNGM3YTE3NDY0ZjE4MjRjM2JkNDc0MGVjZGRhZTQ0MjJkMzQxYQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MWMxMTNiZWJmYTIwYTU3MmNkOGNhODFlOTFjNTMyZWQ2YTg1MzcyOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MjdmMTYwMDYyZTk0NTcxNWU5YThmNjU3NjljNmE1Y2JhMjYwNmE3MDgyODY1
|
10
|
+
YTEyZDg5MTg4M2FlMTljNTM0MDdkM2MwMDZkNjAxMTQ5MzJlMzBhN2YwMTE5
|
11
|
+
ZTcxYzljOGE4OGM4ZmM5MTFkNWE2YjYxMmVjMTMxZDJhNzU0NGM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZGNmNGUxM2U2N2Q5NzBkMDdiYjZjOWNiNjAxNGI5MGFhMzEzMzQyODVlYmVl
|
14
|
+
MzNhNjZjOWI1MjBhYmIzZmZmZTBlYjg5ZjY0NTlkNTM1NGExZThmYWEyYTA1
|
15
|
+
Y2EzMzAwZWZkYWZhNGEzNGY2NjhlN2ExMTZmYzg4YzllZGY4MWM=
|
@@ -44,6 +44,11 @@ class MockSearchMultipledestinations < MockSearch
|
|
44
44
|
return @host + "/shop/flights/data/search/multipledestinations/" + @path + "/TOTALFARE/ASCENDING?hashForData=#{digest_md5()}"
|
45
45
|
end
|
46
46
|
|
47
|
+
def get_ticket_date()
|
48
|
+
super()
|
49
|
+
@result_hash['itineraryHash'] = @itinerary['id']
|
50
|
+
end
|
51
|
+
|
47
52
|
def get_advanced_bussinnes
|
48
53
|
return ""
|
49
54
|
end
|
@@ -38,6 +38,11 @@ class MockSearchOneway < MockSearch
|
|
38
38
|
return @host + "/shop/flights/data/search/oneway/" + @path + "/TOTALFARE/ASCENDING/NA/NA/NA/NA?hashForData=#{digest_md5()}"
|
39
39
|
end
|
40
40
|
|
41
|
+
def get_ticket_date()
|
42
|
+
super()
|
43
|
+
@result_hash['itineraryHash'] = @itinerary['itinerariesBox']['matchingInfoMap']['_0_0']['id']
|
44
|
+
end
|
45
|
+
|
41
46
|
def get_advanced_bussinnes()
|
42
47
|
return "/NA/C/NA/NA"
|
43
48
|
end
|
@@ -51,6 +51,11 @@ class MockSearchRoundtrip < MockSearch
|
|
51
51
|
return @host + "/shop/flights/data/search/roundtrip/" + @path + "/TOTALFARE/ASCENDING/NA/NA/NA/NA/NA?hashForData=#{digest_md5()}"
|
52
52
|
end
|
53
53
|
|
54
|
+
def get_ticket_date()
|
55
|
+
super()
|
56
|
+
@result_hash['itineraryHash'] = @itinerary['itinerariesBox']['matchingInfoMap']['_0_0']['id']
|
57
|
+
end
|
58
|
+
|
54
59
|
def get_advanced_bussinnes()
|
55
60
|
return "/NA/NA/C/NA/NA"
|
56
61
|
end
|
data/lib/mock_search.rb
CHANGED
@@ -58,12 +58,11 @@ class MockSearch
|
|
58
58
|
@result_hash = {}
|
59
59
|
|
60
60
|
json = self.get_results_search_service
|
61
|
-
itinerary = json['result']['data']['items'][0]
|
61
|
+
@itinerary = json['result']['data']['items'][0]
|
62
62
|
ticket = json['result']['data']['metadata']['ticket']
|
63
63
|
|
64
64
|
@result_hash['search_hash'] = ticket['hash']
|
65
65
|
@result_hash['search_version'] = ticket['version']
|
66
|
-
@result_hash['itineraryHash'] = itinerary['itineraryInfo']['id']
|
67
66
|
end
|
68
67
|
|
69
68
|
def generate_url_checkout()
|
data/mock_search.gemspec
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
|
16
16
|
gem.require_paths = ["lib"] #Usualmente es solo lib -> ["lib"]
|
17
17
|
|
18
|
-
gem.version = '0.20.
|
18
|
+
gem.version = '0.20.2' #La version se debe incrementar cada vez que se desea publicar una nueva version del test.
|
19
19
|
|
20
20
|
gem.add_dependency('httparty')
|
21
21
|
|