mock_search 0.21 → 0.22

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
- MjBhZmEzY2EwYTRlMGJhNzM0MmNhYmFiZDFmOTcwOTdmYjY1OTVhZg==
4
+ MzNiODBkMDYxNjNiYWQ4ZGI0NzVjYzIzYTdhMzVhZGQyZGExZTQyYQ==
5
5
  data.tar.gz: !binary |-
6
- M2ZhNDMzZWEzNjJmMzYzNTIzYjJmNDdmNDhlMzUyZTcxMDUxZjYyMw==
6
+ MjRjMTc0MTQzZjczMDhlZTliYmZiNGFlMjJmMTRlZDgxNDM5NzQ2Mg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Y2Q2MWJjZWVjZmYwYzU2NmIxY2NmZTE0MjY3ODliNjM1NDJhYjFmYjA0OTQ3
10
- MTg0ZGZiODA1MmRiMjJkNjVjZWU2ZDVjYTE0MjQzZWI0YzVkYzEyZmQ2ODBj
11
- NzRmMjUwODkyNjFkYzFhZTFlZjMzMDViNzRjYTY1MWVlYzI4YmE=
9
+ NjIxYWI5MTk3MWIwYjAzNDBlMTY0ZjUzYTg1ODkyYmUwMTY1NWI2MTBkMmVk
10
+ OTYxMTkxNWJiNDk1ZWM4Y2YxMGUwZjZjYTIyN2Q2ODU3MTIzMmNiMjA2YjA5
11
+ OThmOTk4MDA3NzQzNGRlOTdjZDZmZWE4MmY5MmU2YjU5YWQ1OGY=
12
12
  data.tar.gz: !binary |-
13
- NzM1ODg0NjdiZmI3YTAxNGU0ODA5MzU0ODg5OGE5NzAzNWMxNTY2YWQ4M2Fl
14
- MWMwODI4OWQ4MGEyYTFkYWE0OGVjZTJiYWUyNTVhZmZlNDM0NjNkNGQwNDQ2
15
- YWJmMTA1Njg5MTcwMGY0NTkwNDU2NTNiNWQ3YTg1OTY1MDYxMzQ=
13
+ MTNmOTRlYmRjNmUyYTk3ZWI1ZDkxMjUxMWM1MWRjNWI5MTA1MTYwYWRjNWJl
14
+ ZTBlMzI5NzEyZDY2MGNiMjc5NjA2OTlhZmMyZjRiMzNhMTBlZWMxZTc5MTAx
15
+ YmQxYTQwNzUwOWU2YTgwZDc1MGRlODBhNmFjZTcyYmNhNWQ1OWM=
data/lib/mock_search.rb CHANGED
@@ -6,12 +6,13 @@ require_relative 'mock_city'
6
6
 
7
7
  class MockSearch
8
8
 
9
- attr_reader :adt, :cnn, :inf, :host, :cabotage, :itinerary
9
+ attr_reader :adt, :cnn, :inf, :host, :cabotage, :itinerary, :json
10
10
 
11
11
  def initialize(site,env,cabotage)
12
12
  @site = site
13
13
  @host = generar_host(site,env)
14
14
  @cabotage = (cabotage=='true')
15
+ @json = nil
15
16
  end
16
17
 
17
18
  #genero el host de la url a la cual nos vamos a conectar, se genera a partir del pais y ambiente enviados como parametros.
@@ -51,7 +52,10 @@ class MockSearch
51
52
  end
52
53
 
53
54
  def get_results_search_service
54
- return HTTParty.get(self.generate_url_results_search_service,:headers => {"referer" => self.generate_url_results_search})
55
+ if @json
56
+ @json = HTTParty.get(self.generate_url_results_search_service,:headers => {"referer" => self.generate_url_results_search})
57
+ end
58
+ return @json
55
59
  end
56
60
 
57
61
  def get_ticket_date()
@@ -64,7 +68,7 @@ class MockSearch
64
68
  @result_hash['search_hash'] = ticket['hash']
65
69
  @result_hash['search_version'] = ticket['version']
66
70
  end
67
-
71
+
68
72
  def generate_url_checkout()
69
73
  self.get_ticket_date()
70
74
  return @host.gsub('http','https') + "/book/flights/checkout/#{@result_hash['search_hash']}/#{@result_hash['search_version']}/#{@result_hash['itinerary_hash']}/"
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.21' #La version se debe incrementar cada vez que se desea publicar una nueva version del test.
18
+ gem.version = '0.22' #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.21'
4
+ version: '0.22'
5
5
  platform: ruby
6
6
  authors:
7
7
  - lgonzalez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-25 00:00:00.000000000 Z
11
+ date: 2013-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty