gillbus 0.14.9 → 0.14.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 562bf47ff123bddcec56e6f46c2832747e8111dd
4
- data.tar.gz: 87f39697ceff122f7221706017d6407298b92815
3
+ metadata.gz: 21bf152d406847460914cf19ddd6255c42abffde
4
+ data.tar.gz: 9756e4bb926d7ce5b5d7e72ebfddf76863e9beaf
5
5
  SHA512:
6
- metadata.gz: f3f905b70f912571ca34cf49461db6c533f7b87bcf98d65d4f3027519fb96f53af564b0bb4f134174544a9d6cc42415650989ad8d44b2a315671817bff98e420
7
- data.tar.gz: a4cd6fab56f6c162a0f84b6457884c0b110eb410c77771685111e6995c47849252f6787fabd611ff11b40dd74ee29ae5e20232750860150d1ccd7efc8f04530d
6
+ metadata.gz: 562463245dd334801714fe562a6e095e11530bb2a2d5c419b4d1b9d86458bbed5749e78806d9478de58376579b802bc65845385ec8d7c0d824f6ed0d8bc387f9
7
+ data.tar.gz: '097a38c545e6343959d4f6fdaeaa2c06bf6c7bfa56095ce2fe65e04c9850ea833c83a8a003e6c94149d5b7ce2184e1e779d47778ec8921d7ef26dd5c8f0a9d53'
@@ -25,7 +25,7 @@ class Gillbus
25
25
  response_class = klass::Response
26
26
  request = request_class.new(*args)
27
27
  headers = {'Cookie' => "JSESSIONID=#{session_id}"} if session_id
28
- http_response = driver.post( request.path, request.params, headers )
28
+ http_response = driver.public_send( request.method, request.path, request.params, headers )
29
29
  result = response_class.parse_string(http_response.body.force_encoding('utf-8'))
30
30
  if cookie_string = http_response.headers["Set-Cookie"]
31
31
  returned_session_id = CGI::Cookie.parse(cookie_string)['JSESSIONID'].first
@@ -70,6 +70,7 @@ class Gillbus
70
70
  require 'gillbus/search_trips'
71
71
  require 'gillbus/get_trips'
72
72
  require 'gillbus/get_trip_seats'
73
+ require 'gillbus/get_bus_image'
73
74
  require 'gillbus/get_trip_segments'
74
75
  require 'gillbus/get_required_fields'
75
76
  require 'gillbus/lock_seats'
@@ -17,6 +17,10 @@ class Gillbus
17
17
  {}
18
18
  end
19
19
 
20
+ def method
21
+ :post
22
+ end
23
+
20
24
  private
21
25
 
22
26
  def list(items)
@@ -42,7 +46,7 @@ class Gillbus
42
46
  "uk" => "ukr",
43
47
  "th" => "tai",
44
48
  "pl" => "pol",
45
-
49
+
46
50
  # temporary, until changed in busfor
47
51
  "ua" => "ukr",
48
52
  }[ locale.to_s ] || locale.to_s
@@ -0,0 +1,30 @@
1
+ class Gillbus
2
+ module GetBusImage
3
+
4
+ Gillbus.register self, :get_bus_image
5
+
6
+ class Request < BaseRequest
7
+
8
+ def path; '/online2/GetBusImage' end
9
+
10
+ def method; :get end
11
+
12
+ # busId
13
+ # Уникальный ИД заказа, переданный при отложенной продаже.
14
+ attr_accessor :bus_id
15
+
16
+ def params
17
+ compact(
18
+ busId: bus_id,
19
+ )
20
+ end
21
+
22
+ end
23
+
24
+ class Response < BaseResponse
25
+ field :image_urls, [:string], key: 'URL'
26
+ end
27
+
28
+ end
29
+ end
30
+
@@ -1,3 +1,3 @@
1
1
  class Gillbus
2
- VERSION = "0.14.9"
2
+ VERSION = "0.14.10"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gillbus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.9
4
+ version: 0.14.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexey "codesnik" Trofimenko
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-06-14 00:00:00.000000000 Z
12
+ date: 2017-06-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: multi_xml
@@ -162,6 +162,7 @@ files:
162
162
  - lib/gillbus/drivers/faraday_response_file_logger.rb
163
163
  - lib/gillbus/find_order.rb
164
164
  - lib/gillbus/get_all_cities.rb
165
+ - lib/gillbus/get_bus_image.rb
165
166
  - lib/gillbus/get_cities.rb
166
167
  - lib/gillbus/get_countries.rb
167
168
  - lib/gillbus/get_dates_new.rb
@@ -308,3 +309,4 @@ test_files:
308
309
  - test/session_login_test.rb
309
310
  - test/test_helper.rb
310
311
  - test/tickets_booking_test.rb
312
+ has_rdoc: