gillbus 0.22.1 → 0.22.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/gillbus/search_nearby_trips.rb +4 -4
- data/lib/gillbus/search_trips.rb +19 -13
- data/lib/gillbus/version.rb +1 -1
- data/test/search_trips_test.rb +2 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db8a47856a4648234134d7120a89deaba77ff229deb0dd46a8e5247004de636a
|
4
|
+
data.tar.gz: 5495b66e1753a55a41e45ebe13cb11cb06f292cc2fd0f68089897a15b7527445
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4341f6a7c5b737c71b491356b60fb150ee0c9d47c9d9b28bcdf2d62d724b51805ed6eb5985373b168f806495b1c81f88c867bd49a6bcf5fbc6af5c6a336d129c
|
7
|
+
data.tar.gz: 9e947d42361b5a83fb691136a0cf90a1ff211cc2011a70356858a6583f41cea3391226c68fb8e5fc1c4b98962cce2aebee829da1f490496314d4e67e695bfcc2
|
@@ -23,10 +23,10 @@ class Gillbus
|
|
23
23
|
|
24
24
|
def params
|
25
25
|
compact(
|
26
|
-
startCityId:
|
27
|
-
endCityId:
|
28
|
-
startDateSearch:
|
29
|
-
ticketCount:
|
26
|
+
startCityId: start_city_id,
|
27
|
+
endCityId: end_city_id,
|
28
|
+
startDateSearch: date(start_date_search),
|
29
|
+
ticketCount: ticket_count,
|
30
30
|
)
|
31
31
|
end
|
32
32
|
end
|
data/lib/gillbus/search_trips.rb
CHANGED
@@ -44,6 +44,11 @@ class Gillbus
|
|
44
44
|
# Если false, то будут искаться рейсы только в одну сторону.
|
45
45
|
attr_accessor :round_trip
|
46
46
|
|
47
|
+
# limitSegmentTripShow (опциональный параметр)
|
48
|
+
# Ограничение максимального количества сегментных рейсов.
|
49
|
+
# Если ничего не передано или передано число -1, то выдача не ограничена.
|
50
|
+
attr_accessor :limit_segment_trip_show
|
51
|
+
|
47
52
|
# backStartDateSearch (обязательный если roundTrip=true)
|
48
53
|
# Дата отправления, на которую будет произведен поиск обратных рейсов.
|
49
54
|
attr_accessor :back_start_date_search
|
@@ -93,20 +98,21 @@ class Gillbus
|
|
93
98
|
|
94
99
|
def params
|
95
100
|
compact(
|
96
|
-
selectedModes:
|
97
|
-
connectionIds:
|
98
|
-
tripFullSale:
|
99
|
-
fullSearch:
|
100
|
-
startCityId:
|
101
|
-
endCityId:
|
102
|
-
startDateSearch:
|
103
|
-
roundTrip:
|
101
|
+
selectedModes: modes(selected_modes),
|
102
|
+
connectionIds: list(connection_ids),
|
103
|
+
tripFullSale: bool(trip_full_sale),
|
104
|
+
fullSearch: bool(full_search),
|
105
|
+
startCityId: start_city_id,
|
106
|
+
endCityId: end_city_id,
|
107
|
+
startDateSearch: date(start_date_search),
|
108
|
+
roundTrip: bool(round_trip),
|
109
|
+
limitSegmentTripShow: limit_segment_trip_show,
|
104
110
|
backStartDateSearch: date(back_start_date_search),
|
105
|
-
ticketCount:
|
106
|
-
waitTimeout:
|
107
|
-
onlyBranded:
|
108
|
-
tripOptions:
|
109
|
-
insuranceId:
|
111
|
+
ticketCount: ticket_count,
|
112
|
+
waitTimeout: wait_timeout,
|
113
|
+
onlyBranded: bool(only_branded),
|
114
|
+
tripOptions: bool(trip_options),
|
115
|
+
insuranceId: insurance_id,
|
110
116
|
**passengers_data,
|
111
117
|
)
|
112
118
|
end
|
data/lib/gillbus/version.rb
CHANGED
data/test/search_trips_test.rb
CHANGED
@@ -6,6 +6,7 @@ class SearchTripsRequestTest < Minitest::Test
|
|
6
6
|
start_date_search: Date.new(2013, 2, 4),
|
7
7
|
selected_modes: [:avia, :connections],
|
8
8
|
round_trip: true,
|
9
|
+
limit_segment_trip_show: 3,
|
9
10
|
passengers: [
|
10
11
|
{
|
11
12
|
birthday: Date.parse('1990-01-01'),
|
@@ -28,6 +29,7 @@ class SearchTripsRequestTest < Minitest::Test
|
|
28
29
|
startDateSearch: '04.02.2013',
|
29
30
|
selectedModes: '3;8',
|
30
31
|
roundTrip: '1',
|
32
|
+
limitSegmentTripShow: 3,
|
31
33
|
passenger0birthday: '01.01.1990',
|
32
34
|
passenger0studentTicket: 'STUDENTTICKET#1',
|
33
35
|
passenger0studentYear: 1,
|
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.22.
|
4
|
+
version: 0.22.2
|
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: 2020-
|
12
|
+
date: 2020-04-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -312,7 +312,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
312
312
|
- !ruby/object:Gem::Version
|
313
313
|
version: '0'
|
314
314
|
requirements: []
|
315
|
-
rubygems_version: 3.
|
315
|
+
rubygems_version: 3.0.6
|
316
316
|
signing_key:
|
317
317
|
specification_version: 4
|
318
318
|
summary: Driver for Gillbus IDS API
|