omdbgateway 0.0.3 → 0.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 137ad66ce472ba580fcf5b382690b098d91b5591
4
- data.tar.gz: a7faae220e214562050434abf668a68113cdce84
3
+ metadata.gz: ab416ed1c52d6e21453fe42cff37544ff01aaed4
4
+ data.tar.gz: 2e04e1371ae9795d3aebe22583d8a7c22f103278
5
5
  SHA512:
6
- metadata.gz: 4b372f961d728f4687903806e1759afa4fc443e69a62699792b721d4205eb4e9d3c9a71338016cf6a2db521a05fb0845fc4a7c60b815bdc5dea8ea6e5f733ab7
7
- data.tar.gz: 13700ee76344ff783bdbed32097442ca4385bc92b5a21f763410e3d435cfe6875e85d08b3c8a4026353af3d99bf9e3c3832745d0c3fce86e0cd5437bd1e8d77a
6
+ metadata.gz: 8dbc09b1ee9af7e6d791701d34884719d55a3b7e64fc9b34e5b69d72487497f75cc17b492dd95a096ca343f1b030153081d3efb3553f18031f4bf38517c3458f
7
+ data.tar.gz: 5c6bc1bd2ae4209f2bb86e08e55a983700a211f5b1f40f2525982e1f91b31db3381e3ebe1583b2cfcccfae9948375d22a6eceeb5255157f6ca1ff3bef15e52b0
data/.rspec CHANGED
@@ -1,2 +1,4 @@
1
1
  --color
2
2
  --format progress
