gillbus 0.14.1 → 0.14.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/structs/passenger_discount.rb +7 -0
- data/lib/gillbus/version.rb +1 -1
- data/test/search_trips_test.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 982001d704d3ac752218a336703baa55977012b4
|
4
|
+
data.tar.gz: 91230ec7c43fa47809666bc893bbadedf1977ac8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81ed8c643d806c977a1daa6c50b111e6b60fb4978efcc43296f0d433ef12ef59ab4c6b587da3e9d848f7b99a2c11a43941080711968dac5fec612b7a586a1b37
|
7
|
+
data.tar.gz: bab48717da4188e5a8500291c104c4bdd740eb7211dd3fa09c2bfe4eb9bea832d229938928c56ec17940dda3877c6aed46f33645357030ac5564cad6b87e52c4
|
@@ -25,12 +25,19 @@ class Gillbus
|
|
25
25
|
# Номер ISIC пассажира с порядковым номером 0...N.
|
26
26
|
attr_accessor :isic
|
27
27
|
|
28
|
+
# passenger0withSeat...passengerNwithSeat (не обязательный), boolean
|
29
|
+
# Признак обязательного предоставления места пассажиру с порядковым номером 0…N.
|
30
|
+
# По-умолчанию false. Если true, то пассажиру будет подобран тариф
|
31
|
+
# с предоставлением места, если такой имеется.
|
32
|
+
attr_accessor :with_seat
|
33
|
+
|
28
34
|
def params(prefix="")
|
29
35
|
compact(
|
30
36
|
birthday: date(birthday),
|
31
37
|
studentTicket: student_ticket,
|
32
38
|
studentYear: student_year,
|
33
39
|
ISIC: isic,
|
40
|
+
withSeat: bool(with_seat),
|
34
41
|
).map {|k, v| [:"#{prefix}#{k}", v] }.to_h
|
35
42
|
end
|
36
43
|
end
|
data/lib/gillbus/version.rb
CHANGED
data/test/search_trips_test.rb
CHANGED
@@ -13,12 +13,14 @@ class SearchTripsRequestTest < Minitest::Test
|
|
13
13
|
student_ticket: 'STUDENTTICKET#1',
|
14
14
|
student_year: 1,
|
15
15
|
isic: 'ISIC#1',
|
16
|
+
with_seat: true,
|
16
17
|
},
|
17
18
|
{
|
18
19
|
birthday: Date.parse('1990-02-02'),
|
19
20
|
student_ticket: 'STUDENTTICKET#2',
|
20
21
|
student_year: 2,
|
21
22
|
isic: 'ISIC#2',
|
23
|
+
with_seat: false,
|
22
24
|
}
|
23
25
|
],
|
24
26
|
)
|
@@ -31,10 +33,12 @@ class SearchTripsRequestTest < Minitest::Test
|
|
31
33
|
passenger0studentTicket: 'STUDENTTICKET#1',
|
32
34
|
passenger0studentYear: 1,
|
33
35
|
passenger0ISIC: 'ISIC#1',
|
36
|
+
passenger0withSeat: '1',
|
34
37
|
passenger1birthday: '02.02.1990',
|
35
38
|
passenger1studentTicket: 'STUDENTTICKET#2',
|
36
39
|
passenger1studentYear: 2,
|
37
40
|
passenger1ISIC: 'ISIC#2',
|
41
|
+
passenger1withSeat: '0',
|
38
42
|
}
|
39
43
|
|
40
44
|
assert_equal expected_params, req.params
|
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.
|
4
|
+
version: 0.14.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: 2017-03-
|
12
|
+
date: 2017-03-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_xml
|