mock_search 0.22.2 → 0.22.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/mock_search/mock_search_roundtrip.rb +5 -0
- data/lib/mock_search.rb +5 -0
- data/mock_search.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NzBkMDlhNmRhZjdkNDJmNWQyYzdlZDQyNmY2YzEwN2U4YTgxNjRhMg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
M2E2OTMwZmY2YzQxM2JjNDJjNGVmODU5MDhjZDBkNzI0ZTEwNzE3Ng==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTU0MDdjNzczM2MzZGViZmMwNmE5YjAzYjA0NzJhOTk3YzhkYmY0MDQ4NWEz
|
10
|
+
YWNkMDdiYmFkMzhmN2NmZmE4MDZmY2I5NDVhYWFkNGYwODAxMmI0NDBkOWIw
|
11
|
+
MDQ5MjRiOTU0NTlkZjliODY5MWEzZDhiOGY5YzRhMDEyYTY5NTU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
N2YxODNjOTVmN2E0ZDNjNzRmNzZiOWVjMzY5ZGE3N2M3MDkzMzVmMTI2OTc5
|
14
|
+
OGQ3MzdhMTMyZjM1OWJmNjJmZGFiZDQxYmZmOTNlMGJjYTg4NGQxMjM3MDBl
|
15
|
+
YWE5OWY3MjM0OTA1OTNkMzQxYWI1NDI4OWZmMGRlZTBlOGVkZWU=
|
@@ -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
|
+
#genero la url del paginado
|
55
|
+
def generate_url_results_search_paginate_service(page)
|
56
|
+
return "#{@host}/shop/flights/data/refine/#{@description.upcase}/#{@city_from_1}/#{@city_to_1}/#{@cabotage ? 'DOMESTIC' : 'INTERNATIONAL'}/#{@result_hash['search_hash']}/1/PRECLUSTER/FARE/ASCENDING/#{page}/NA/NA/BRL/BRL/NA/NA/NA/NA/NA/NA/NA/NA/NA/NA/NA/NA/NA"
|
57
|
+
end
|
58
|
+
|
54
59
|
def get_ticket_date()
|
55
60
|
super()
|
56
61
|
@result_hash['itinerary_hash'] = @itinerary['itinerariesBox']['matchingInfoMap']['_0_0']['id']
|
data/lib/mock_search.rb
CHANGED
@@ -78,6 +78,11 @@ class MockSearch
|
|
78
78
|
return Digest::MD5.hexdigest(self.generate_url_results_search+"despegar")
|
79
79
|
end
|
80
80
|
|
81
|
+
def paginate(page)
|
82
|
+
self.get_ticket_date()
|
83
|
+
return HTTParty.get(self.generate_url_results_search_paginate_service)
|
84
|
+
end
|
85
|
+
|
81
86
|
end
|
82
87
|
|
83
88
|
require_relative 'mock_search/mock_search_oneway'
|
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.22.
|
18
|
+
gem.version = '0.22.3' #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
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mock_search
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.22.
|
4
|
+
version: 0.22.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- lgonzalez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|