gillbus 0.16.7 → 0.16.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +88 -0
  3. data/Rakefile +3 -3
  4. data/gillbus.gemspec +16 -15
  5. data/lib/gillbus.rb +10 -9
  6. data/lib/gillbus/base_request.rb +17 -19
  7. data/lib/gillbus/base_response.rb +11 -13
  8. data/lib/gillbus/buy_booking.rb +1 -9
  9. data/lib/gillbus/buy_tickets.rb +1 -8
  10. data/lib/gillbus/cancel_order.rb +0 -10
  11. data/lib/gillbus/drivers/faraday_response_file_logger.rb +1 -3
  12. data/lib/gillbus/find_order.rb +0 -5
  13. data/lib/gillbus/get_all_cities.rb +0 -2
  14. data/lib/gillbus/get_bus_image.rb +0 -3
  15. data/lib/gillbus/get_cities.rb +0 -4
  16. data/lib/gillbus/get_countries.rb +0 -4
  17. data/lib/gillbus/get_dates_new.rb +0 -4
  18. data/lib/gillbus/get_order_status.rb +1 -6
  19. data/lib/gillbus/get_order_ticket.rb +4 -7
  20. data/lib/gillbus/get_time_table.rb +0 -4
  21. data/lib/gillbus/get_trip_seats.rb +8 -11
  22. data/lib/gillbus/get_trip_segments.rb +0 -2
  23. data/lib/gillbus/get_trips.rb +0 -2
  24. data/lib/gillbus/helpers/fields.rb +5 -7
  25. data/lib/gillbus/helpers/parser.rb +10 -13
  26. data/lib/gillbus/helpers/update_attrs.rb +2 -4
  27. data/lib/gillbus/lock_seats.rb +7 -10
  28. data/lib/gillbus/logout.rb +0 -6
  29. data/lib/gillbus/parse_error.rb +3 -1
  30. data/lib/gillbus/reserve_tickets.rb +0 -2
  31. data/lib/gillbus/return_position.rb +0 -1
  32. data/lib/gillbus/search_trips.rb +5 -6
  33. data/lib/gillbus/session_login.rb +0 -6
  34. data/lib/gillbus/structs/commission.rb +4 -4
  35. data/lib/gillbus/structs/item.rb +0 -2
  36. data/lib/gillbus/structs/passenger_discount.rb +2 -3
  37. data/lib/gillbus/structs/point.rb +0 -1
  38. data/lib/gillbus/structs/return_cause.rb +0 -2
  39. data/lib/gillbus/structs/seat.rb +0 -2
  40. data/lib/gillbus/structs/segment.rb +5 -6
  41. data/lib/gillbus/structs/tariff.rb +1 -2
  42. data/lib/gillbus/structs/tariff/return_cause.rb +3 -3
  43. data/lib/gillbus/structs/ticket.rb +0 -2
  44. data/lib/gillbus/structs/timetable_trip.rb +4 -4
  45. data/lib/gillbus/structs/trip.rb +5 -6
  46. data/lib/gillbus/structs/trip_options.rb +0 -1
  47. data/lib/gillbus/structs/trip_service.rb +0 -2
  48. data/lib/gillbus/tickets_booking.rb +17 -13
  49. data/lib/gillbus/unlock_seats.rb +0 -2
  50. data/lib/gillbus/version.rb +1 -1
  51. data/script/example_booking.rb +16 -18
  52. data/script/example_booking_with_segments.rb +0 -1
  53. data/script/example_canceling_booking.rb +12 -13
  54. data/script/example_canceling_reservation.rb +11 -12
  55. data/script/example_reservation.rb +14 -15
  56. data/test/all_commissions_test.rb +1 -2
  57. data/test/buy_booking_test.rb +14 -13
  58. data/test/buy_tickets_test.rb +1 -2
  59. data/test/cancel_order_test.rb +1 -2
  60. data/test/error_test.rb +1 -3
  61. data/test/find_order_test.rb +3 -4
  62. data/test/get_bus_image_test.rb +0 -1
  63. data/test/get_cities_test.rb +1 -2
  64. data/test/get_countries_test.rb +1 -2
  65. data/test/get_dates_new_test.rb +0 -1
  66. data/test/get_order_ticket_test.rb +1 -2
  67. data/test/get_time_table_test.rb +0 -1
  68. data/test/get_trip_seats_test.rb +3 -4
  69. data/test/get_trip_segments_test.rb +5 -6
  70. data/test/lock_seats_test.rb +43 -33
  71. data/test/reserve_tickets_test.rb +10 -3
  72. data/test/return_position_test.rb +8 -5
  73. data/test/search_trips_test.rb +15 -19
  74. data/test/session_login_test.rb +0 -1
  75. data/test/tickets_booking_test.rb +2 -3
  76. metadata +24 -9
@@ -1,7 +1,6 @@
1
1
  require 'test_helper'
2
2
 
3
3
  class SessionLoginTest < Minitest::Test
4
-
5
4
  def session_login
6
5
  Gillbus::SessionLogin::Response.parse_string(File.read('test/responses/sessionLogin.xml'))
7
6
  end
@@ -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("8472", tickets_booking.tickets.first.ticket_number)
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, "UAH"), tickets_booking.tickets.first.total_amount)
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.7
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-11 00:00:00.000000000 Z
12
+ date: 2017-12-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: multi_xml
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: money
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: monetize
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: activesupport
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: rake
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: minitest
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: pry
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