3
+ --format documentation -o rspec_output.txt
4
+
data/.travis.yml ADDED
@@ -0,0 +1,10 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.0
4
+ - 2.0.0
5
+ - jruby-19mode
6
+ - rbx
7
+ - ruby-head
8
+ - jruby-head
9
+ script: bundle exec rspec
10
+
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/omdbgateway.svg)](http://badge.fury.io/rb/omdbgateway)
4
4
 
5
+ [![Build Status](https://travis-ci.org/stujo/omdbgateway.svg?branch=master)](https://travis-ci.org/stujo/omdbgateway)
6
+
5
7
  __Note__ is a faraday rewrite of [Casey Scarborough's omdbapi](https://github.com/caseyscarborough/omdbapi)
6
8
 
7
9
  Not that there's anything wrong with what he did, I just wanted to try faraday and we're using OMDB
@@ -7,12 +7,12 @@ http_interactions:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
+ User-Agent:
11
+ - Faraday v0.8.9
10
12
  Accept-Encoding:
11
13
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
14
  Accept:
13
15
  - "*/*"
14
- User-Agent:
15
- - Ruby
16
16
  response:
17
17
  status:
18
18
  code: 200
@@ -35,7 +35,7 @@ http_interactions:
35
35
  Access-Control-Allow-Origin:
36
36
  - "*"
37
37
  Date:
38
- - Thu, 17 Apr 2014 22:35:44 GMT
38
+ - Fri, 18 Apr 2014 00:44:48 GMT
39
39
  Content-Length:
40
40
  - '417'
41
41
  body:
@@ -44,7 +44,7 @@ http_interactions:
44
44
  May 1983\",\"Runtime\":\"N/A\",\"Genre\":\"Action, Adventure, Sci-Fi\",\"Director\":\"N/A\",\"Writer\":\"N/A\",\"Actors\":\"Harrison
45
45
  Ford, Alec Guinness, Mark Hamill, James Earl Jones\",\"Plot\":\"N/A\",\"Language\":\"English\",\"Country\":\"USA\",\"Awards\":\"N/A\",\"Poster\":\"N/A\",\"Metascore\":\"N/A\",\"imdbRating\":\"7.3\",\"imdbVotes\":\"292\",\"imdbID\":\"tt0251413\",\"Type\":\"game\",\"Response\":\"True\"}"
46
46
  http_version:
47
- recorded_at: Thu, 17 Apr 2014 22:35:47 GMT
47
+ recorded_at: Fri, 18 Apr 2014 00:44:53 GMT
48
48
  - request:
49
49
  method: get
50
50
  uri: http://omdbapi.com/?t=True%20Grit
@@ -52,12 +52,12 @@ http_interactions:
52
52
  encoding: US-ASCII
53
53
  string: ''
54
54
  headers:
55
+ User-Agent:
56
+ - Faraday v0.8.9
55
57
  Accept-Encoding:
56
58
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
57
59
  Accept:
58
60
  - "*/*"
59
- User-Agent:
60
- - Ruby
61
61
  response:
62
62
  status:
63
63
  code: 200
@@ -80,7 +80,7 @@ http_interactions:
80
80
  Access-Control-Allow-Origin:
81
81
  - "*"
82
82
  Date:
83
- - Thu, 17 Apr 2014 22:35:44 GMT
83
+ - Fri, 18 Apr 2014 00:44:48 GMT
84
84
  Content-Length:
85
85
  - '737'
86
86
  body:
@@ -93,7 +93,7 @@ http_interactions:
93
93
  woman track down her father's murderer.\",\"Language\":\"English\",\"Country\":\"USA\",\"Awards\":\"Nominated
94
94
  for 10 Oscars. Another 31 wins & 85 nominations.\",\"Poster\":\"http://ia.media-imdb.com/images/M/MV5BMjIxNjAzODQ0N15BMl5BanBnXkFtZTcwODY2MjMyNA@@._V1_SX300.jpg\",\"Metascore\":\"80\",\"imdbRating\":\"7.7\",\"imdbVotes\":\"186,806\",\"imdbID\":\"tt1403865\",\"Type\":\"movie\",\"Response\":\"True\"}"
95
95
  http_version:
96
- recorded_at: Thu, 17 Apr 2014 22:35:47 GMT
96
+ recorded_at: Fri, 18 Apr 2014 00:44:53 GMT
97
97
  - request:
98
98
  method: get
99
99
  uri: http://omdbapi.com/?t=True%20Grit&y=1969
@@ -101,12 +101,12 @@ http_interactions:
101
101
  encoding: US-ASCII
102
102
  string: ''
103
103
  headers:
104
+ User-Agent:
105
+ - Faraday v0.8.9
104
106
  Accept-Encoding:
105
107
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
106
108
  Accept:
107
109
  - "*/*"
108
- User-Agent:
109
- - Ruby
110
110
  response:
111
111
  status:
112
112
  code: 200
@@ -129,7 +129,7 @@ http_interactions:
129
129
  Access-Control-Allow-Origin:
130
130
  - "*"
131
131
  Date:
132
- - Thu, 17 Apr 2014 22:35:44 GMT
132
+ - Fri, 18 Apr 2014 00:44:48 GMT
133
133
  Content-Length:
134
134
  - '745'
135
135
  body:
@@ -142,7 +142,7 @@ http_interactions:
142
142
  father's murderer in Indian territory.\",\"Language\":\"English\",\"Country\":\"USA\",\"Awards\":\"Won
143
143
  1 Oscar. Another 7 wins & 5 nominations.\",\"Poster\":\"http://ia.media-imdb.com/images/M/MV5BMTYwNTE3NDYzOV5BMl5BanBnXkFtZTcwNTU5MzY0MQ@@._V1_SX300.jpg\",\"Metascore\":\"N/A\",\"imdbRating\":\"7.4\",\"imdbVotes\":\"26,792\",\"imdbID\":\"tt0065126\",\"Type\":\"movie\",\"Response\":\"True\"}"
144
144
  http_version:
145
- recorded_at: Thu, 17 Apr 2014 22:35:47 GMT
145
+ recorded_at: Fri, 18 Apr 2014 00:44:53 GMT
146
146
  - request:
147
147
  method: get
148
148
  uri: http://omdbapi.com/?t=Game%20of%20Thrones
@@ -150,12 +150,12 @@ http_interactions:
150
150
  encoding: US-ASCII
151
151
  string: ''
152
152
  headers:
153
+ User-Agent:
154
+ - Faraday v0.8.9
153
155
  Accept-Encoding:
154
156
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
155
157
  Accept:
156
158
  - "*/*"
157
- User-Agent:
158
- - Ruby
159
159
  response:
160
160
  status:
161
161
  code: 200
@@ -178,7 +178,7 @@ http_interactions:
178
178
  Access-Control-Allow-Origin:
179
179
  - "*"
180
180
  Date:
181
- - Thu, 17 Apr 2014 22:35:44 GMT
181
+ - Fri, 18 Apr 2014 00:44:48 GMT
182
182
  Content-Length:
183
183
  - '693'
184
184
  body:
@@ -201,7 +201,7 @@ http_interactions:
201
201
  MjksNDgyIiwiaW1kYklEIjoidHQwOTQ0OTQ3IiwiVHlwZSI6InNlcmllcyIs
202
202
  IlJlc3BvbnNlIjoiVHJ1ZSJ9
203
203
  http_version:
204
- recorded_at: Thu, 17 Apr 2014 22:35:48 GMT
204
+ recorded_at: Fri, 18 Apr 2014 00:44:53 GMT
205
205
  - request:
206
206
  method: get
207
207
  uri: http://omdbapi.com/?plot=full&t=Game%20of%20Thrones
@@ -209,12 +209,12 @@ http_interactions:
209
209
  encoding: US-ASCII
210
210
  string: ''
211
211
  headers:
212
+ User-Agent:
213
+ - Faraday v0.8.9
212
214
  Accept-Encoding:
213
215
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
214
216
  Accept:
215
217
  - "*/*"
216
- User-Agent:
217
- - Ruby
218
218
  response:
219
219
  status:
220
220
  code: 200
@@ -237,7 +237,7 @@ http_interactions:
237
237
  Access-Control-Allow-Origin:
238
238
  - "*"
239
239
  Date:
240
- - Thu, 17 Apr 2014 22:35:45 GMT
240
+ - Fri, 18 Apr 2014 00:44:48 GMT
241
241
  Content-Length:
242
242
  - '1588'
243
243
  body:
@@ -280,7 +280,7 @@ http_interactions:
280
280
  MiIsImltZGJJRCI6InR0MDk0NDk0NyIsIlR5cGUiOiJzZXJpZXMiLCJSZXNw
281
281
  b25zZSI6IlRydWUifQ==
282
282
  http_version:
283
- recorded_at: Thu, 17 Apr 2014 22:35:48 GMT
283
+ recorded_at: Fri, 18 Apr 2014 00:44:53 GMT
284
284
  - request:
285
285
  method: get
286
286
  uri: http://omdbapi.com/?t=lsdfoweirjrpwef323423dsfkip
@@ -288,12 +288,12 @@ http_interactions:
288
288
  encoding: US-ASCII
289
289
  string: ''
290
290
  headers:
291
+ User-Agent:
292
+ - Faraday v0.8.9
291
293
  Accept-Encoding:
292
294
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
293
295
  Accept:
294
296
  - "*/*"
295
- User-Agent:
296
- - Ruby
297
297
  response:
298
298
  status:
299
299
  code: 200
@@ -316,14 +316,14 @@ http_interactions:
316
316
  Access-Control-Allow-Origin:
317
317
  - "*"
318
318
  Date:
319
- - Thu, 17 Apr 2014 22:35:45 GMT
319
+ - Fri, 18 Apr 2014 00:44:49 GMT
320
320
  Content-Length:
321
321
  - '47'
322
322
  body:
323
323
  encoding: UTF-8
324
324
  string: "{\"Response\":\"False\",\"Error\":\"Movie not found!\"}"
325
325
  http_version:
326
- recorded_at: Thu, 17 Apr 2014 22:35:48 GMT
326
+ recorded_at: Fri, 18 Apr 2014 00:44:53 GMT
327
327
  - request:
328
328
  method: get
329
329
  uri: http://omdbapi.com/?i=tt0411008
@@ -331,12 +331,12 @@ http_interactions:
331
331
  encoding: US-ASCII
332
332
  string: ''
333
333
  headers:
334
+ User-Agent:
335
+ - Faraday v0.8.9
334
336
  Accept-Encoding:
335
337
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
336
338
  Accept:
337
339
  - "*/*"
338
- User-Agent:
339
- - Ruby
340
340
  response:
341
341
  status:
342
342
  code: 200
@@ -359,7 +359,7 @@ http_interactions:
359
359
  Access-Control-Allow-Origin:
360
360
  - "*"
361
361
  Date:
362
- - Thu, 17 Apr 2014 22:35:45 GMT
362
+ - Fri, 18 Apr 2014 00:44:49 GMT
363
363
  Content-Length:
364
364
  - '832'
365
365
  body:
@@ -385,7 +385,7 @@ http_interactions:
385
385
  IjoiMjcxLDg0MiIsImltZGJJRCI6InR0MDQxMTAwOCIsIlR5cGUiOiJzZXJp
386
386
  ZXMiLCJSZXNwb25zZSI6IlRydWUifQ==
387
387
  http_version:
388
- recorded_at: Thu, 17 Apr 2014 22:35:48 GMT
388
+ recorded_at: Fri, 18 Apr 2014 00:44:54 GMT
389
389
  - request:
390
390
  method: get
391
391
  uri: http://omdbapi.com/?i=tt1231230123
@@ -393,12 +393,12 @@ http_interactions:
393
393
  encoding: US-ASCII
394
394
  string: ''
395
395
  headers:
396
+ User-Agent:
397
+ - Faraday v0.8.9
396
398
  Accept-Encoding:
397
399
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
398
400
  Accept:
399
401
  - "*/*"
400
- User-Agent:
401
- - Ruby
402
402
  response:
403
403
  status:
404
404
  code: 200
@@ -421,14 +421,14 @@ http_interactions:
421
421
  Access-Control-Allow-Origin:
422
422
  - "*"
423
423
  Date:
424
- - Thu, 17 Apr 2014 22:35:45 GMT
424
+ - Fri, 18 Apr 2014 00:44:49 GMT
425
425
  Content-Length:
426
426
  - '48'
427
427
  body:
428
428
  encoding: UTF-8
429
429
  string: "{\"Response\":\"False\",\"Error\":\"Incorrect IMDb ID\"}"
430
430
  http_version:
431
- recorded_at: Thu, 17 Apr 2014 22:35:48 GMT
431
+ recorded_at: Fri, 18 Apr 2014 00:44:54 GMT
432
432
  - request:
433
433
  method: get
434
434
  uri: http://omdbapi.com/?s=Star%20Wars
@@ -436,12 +436,12 @@ http_interactions:
436
436
  encoding: US-ASCII
437
437
  string: ''
438
438
  headers:
439
+ User-Agent:
440
+ - Faraday v0.8.9
439
441
  Accept-Encoding:
440
442
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
441
443
  Accept:
442
444
  - "*/*"
443
- User-Agent:
444
- - Ruby
445
445
  response:
446
446
  status:
447
447
  code: 200
@@ -464,7 +464,7 @@ http_interactions:
464
464
  Access-Control-Allow-Origin:
465
465
  - "*"
466
466
  Date:
467
- - Thu, 17 Apr 2014 22:35:45 GMT
467
+ - Fri, 18 Apr 2014 00:44:49 GMT
468
468
  Content-Length:
469
469
  - '1009'
470
470
  body:
@@ -494,7 +494,7 @@ http_interactions:
494
494
  YXkgU3BlY2lhbCIsIlllYXIiOiIxOTc4IiwiaW1kYklEIjoidHQwMTkzNTI0
495
495
  IiwiVHlwZSI6Im1vdmllIn1dfQ==
496
496
  http_version:
497
- recorded_at: Thu, 17 Apr 2014 22:35:48 GMT
497
+ recorded_at: Fri, 18 Apr 2014 00:44:54 GMT
498
498
  - request:
499
499
  method: get
500
500
  uri: http://omdbapi.com/?s=Star%20Wars:%20Episode%20VI%20-%20Return%20of%20the%20Jedi
@@ -502,12 +502,12 @@ http_interactions:
502
502
  encoding: US-ASCII
503
503
  string: ''
504
504
  headers:
505
+ User-Agent:
506
+ - Faraday v0.8.9
505
507
  Accept-Encoding:
506
508
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
507
509
  Accept:
508
510
  - "*/*"
509
- User-Agent:
510
- - Ruby
511
511
  response:
512
512
  status:
513
513
  code: 200
@@ -530,14 +530,14 @@ http_interactions:
530
530
  Access-Control-Allow-Origin:
531
531
  - "*"
532
532
  Date:
533
- - Thu, 17 Apr 2014 22:35:46 GMT
533
+ - Fri, 18 Apr 2014 00:44:49 GMT
534
534
  Content-Length:
535
535
  - '117'
536
536
  body:
537
537
  encoding: UTF-8
538
538
  string: "{\"Search\":[{\"Title\":\"Star Wars: Episode VI - Return of the Jedi\",\"Year\":\"1983\",\"imdbID\":\"tt0086190\",\"Type\":\"movie\"}]}"
539
539
  http_version:
540
- recorded_at: Thu, 17 Apr 2014 22:35:49 GMT
540
+ recorded_at: Fri, 18 Apr 2014 00:44:54 GMT
541
541
  - request:
542
542
  method: get
543
543
  uri: http://omdbapi.com/?s=lsdfoweirjrpwef323423dsfkip
@@ -545,12 +545,12 @@ http_interactions:
545
545
  encoding: US-ASCII
546
546
  string: ''
547
547
  headers:
548
+ User-Agent:
549
+ - Faraday v0.8.9
548
550
  Accept-Encoding:
549
551
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
550
552
  Accept:
551
553
  - "*/*"
552
- User-Agent:
553
- - Ruby
554
554
  response:
555
555
  status:
556
556
  code: 200
@@ -573,12 +573,12 @@ http_interactions:
573
573
  Access-Control-Allow-Origin:
574
574
  - "*"
575
575
  Date:
576
- - Thu, 17 Apr 2014 22:35:46 GMT
576
+ - Fri, 18 Apr 2014 00:44:49 GMT
577
577
  Content-Length:
578
578
  - '47'
579
579
  body:
580
580
  encoding: UTF-8
581
581
  string: "{\"Response\":\"False\",\"Error\":\"Movie not found!\"}"
582
582
  http_version:
583
- recorded_at: Thu, 17 Apr 2014 22:35:49 GMT
583
+ recorded_at: Fri, 18 Apr 2014 00:44:54 GMT
584
584
  recorded_with: VCR 2.9.0
data/lib/omdbgateway.rb CHANGED
@@ -1,4 +1,6 @@
1
1
  require 'omdbgateway/gateway'
2
+ require 'omdbgateway/response_patcher'
3
+ require 'omdbgateway/response_wrapper'
2
4
 
3
5
  module OMDBGateway
4
6
  DEFAULT_API_ENDPOINT = 'http://omdbapi.com'
@@ -1,9 +1,6 @@
1
1
  require 'faraday'
2
2
  require 'faraday_middleware'
3
3
 
4
- require_relative 'response_wrapper'
5
- require_relative 'response_patcher'
6
-
7
4
  module OMDBGateway
8
5
  # Faraday Based Gateway
9
6
  class Gateway
@@ -42,7 +39,7 @@ module OMDBGateway
42
39
  # title_search('Game of Thrones')
43
40
  def title_search(title, year = nil, plot = nil)
44
41
  response = get '/' do |req|
45
- req.params = {t: title}
42
+ req.params = {:t => title}
46
43
  req.params[:plot] = plot unless plot.nil?
47
44
  req.params[:y] = year unless year.nil?
48
45
  end
@@ -58,7 +55,7 @@ module OMDBGateway
58
55
  # free_search('Game')
59
56
  def free_search(q)
60
57
  response = get '/' do |req|
61
- req.params = {s: q}
58
+ req.params = {:s => q}
62
59
  end
63
60
  response.prune_hash('Search', [])
64
61
  end
@@ -72,7 +69,7 @@ module OMDBGateway
72
69
  # find_by_id('tt0944947')
73
70
  def find_by_id(imdb_id)
74
71
  response = get '/' do |req|
75
- req.params = {i: imdb_id}
72
+ req.params = {:i => imdb_id}
76
73
  end
77
74
  response
78
75
  end
data/omdbgateway.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "omdbgateway"
7
- spec.version = '0.0.3'
7
+ spec.version = '0.0.4'
8
8
  spec.authors = ["Stuart Jones"]
9
9
  spec.email = ["omdbgateway@skillbox.com"]
10
10
  spec.description = 'A simple API Service Gateway for the omdb omdbapi.com movie API. Supporting error handling and result pruning'
@@ -27,6 +27,7 @@ Gem::Specification.new do |spec|
27
27
  spec.add_development_dependency "rspec", "~> 2.14"
28
28
  spec.add_development_dependency "webmock", "~> 1.17"
29
29
 
30
- spec.add_dependency 'faraday', "~> 0.8"
31
- spec.add_dependency "faraday_middleware", "~> 0.9"
30
+ spec.add_dependency 'faraday', '~> 0.8.9'
31
+
32
+ spec.add_dependency "faraday_middleware", '~> 0.8'
32
33
  end
data/rspec_output.txt ADDED
@@ -0,0 +1,90 @@
1
+ Run options: include {:focus=>true}
2
+
3
+ All examples were filtered out; ignoring {:focus=>true}
4
+
5
+ OMDBGateway::Gateway
6
+ With invalid Endpoint URI
7
+ should have the correct API endpoint
8
+ with a movie that exists
9
+ #success
10
+ should note failure
11
+ #error_message
12
+ should note failure
13
+ With invalid Endpoint URI
14
+ should have the correct API endpoint
15
+ with a movie that exists
16
+ #success
17
+ should note failure
18
+ #error_message
19
+ should note failure
20
+ With Valid Endpoint
21
+ should have the correct API endpoint
22
+ #title_search
23
+ with a movie that exists
24
+ should return a hash of movie attributes
25
+ should contain a title
26
+ with the year parameter
27
+ should not be the same title
28
+ with the plot parameter
29
+ should have different plots
30
+ with a movie that doesnt exist
31
+ should return a hash
32
+ should return a hash with a false response
33
+ should return a hash with an error message
34
+ #find_by_id
35
+ with a title that exists
36
+ should return a hash of movie attributes
37
+ should contain a title
38
+ with a movie that does not exist
39
+ should return nil
40
+ #free_search
41
+ with search results
42
+ should return an ResponseWrapper
43
+ should return an array with hash contents
44
+ with a single search result
45
+ should return an array
46
+ should return an array with 1 element
47
+ should have a title
48
+ with no search results
49
+ should return an ResponseWrapper
50
+ should show app failed
51
+
52
+ OMDBGateway::ResponseWrapper
53
+ #error_message
54
+ should be nil
55
+ should be 'X500 Error'
56
+ should be 'X500 Error'
57
+ #success?
58
+ should be true
59
+ should be true
60
+ should be false
61
+ #as_hash
62
+ should be {}
63
+ should be {}
64
+ should be {}
65
+ should be {'a' => 'A'}
66
+ #as_hash
67
+ should be []
68
+ should be []
69
+ should be []
70
+ should be []
71
+ should be [{'a' => 'A', 'b' => 'B'}]
72
+ #prune_hash
73
+ should be nil for empty array
74
+ should be 5
75
+ should not expose Error or Report
76
+ should be return hash element
77
+ should be nil for any array
78
+ #prune_array
79
+ should be nil for empty array
80
+ should be default 700
81
+ should not expose Error or Report
82
+ should not return hash element but the default
83
+ should be {'a' => 'A', 'b' => 'B'} for any array
84
+ should be default (500) for out of bound index for any array
85
+ #array_first
86
+ should be nil for empty array
87
+ should be {'a' => 'A', 'b' => 'B'} for any array
88
+
89
+ Finished in 0.20503 seconds
90
+ 52 examples, 0 failures
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omdbgateway
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stuart Jones
@@ -100,28 +100,28 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0.8'
103
+ version: 0.8.9
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0.8'
110
+ version: 0.8.9
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: faraday_middleware
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '0.9'
117
+ version: '0.8'
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '0.9'
124
+ version: '0.8'
125
125
  description: A simple API Service Gateway for the omdb omdbapi.com movie API. Supporting
126
126
  error handling and result pruning
127
127
  email:
@@ -132,6 +132,7 @@ extra_rdoc_files: []
132
132
  files:
133
133
  - ".gitignore"
134
134
  - ".rspec"
135
+ - ".travis.yml"
135
136
  - Gemfile
136
137
  - LICENSE.txt
137
138
  - README.md
@@ -142,6 +143,7 @@ files:
142
143
  - lib/omdbgateway/response_patcher.rb
143
144
  - lib/omdbgateway/response_wrapper.rb
144
145
  - omdbgateway.gemspec
146
+ - rspec_output.txt
145
147
  - spec/omdbgateway/gateway_spec.rb
146
148
  - spec/omdbgateway/response_wrapper_spec.rb
147
149
  - spec/spec_helper.rb