quicktravel_client 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.ruby-version +1 -1
- data/.travis.yml +0 -6
- data/CHANGELOG.md +5 -0
- data/gemfiles/rails2.gemfile +8 -0
- data/lib/quick_travel/booking.rb +1 -1
- data/lib/quick_travel/cache.rb +4 -4
- data/lib/quick_travel/resource.rb +2 -2
- data/lib/quick_travel/version.rb +1 -1
- data/quicktravel_client.gemspec +2 -2
- data/spec/spec_helper.rb +1 -1
- data/spec/support/cassettes/booking_create.yml +1 -1
- data/spec/support/cassettes/reservation_with_extra_picks.yml +2 -2
- data/spec/support/cassettes/resource_fare_bases.yml +1 -1
- data/spec/support/cassettes/resource_show.yml +1 -1
- metadata +90 -52
- checksums.yaml +0 -7
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
ruby-1.9.3-p551
|
data/.travis.yml
CHANGED
@@ -1,17 +1,11 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
3
|
- 1.9
|
4
|
-
- 2.2
|
5
4
|
script: "bundle && bundle exec rake coverage"
|
6
5
|
gemfile:
|
7
6
|
- gemfiles/rails2.gemfile
|
8
|
-
- gemfiles/rails4.gemfile
|
9
7
|
matrix:
|
10
8
|
exclude:
|
11
|
-
- rvm: 1.9
|
12
|
-
gemfile: gemfiles/rails4.gemfile
|
13
|
-
- rvm: 2.2
|
14
|
-
gemfile: gemfiles/rails2.gemfile
|
15
9
|
notifications:
|
16
10
|
email:
|
17
11
|
- support@travellink.com.au
|
data/CHANGELOG.md
ADDED
data/lib/quick_travel/booking.rb
CHANGED
@@ -82,7 +82,7 @@ module QuickTravel
|
|
82
82
|
default_options = { referral_code_id: DEFAULT_REFERRAL_CODE_ID }
|
83
83
|
options = { booking: default_options.merge(options) }
|
84
84
|
|
85
|
-
response = post_and_validate("#{
|
85
|
+
response = post_and_validate("#{api_base}.json", options)
|
86
86
|
fail AdapterException.new(response) unless response['id']
|
87
87
|
|
88
88
|
return nil unless response['id']
|
data/lib/quick_travel/cache.rb
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
module QuickTravel
|
2
2
|
module Cache
|
3
|
-
def cache(key, &block)
|
4
|
-
QuickTravel::Cache.cache(key) do
|
3
|
+
def cache(key, cache_options = {}, &block)
|
4
|
+
QuickTravel::Cache.cache(key, cache_options) do
|
5
5
|
block.call
|
6
6
|
end
|
7
7
|
end
|
8
8
|
|
9
|
-
def self.cache(key)
|
9
|
+
def self.cache(key, cache_options = {})
|
10
10
|
cached_value = cache_store.read(key)
|
11
11
|
return cached_value unless cached_value.nil?
|
12
12
|
return nil unless block_given?
|
13
|
-
yield.tap { |value| cache_store.write(key, value) }
|
13
|
+
yield.tap { |value| cache_store.write(key, value, cache_options) }
|
14
14
|
end
|
15
15
|
|
16
16
|
def self.cache_store
|
@@ -20,10 +20,10 @@ module QuickTravel
|
|
20
20
|
:client_type_ids,
|
21
21
|
:restrict_to_client_types,
|
22
22
|
:type
|
23
|
-
self.api_base = '/resources'
|
23
|
+
self.api_base = '/api/resources'
|
24
24
|
|
25
25
|
def sub_resources
|
26
|
-
Resource.find_all!('/resources.json', parent_resource_id: @id)
|
26
|
+
Resource.find_all!('/api/resources.json', parent_resource_id: @id)
|
27
27
|
end
|
28
28
|
|
29
29
|
def product_type
|
data/lib/quick_travel/version.rb
CHANGED
data/quicktravel_client.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
17
17
|
spec.require_paths = ['lib']
|
18
18
|
|
19
|
-
spec.add_dependency 'httparty'
|
19
|
+
spec.add_dependency 'httparty', '0.13.5'
|
20
20
|
spec.add_dependency 'geokit', '~> 1.8.3' # used in address model
|
21
21
|
spec.add_dependency 'activesupport', '>= 2.0.0'
|
22
22
|
spec.add_dependency 'money_extensions'
|
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.add_development_dependency 'simplecov-rcov'
|
32
32
|
spec.add_development_dependency 'coveralls'
|
33
33
|
spec.add_development_dependency 'stamp' # Used to send appropriate dates to API's
|
34
|
-
spec.add_development_dependency 'vcr'
|
34
|
+
spec.add_development_dependency 'vcr', '2.9.3'
|
35
35
|
spec.add_development_dependency 'fakeweb'
|
36
36
|
spec.add_development_dependency 'rubocop'
|
37
37
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -71,7 +71,7 @@ http_interactions:
|
|
71
71
|
recorded_at: Thu, 18 Dec 2014 08:05:03 GMT
|
72
72
|
- request:
|
73
73
|
method: get
|
74
|
-
uri: http://0.0.0.0:8080/resources/4.json?
|
74
|
+
uri: http://0.0.0.0:8080/api/resources/4.json?
|
75
75
|
body:
|
76
76
|
encoding: US-ASCII
|
77
77
|
string: access_key=<QT_KEY>
|
@@ -117,7 +117,7 @@ http_interactions:
|
|
117
117
|
recorded_at: Thu, 18 Dec 2014 08:05:03 GMT
|
118
118
|
- request:
|
119
119
|
method: get
|
120
|
-
uri: http://0.0.0.0:8080/resources/3.json?
|
120
|
+
uri: http://0.0.0.0:8080/api/resources/3.json?
|
121
121
|
body:
|
122
122
|
encoding: US-ASCII
|
123
123
|
string: access_key=<QT_KEY>
|
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quicktravel_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Michael Noack
|
@@ -10,250 +11,284 @@ authors:
|
|
10
11
|
autorequire:
|
11
12
|
bindir: bin
|
12
13
|
cert_chain: []
|
13
|
-
date:
|
14
|
+
date: 2019-04-12 00:00:00.000000000 Z
|
14
15
|
dependencies:
|
15
16
|
- !ruby/object:Gem::Dependency
|
16
17
|
name: httparty
|
17
18
|
requirement: !ruby/object:Gem::Requirement
|
19
|
+
none: false
|
18
20
|
requirements:
|
19
|
-
- -
|
21
|
+
- - '='
|
20
22
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
23
|
+
version: 0.13.5
|
22
24
|
type: :runtime
|
23
25
|
prerelease: false
|
24
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
|
+
none: false
|
25
28
|
requirements:
|
26
|
-
- -
|
29
|
+
- - '='
|
27
30
|
- !ruby/object:Gem::Version
|
28
|
-
version:
|
31
|
+
version: 0.13.5
|
29
32
|
- !ruby/object:Gem::Dependency
|
30
33
|
name: geokit
|
31
34
|
requirement: !ruby/object:Gem::Requirement
|
35
|
+
none: false
|
32
36
|
requirements:
|
33
|
-
- -
|
37
|
+
- - ~>
|
34
38
|
- !ruby/object:Gem::Version
|
35
39
|
version: 1.8.3
|
36
40
|
type: :runtime
|
37
41
|
prerelease: false
|
38
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
none: false
|
39
44
|
requirements:
|
40
|
-
- -
|
45
|
+
- - ~>
|
41
46
|
- !ruby/object:Gem::Version
|
42
47
|
version: 1.8.3
|
43
48
|
- !ruby/object:Gem::Dependency
|
44
49
|
name: activesupport
|
45
50
|
requirement: !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
46
52
|
requirements:
|
47
|
-
- -
|
53
|
+
- - ! '>='
|
48
54
|
- !ruby/object:Gem::Version
|
49
55
|
version: 2.0.0
|
50
56
|
type: :runtime
|
51
57
|
prerelease: false
|
52
58
|
version_requirements: !ruby/object:Gem::Requirement
|
59
|
+
none: false
|
53
60
|
requirements:
|
54
|
-
- -
|
61
|
+
- - ! '>='
|
55
62
|
- !ruby/object:Gem::Version
|
56
63
|
version: 2.0.0
|
57
64
|
- !ruby/object:Gem::Dependency
|
58
65
|
name: money_extensions
|
59
66
|
requirement: !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
60
68
|
requirements:
|
61
|
-
- -
|
69
|
+
- - ! '>='
|
62
70
|
- !ruby/object:Gem::Version
|
63
71
|
version: '0'
|
64
72
|
type: :runtime
|
65
73
|
prerelease: false
|
66
74
|
version_requirements: !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
67
76
|
requirements:
|
68
|
-
- -
|
77
|
+
- - ! '>='
|
69
78
|
- !ruby/object:Gem::Version
|
70
79
|
version: '0'
|
71
80
|
- !ruby/object:Gem::Dependency
|
72
81
|
name: facets
|
73
82
|
requirement: !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
74
84
|
requirements:
|
75
|
-
- -
|
85
|
+
- - ! '>='
|
76
86
|
- !ruby/object:Gem::Version
|
77
87
|
version: '0'
|
78
88
|
type: :runtime
|
79
89
|
prerelease: false
|
80
90
|
version_requirements: !ruby/object:Gem::Requirement
|
91
|
+
none: false
|
81
92
|
requirements:
|
82
|
-
- -
|
93
|
+
- - ! '>='
|
83
94
|
- !ruby/object:Gem::Version
|
84
95
|
version: '0'
|
85
96
|
- !ruby/object:Gem::Dependency
|
86
97
|
name: money
|
87
98
|
requirement: !ruby/object:Gem::Requirement
|
99
|
+
none: false
|
88
100
|
requirements:
|
89
|
-
- -
|
101
|
+
- - ! '>='
|
90
102
|
- !ruby/object:Gem::Version
|
91
103
|
version: '3.0'
|
92
|
-
- -
|
104
|
+
- - <
|
93
105
|
- !ruby/object:Gem::Version
|
94
106
|
version: '6.0'
|
95
107
|
type: :runtime
|
96
108
|
prerelease: false
|
97
109
|
version_requirements: !ruby/object:Gem::Requirement
|
110
|
+
none: false
|
98
111
|
requirements:
|
99
|
-
- -
|
112
|
+
- - ! '>='
|
100
113
|
- !ruby/object:Gem::Version
|
101
114
|
version: '3.0'
|
102
|
-
- -
|
115
|
+
- - <
|
103
116
|
- !ruby/object:Gem::Version
|
104
117
|
version: '6.0'
|
105
118
|
- !ruby/object:Gem::Dependency
|
106
119
|
name: bundler
|
107
120
|
requirement: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
108
122
|
requirements:
|
109
|
-
- -
|
123
|
+
- - ~>
|
110
124
|
- !ruby/object:Gem::Version
|
111
125
|
version: '1.7'
|
112
126
|
type: :development
|
113
127
|
prerelease: false
|
114
128
|
version_requirements: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
115
130
|
requirements:
|
116
|
-
- -
|
131
|
+
- - ~>
|
117
132
|
- !ruby/object:Gem::Version
|
118
133
|
version: '1.7'
|
119
134
|
- !ruby/object:Gem::Dependency
|
120
135
|
name: rake
|
121
136
|
requirement: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
122
138
|
requirements:
|
123
|
-
- -
|
139
|
+
- - ! '>='
|
124
140
|
- !ruby/object:Gem::Version
|
125
141
|
version: '0'
|
126
142
|
type: :development
|
127
143
|
prerelease: false
|
128
144
|
version_requirements: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
129
146
|
requirements:
|
130
|
-
- -
|
147
|
+
- - ! '>='
|
131
148
|
- !ruby/object:Gem::Version
|
132
149
|
version: '0'
|
133
150
|
- !ruby/object:Gem::Dependency
|
134
151
|
name: rspec
|
135
152
|
requirement: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
136
154
|
requirements:
|
137
|
-
- -
|
155
|
+
- - ! '>='
|
138
156
|
- !ruby/object:Gem::Version
|
139
157
|
version: '0'
|
140
158
|
type: :development
|
141
159
|
prerelease: false
|
142
160
|
version_requirements: !ruby/object:Gem::Requirement
|
161
|
+
none: false
|
143
162
|
requirements:
|
144
|
-
- -
|
163
|
+
- - ! '>='
|
145
164
|
- !ruby/object:Gem::Version
|
146
165
|
version: '0'
|
147
166
|
- !ruby/object:Gem::Dependency
|
148
167
|
name: rspec-its
|
149
168
|
requirement: !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
150
170
|
requirements:
|
151
|
-
- -
|
171
|
+
- - ! '>='
|
152
172
|
- !ruby/object:Gem::Version
|
153
173
|
version: '0'
|
154
174
|
type: :development
|
155
175
|
prerelease: false
|
156
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
none: false
|
157
178
|
requirements:
|
158
|
-
- -
|
179
|
+
- - ! '>='
|
159
180
|
- !ruby/object:Gem::Version
|
160
181
|
version: '0'
|
161
182
|
- !ruby/object:Gem::Dependency
|
162
183
|
name: simplecov
|
163
184
|
requirement: !ruby/object:Gem::Requirement
|
185
|
+
none: false
|
164
186
|
requirements:
|
165
|
-
- -
|
187
|
+
- - ! '>='
|
166
188
|
- !ruby/object:Gem::Version
|
167
189
|
version: '0'
|
168
190
|
type: :development
|
169
191
|
prerelease: false
|
170
192
|
version_requirements: !ruby/object:Gem::Requirement
|
193
|
+
none: false
|
171
194
|
requirements:
|
172
|
-
- -
|
195
|
+
- - ! '>='
|
173
196
|
- !ruby/object:Gem::Version
|
174
197
|
version: '0'
|
175
198
|
- !ruby/object:Gem::Dependency
|
176
199
|
name: simplecov-rcov
|
177
200
|
requirement: !ruby/object:Gem::Requirement
|
201
|
+
none: false
|
178
202
|
requirements:
|
179
|
-
- -
|
203
|
+
- - ! '>='
|
180
204
|
- !ruby/object:Gem::Version
|
181
205
|
version: '0'
|
182
206
|
type: :development
|
183
207
|
prerelease: false
|
184
208
|
version_requirements: !ruby/object:Gem::Requirement
|
209
|
+
none: false
|
185
210
|
requirements:
|
186
|
-
- -
|
211
|
+
- - ! '>='
|
187
212
|
- !ruby/object:Gem::Version
|
188
213
|
version: '0'
|
189
214
|
- !ruby/object:Gem::Dependency
|
190
215
|
name: coveralls
|
191
216
|
requirement: !ruby/object:Gem::Requirement
|
217
|
+
none: false
|
192
218
|
requirements:
|
193
|
-
- -
|
219
|
+
- - ! '>='
|
194
220
|
- !ruby/object:Gem::Version
|
195
221
|
version: '0'
|
196
222
|
type: :development
|
197
223
|
prerelease: false
|
198
224
|
version_requirements: !ruby/object:Gem::Requirement
|
225
|
+
none: false
|
199
226
|
requirements:
|
200
|
-
- -
|
227
|
+
- - ! '>='
|
201
228
|
- !ruby/object:Gem::Version
|
202
229
|
version: '0'
|
203
230
|
- !ruby/object:Gem::Dependency
|
204
231
|
name: stamp
|
205
232
|
requirement: !ruby/object:Gem::Requirement
|
233
|
+
none: false
|
206
234
|
requirements:
|
207
|
-
- -
|
235
|
+
- - ! '>='
|
208
236
|
- !ruby/object:Gem::Version
|
209
237
|
version: '0'
|
210
238
|
type: :development
|
211
239
|
prerelease: false
|
212
240
|
version_requirements: !ruby/object:Gem::Requirement
|
241
|
+
none: false
|
213
242
|
requirements:
|
214
|
-
- -
|
243
|
+
- - ! '>='
|
215
244
|
- !ruby/object:Gem::Version
|
216
245
|
version: '0'
|
217
246
|
- !ruby/object:Gem::Dependency
|
218
247
|
name: vcr
|
219
248
|
requirement: !ruby/object:Gem::Requirement
|
249
|
+
none: false
|
220
250
|
requirements:
|
221
|
-
- -
|
251
|
+
- - '='
|
222
252
|
- !ruby/object:Gem::Version
|
223
|
-
version:
|
253
|
+
version: 2.9.3
|
224
254
|
type: :development
|
225
255
|
prerelease: false
|
226
256
|
version_requirements: !ruby/object:Gem::Requirement
|
257
|
+
none: false
|
227
258
|
requirements:
|
228
|
-
- -
|
259
|
+
- - '='
|
229
260
|
- !ruby/object:Gem::Version
|
230
|
-
version:
|
261
|
+
version: 2.9.3
|
231
262
|
- !ruby/object:Gem::Dependency
|
232
263
|
name: fakeweb
|
233
264
|
requirement: !ruby/object:Gem::Requirement
|
265
|
+
none: false
|
234
266
|
requirements:
|
235
|
-
- -
|
267
|
+
- - ! '>='
|
236
268
|
- !ruby/object:Gem::Version
|
237
269
|
version: '0'
|
238
270
|
type: :development
|
239
271
|
prerelease: false
|
240
272
|
version_requirements: !ruby/object:Gem::Requirement
|
273
|
+
none: false
|
241
274
|
requirements:
|
242
|
-
- -
|
275
|
+
- - ! '>='
|
243
276
|
- !ruby/object:Gem::Version
|
244
277
|
version: '0'
|
245
278
|
- !ruby/object:Gem::Dependency
|
246
279
|
name: rubocop
|
247
280
|
requirement: !ruby/object:Gem::Requirement
|
281
|
+
none: false
|
248
282
|
requirements:
|
249
|
-
- -
|
283
|
+
- - ! '>='
|
250
284
|
- !ruby/object:Gem::Version
|
251
285
|
version: '0'
|
252
286
|
type: :development
|
253
287
|
prerelease: false
|
254
288
|
version_requirements: !ruby/object:Gem::Requirement
|
289
|
+
none: false
|
255
290
|
requirements:
|
256
|
-
- -
|
291
|
+
- - ! '>='
|
257
292
|
- !ruby/object:Gem::Version
|
258
293
|
version: '0'
|
259
294
|
description: For integrating with QuickTravel API
|
@@ -262,11 +297,12 @@ executables: []
|
|
262
297
|
extensions: []
|
263
298
|
extra_rdoc_files: []
|
264
299
|
files:
|
265
|
-
-
|
266
|
-
-
|
267
|
-
-
|
268
|
-
-
|
269
|
-
-
|
300
|
+
- .gitignore
|
301
|
+
- .rspec
|
302
|
+
- .rubocop.yml
|
303
|
+
- .ruby-version
|
304
|
+
- .travis.yml
|
305
|
+
- CHANGELOG.md
|
270
306
|
- Gemfile
|
271
307
|
- LICENSE
|
272
308
|
- README.md
|
@@ -274,6 +310,7 @@ files:
|
|
274
310
|
- bootstrap/boot.rb
|
275
311
|
- examples/example_config.rb
|
276
312
|
- examples/login_example.rb
|
313
|
+
- gemfiles/rails2.gemfile
|
277
314
|
- lib/extensions.rb
|
278
315
|
- lib/quick_travel.rb
|
279
316
|
- lib/quick_travel/accommodation.rb
|
@@ -367,26 +404,27 @@ files:
|
|
367
404
|
- spec/support/cassettes/resource_show.yml
|
368
405
|
homepage: https://bitbucket.org/team-sealink/quicktravel_client
|
369
406
|
licenses: []
|
370
|
-
metadata: {}
|
371
407
|
post_install_message:
|
372
408
|
rdoc_options: []
|
373
409
|
require_paths:
|
374
410
|
- lib
|
375
411
|
required_ruby_version: !ruby/object:Gem::Requirement
|
412
|
+
none: false
|
376
413
|
requirements:
|
377
|
-
- -
|
414
|
+
- - ! '>='
|
378
415
|
- !ruby/object:Gem::Version
|
379
416
|
version: '0'
|
380
417
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
418
|
+
none: false
|
381
419
|
requirements:
|
382
|
-
- -
|
420
|
+
- - ! '>='
|
383
421
|
- !ruby/object:Gem::Version
|
384
422
|
version: '0'
|
385
423
|
requirements: []
|
386
424
|
rubyforge_project:
|
387
|
-
rubygems_version:
|
425
|
+
rubygems_version: 1.8.23.2
|
388
426
|
signing_key:
|
389
|
-
specification_version:
|
427
|
+
specification_version: 3
|
390
428
|
summary: Booking process using QuickTravel API
|
391
429
|
test_files:
|
392
430
|
- spec/booking_spec.rb
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: f82e62a99478014409d2fa2a60f5a73a856be186
|
4
|
-
data.tar.gz: ab596ea8fdac2dbe5aaa255783b277e65c62b513
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 97898f4097e677f155fd084985681acaee936d4fe2be2cd1a400cf592f03a998fecfefda2bc2d48daf26d452b841f8b593fd099709435b187c464f02ed5a722a
|
7
|
-
data.tar.gz: 9687eb80ab2b15cb460d2d54520062c7c9f4d8bb490b21ecffc15857c8bd0954f16632751c7a03ad661f07153cccafcc027582a4e780e8cab37a0f7c1b377964
|