gillbus 0.16.7 → 0.16.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +88 -0
- data/Rakefile +3 -3
- data/gillbus.gemspec +16 -15
- data/lib/gillbus.rb +10 -9
- data/lib/gillbus/base_request.rb +17 -19
- data/lib/gillbus/base_response.rb +11 -13
- data/lib/gillbus/buy_booking.rb +1 -9
- data/lib/gillbus/buy_tickets.rb +1 -8
- data/lib/gillbus/cancel_order.rb +0 -10
- data/lib/gillbus/drivers/faraday_response_file_logger.rb +1 -3
- data/lib/gillbus/find_order.rb +0 -5
- data/lib/gillbus/get_all_cities.rb +0 -2
- data/lib/gillbus/get_bus_image.rb +0 -3
- data/lib/gillbus/get_cities.rb +0 -4
- data/lib/gillbus/get_countries.rb +0 -4
- data/lib/gillbus/get_dates_new.rb +0 -4
- data/lib/gillbus/get_order_status.rb +1 -6
- data/lib/gillbus/get_order_ticket.rb +4 -7
- data/lib/gillbus/get_time_table.rb +0 -4
- data/lib/gillbus/get_trip_seats.rb +8 -11
- data/lib/gillbus/get_trip_segments.rb +0 -2
- data/lib/gillbus/get_trips.rb +0 -2
- data/lib/gillbus/helpers/fields.rb +5 -7
- data/lib/gillbus/helpers/parser.rb +10 -13
- data/lib/gillbus/helpers/update_attrs.rb +2 -4
- data/lib/gillbus/lock_seats.rb +7 -10
- data/lib/gillbus/logout.rb +0 -6
- data/lib/gillbus/parse_error.rb +3 -1
- data/lib/gillbus/reserve_tickets.rb +0 -2
- data/lib/gillbus/return_position.rb +0 -1
- data/lib/gillbus/search_trips.rb +5 -6
- data/lib/gillbus/session_login.rb +0 -6
- data/lib/gillbus/structs/commission.rb +4 -4
- data/lib/gillbus/structs/item.rb +0 -2
- data/lib/gillbus/structs/passenger_discount.rb +2 -3
- data/lib/gillbus/structs/point.rb +0 -1
- data/lib/gillbus/structs/return_cause.rb +0 -2
- data/lib/gillbus/structs/seat.rb +0 -2
- data/lib/gillbus/structs/segment.rb +5 -6
- data/lib/gillbus/structs/tariff.rb +1 -2
- data/lib/gillbus/structs/tariff/return_cause.rb +3 -3
- data/lib/gillbus/structs/ticket.rb +0 -2
- data/lib/gillbus/structs/timetable_trip.rb +4 -4
- data/lib/gillbus/structs/trip.rb +5 -6
- data/lib/gillbus/structs/trip_options.rb +0 -1
- data/lib/gillbus/structs/trip_service.rb +0 -2
- data/lib/gillbus/tickets_booking.rb +17 -13
- data/lib/gillbus/unlock_seats.rb +0 -2
- data/lib/gillbus/version.rb +1 -1
- data/script/example_booking.rb +16 -18
- data/script/example_booking_with_segments.rb +0 -1
- data/script/example_canceling_booking.rb +12 -13
- data/script/example_canceling_reservation.rb +11 -12
- data/script/example_reservation.rb +14 -15
- data/test/all_commissions_test.rb +1 -2
- data/test/buy_booking_test.rb +14 -13
- data/test/buy_tickets_test.rb +1 -2
- data/test/cancel_order_test.rb +1 -2
- data/test/error_test.rb +1 -3
- data/test/find_order_test.rb +3 -4
- data/test/get_bus_image_test.rb +0 -1
- data/test/get_cities_test.rb +1 -2
- data/test/get_countries_test.rb +1 -2
- data/test/get_dates_new_test.rb +0 -1
- data/test/get_order_ticket_test.rb +1 -2
- data/test/get_time_table_test.rb +0 -1
- data/test/get_trip_seats_test.rb +3 -4
- data/test/get_trip_segments_test.rb +5 -6
- data/test/lock_seats_test.rb +43 -33
- data/test/reserve_tickets_test.rb +10 -3
- data/test/return_position_test.rb +8 -5
- data/test/search_trips_test.rb +15 -19
- data/test/session_login_test.rb +0 -1
- data/test/tickets_booking_test.rb +2 -3
- metadata +24 -9
data/test/session_login_test.rb
CHANGED
@@ -1,16 +1,15 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
3
|
class TicketsBookingTest < Minitest::Test
|
4
|
-
|
5
4
|
def tickets_booking
|
6
5
|
Gillbus::TicketsBooking::Response.parse_string(File.read('test/responses/ticketsBooking.xml'))
|
7
6
|
end
|
8
7
|
|
9
8
|
def test_number
|
10
|
-
assert_equal(
|
9
|
+
assert_equal('8472', tickets_booking.tickets.first.ticket_number)
|
11
10
|
end
|
12
11
|
|
13
12
|
def test_total
|
14
|
-
assert_equal(Money.new(110_00,
|
13
|
+
assert_equal(Money.new(110_00, 'UAH'), tickets_booking.tickets.first.total_amount)
|
15
14
|
end
|
16
15
|
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.16.
|
4
|
+
version: 0.16.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexey "codesnik" Trofimenko
|
@@ -9,10 +9,10 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-12-
|
12
|
+
date: 2017-12-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
15
|
+
name: activesupport
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
18
|
- - ">="
|
@@ -40,7 +40,7 @@ dependencies:
|
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
|
-
name:
|
43
|
+
name: monetize
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - ">="
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
|
-
name:
|
57
|
+
name: money
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - ">="
|
@@ -68,7 +68,7 @@ dependencies:
|
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
|
-
name:
|
71
|
+
name: multi_xml
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
74
|
- - ">="
|
@@ -96,7 +96,7 @@ dependencies:
|
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '1.6'
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
|
-
name:
|
99
|
+
name: minitest
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
102
|
- - ">="
|
@@ -110,7 +110,7 @@ dependencies:
|
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: '0'
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
|
-
name:
|
113
|
+
name: pry
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
116
|
- - ">="
|
@@ -124,7 +124,7 @@ dependencies:
|
|
124
124
|
- !ruby/object:Gem::Version
|
125
125
|
version: '0'
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
|
-
name:
|
127
|
+
name: rake
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
130
|
- - ">="
|
@@ -137,6 +137,20 @@ dependencies:
|
|
137
137
|
- - ">="
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: '0'
|
140
|
+
- !ruby/object:Gem::Dependency
|
141
|
+
name: rubocop
|
142
|
+
requirement: !ruby/object:Gem::Requirement
|
143
|
+
requirements:
|
144
|
+
- - "~>"
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: 0.51.0
|
147
|
+
type: :development
|
148
|
+
prerelease: false
|
149
|
+
version_requirements: !ruby/object:Gem::Requirement
|
150
|
+
requirements:
|
151
|
+
- - "~>"
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: 0.51.0
|
140
154
|
description:
|
141
155
|
email:
|
142
156
|
- aronaxis@gmail.com
|
@@ -146,6 +160,7 @@ extensions: []
|
|
146
160
|
extra_rdoc_files: []
|
147
161
|
files:
|
148
162
|
- ".gitignore"
|
163
|
+
- ".rubocop.yml"
|
149
164
|
- ".ruby-version"
|
150
165
|
- Gemfile
|
151
166
|
- Guardfile
|