marvel_api 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/.document +1 -1
  3. data/.rspec +2 -1
  4. data/.travis.yml +8 -0
  5. data/Gemfile +11 -4
  6. data/Guardfile +5 -0
  7. data/LICENSE.txt +1 -1
  8. data/README.md +16 -4
  9. data/Rakefile +11 -8
  10. data/lib/marvel/client.rb +6 -14
  11. data/lib/marvel/connection.rb +10 -2
  12. data/lib/marvel/error.rb +16 -0
  13. data/lib/marvel/request.rb +22 -8
  14. data/lib/marvel/response.rb +21 -0
  15. data/lib/marvel/version.rb +14 -0
  16. data/marvel_api.gemspec +75 -18
  17. data/spec/fixtures/characters/character.json +341 -0
  18. data/spec/fixtures/characters/character_comics.json +4975 -0
  19. data/spec/fixtures/characters/character_events.json +1666 -0
  20. data/spec/fixtures/characters/character_series.json +6117 -0
  21. data/spec/fixtures/characters/character_stories.json +1873 -0
  22. data/spec/fixtures/characters/characters.json +3006 -0
  23. data/spec/fixtures/comics/comic.json +359 -0
  24. data/spec/fixtures/comics/comic_characters.json +4649 -0
  25. data/spec/fixtures/comics/comic_creators.json +4387 -0
  26. data/spec/fixtures/comics/comic_events.json +522 -0
  27. data/spec/fixtures/comics/comic_stories.json +1985 -0
  28. data/spec/fixtures/comics/comics.json +2246 -0
  29. data/spec/fixtures/creators/creator.json +340 -0
  30. data/spec/fixtures/creators/creator_comics.json +2856 -0
  31. data/spec/fixtures/creators/creator_events.json +1899 -0
  32. data/spec/fixtures/creators/creator_series.json +4686 -0
  33. data/spec/fixtures/creators/creator_stories.json +1491 -0
  34. data/spec/fixtures/creators/creators.json +1376 -0
  35. data/spec/fixtures/errors/empty_parameter.json +4 -0
  36. data/spec/fixtures/errors/excessive_filter_values.json +4 -0
  37. data/spec/fixtures/errors/invalid_credentials.json +4 -0
  38. data/spec/fixtures/errors/invalid_filter_value.json +4 -0
  39. data/spec/fixtures/errors/invalid_hash_ts_key_combo.json +4 -0
  40. data/spec/fixtures/errors/invalid_ordering.json +4 -0
  41. data/spec/fixtures/errors/invalid_parameter.json +4 -0
  42. data/spec/fixtures/errors/limit_invalid.json +4 -0
  43. data/spec/fixtures/errors/limit_over_100.json +4 -0
  44. data/spec/fixtures/errors/resource_not_found.json +4 -0
  45. data/spec/fixtures/events/event.json +522 -0
  46. data/spec/fixtures/events/event_characters.json +6397 -0
  47. data/spec/fixtures/events/event_comics.json +4718 -0
  48. data/spec/fixtures/events/event_creators.json +5869 -0
  49. data/spec/fixtures/events/event_series.json +2243 -0
  50. data/spec/fixtures/events/event_stories.json +4846 -0
  51. data/spec/fixtures/events/events.json +8613 -0
  52. data/spec/fixtures/series/serie.json +448 -0
  53. data/spec/fixtures/series/series.json +3464 -0
  54. data/spec/fixtures/series/series_characters.json +6029 -0
  55. data/spec/fixtures/series/series_comics.json +2935 -0
  56. data/spec/fixtures/series/series_creators.json +5923 -0
  57. data/spec/fixtures/series/series_events.json +944 -0
  58. data/spec/fixtures/series/series_stories.json +1544 -0
  59. data/spec/fixtures/stories/stories.json +1282 -0
  60. data/spec/fixtures/stories/story.json +117 -0
  61. data/spec/fixtures/stories/story_characters.json +794 -0
  62. data/spec/fixtures/stories/story_comics.json +522 -0
  63. data/spec/fixtures/stories/story_creators.json +1672 -0
  64. data/spec/fixtures/stories/story_events.json +522 -0
  65. data/spec/fixtures/stories/story_series.json +695 -0
  66. data/spec/marvel_api/client/client_character_spec.rb +142 -0
  67. data/spec/marvel_api/client/client_comic_spec.rb +141 -0
  68. data/spec/marvel_api/client/client_creator_spec.rb +139 -0
  69. data/spec/marvel_api/client/client_event_spec.rb +163 -0
  70. data/spec/marvel_api/client/client_series_spec.rb +165 -0
  71. data/spec/marvel_api/client/client_story_spec.rb +162 -0
  72. data/spec/marvel_api/error_spec.rb +192 -0
  73. data/spec/marvel_api_spec.rb +15 -3
  74. data/spec/spec_helper.rb +55 -4
  75. metadata +83 -27
  76. data/VERSION +0 -1
  77. data/spec/marvel_api/client_spec.rb +0 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9133e1fdec31b9c7841f6e23729cd412a10aa310
4
- data.tar.gz: 96b3b3becbda0afe29f29938444b042f7ec1d974
3
+ metadata.gz: f2b4c452319c1d34f3de718e532fe92890ef8440
4
+ data.tar.gz: 72b6f58e63a3b610e83991105f5e92894c7c9094
5
5
  SHA512:
6
- metadata.gz: 9410f5d4c555781945893a5e618ecfdef1dc48a4bb7d522a8b2f9b6af5f3bcab6d669aac104d88f67ad855e2790796d41f249d09686f56e88af58b323b9325d0
7
- data.tar.gz: 85b4a94ee6394355350f55819009b6c00c0687b14abf1f84384bba2780a02752edbbd3be441cd375e0bc8e84cfc9628c51fd3c33f1c7c17e6d0a771a5537ac56
6
+ metadata.gz: ee6167a8840a5ad32e71afcce65345442ae1e5d4706ca561e5930066dac0b1213606e05b02472c6c8df60d03e6e998935778dfd83869f93c3a230428f6290ab7
7
+ data.tar.gz: 2aa7a6f153b0e2349c710fe99641f7916fc965c7f9d2e885c9e651d2a53ed65f4ea61e15b7350d750a5942db60a3ec99a18bce63fba1fd6a142dbb6220686fff
data/.document CHANGED
@@ -2,4 +2,4 @@ lib/**/*.rb
2
2
  bin/*
3
3
  -
4
4
  features/**/*.feature
5
- LICENSE.txt
5
+ LICENSE.txt
data/.rspec CHANGED
@@ -1 +1,2 @@
1
- --color
1
+ --color
2
+ --order random
@@ -0,0 +1,8 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 2.0.0
5
+ - 2.1.0
6
+ - 2.1.1
7
+ - 2.1.2
8
+ - ruby-head
data/Gemfile CHANGED
@@ -1,8 +1,8 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'faraday'
4
- gem 'faraday_middleware'
5
- gem 'hashie'
3
+ gem 'faraday', '>= 0.7', '< 0.10'
4
+ gem 'faraday_middleware', '>= 0.8', '< 0.10'
5
+ gem 'hashie', '>= 0.4.0'
6
6
 
7
7
  group :development do
8
8
  gem 'pry'
@@ -11,5 +11,12 @@ group :development do
11
11
  gem 'rdoc', '~> 3.12'
12
12
  gem 'bundler', '~> 1.0'
13
13
  gem 'jeweler', '~> 1.8.7'
14
- gem 'simplecov'
15
14
  end
15
+
16
+ group :test do
17
+ gem 'rspec'
18
+ gem 'webmock'
19
+ gem 'coveralls', require: false
20
+ gem 'simplecov', require: false
21
+ gem 'guard-rspec', require: false
22
+ end
@@ -0,0 +1,5 @@
1
+ guard :rspec do
2
+ watch(%r{^spec/.+_spec\.rb$})
3
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
4
+ watch('spec/spec_helper.rb') { "spec" }
5
+ end
@@ -17,4 +17,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
17
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
18
  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
19
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,10 +1,12 @@
1
1
  # marvel_api
2
+ [![Build Status](https://travis-ci.org/O-I/marvel.svg?branch=master)](https://travis-ci.org/O-I/marvel)
3
+ [![Coverage Status](https://img.shields.io/coveralls/O-I/marvel.svg)](https://coveralls.io/r/O-I/marvel)
2
4
 
3
- Ruby bindings for the [Marvel API](http://developer.marvel.com/). Still under construction... Feel free to contribute! In the meantime, check out the [marvelite](https://github.com/antillas21/marvelite/) gem for something that's further along in development (and likely a lot stabler :-).
5
+ Ruby bindings for the [Marvel API](http://developer.marvel.com/). In active development. Feel free to contribute! Need Ruby 1.9.2 support or don't like Faraday? Check out the [marvelite](https://github.com/antillas21/marvelite/) gem for an alternative. (-:
4
6
 
5
7
  ## Installation
6
8
 
7
- `gem install 'marvel_api'` or add `gem 'marvel_api'` to your Gemfile.
9
+ `gem install 'marvel_api'` or add `gem 'marvel_api'` to your Gemfile and `bundle`.
8
10
 
9
11
  ## Configuration
10
12
 
@@ -21,7 +23,7 @@ end
21
23
 
22
24
  ## Usage
23
25
 
24
- Descriptions and examples of the supported actions are below. Note, all methods currently return a `Hashie:Mash` object if successful. For a more detailed explanation of available actions and an exhaustive list of acceptable query parameters, see Marvel's own developer [documentation](http://developer.marvel.com/docs). Each method described below links to the associated call in Marvel's interactive API tester.
26
+ Descriptions and examples of the supported actions are below. Note, all methods currently return an `Array` of `Hashie::Mash` objects if successful; otherwise, a `Marvel::Response::Error` is returned. For a more detailed explanation of available actions and an exhaustive list of acceptable query parameters, see Marvel's own developer [documentation](http://developer.marvel.com/docs). Each method described below links to the associated call in Marvel's interactive API tester.
25
27
 
26
28
  ### Characters
27
29
 
@@ -119,7 +121,6 @@ Descriptions and examples of the supported actions are below. Note, all methods
119
121
  @client.creators
120
122
  @client.creators(firstName: 'Frank', lastName: 'Miller')
121
123
  @client.creators(lastNameStartsWith: 'Mo', limit: 20, offset: 20)
122
-
123
124
  ```
124
125
 
125
126
  - Fetches a single creator by id. [`GET /v1/public/creators/{creatorId}`](http://developer.marvel.com/docs#!/public/getCreatorIndividual_get_13)
@@ -309,6 +310,17 @@ Descriptions and examples of the supported actions are below. Note, all methods
309
310
  @client.story_series(126, titleStartsWith: 'Infinity')
310
311
  ```
311
312
 
313
+ ### Etags
314
+
315
+ Most successful responses contain an `etag` attribute that can be used to check whether the content of the requested resource has remained the same since the last request.
316
+
317
+ ```ruby
318
+ thanos = @client.character(1009652)
319
+ @client.character(1009652, etag: thanos.etag)
320
+ ```
321
+
322
+ If the content has not changed, a `Marvel::Response::Error` with `code` 304 and `status` 'Not Modified' is returned and you can use your cached content knowing that it is up-to-date and that you saved some bandwidth. If the content has changed or the Etag is invalid, the resource you requested will be returned.
323
+
312
324
  ## Contributing to marvel_api
313
325
 
314
326
  * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
data/Rakefile CHANGED
@@ -12,15 +12,18 @@ end
12
12
  require 'rake'
13
13
 
14
14
  require 'jeweler'
15
+ require './lib/marvel/version.rb'
15
16
  Jeweler::Tasks.new do |gem|
16
17
  # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
- gem.name = "marvel_api"
18
- gem.homepage = "http://github.com/O-I/marvel"
19
- gem.license = "MIT"
18
+ gem.name = 'marvel_api'
19
+ gem.version = Marvel::Version
20
+ gem.homepage = 'http://github.com/O-I/marvel'
21
+ gem.license = 'MIT'
20
22
  gem.summary = %Q{Ruby bindings for the Marvel API}
21
- gem.description = %Q{Marvel_API is a Ruby gem that lets you explore the Marvel Universe like never before.}
22
- gem.email = "hore.rahul@gmail.com"
23
- gem.authors = ["Rahul Horé"]
23
+ gem.description = %Q{Explore the Marvel Universe like never before.}
24
+ gem.email = 'hore.rahul@gmail.com'
25
+ gem.authors = ['Rahul Horé']
26
+ gem.required_ruby_version = '>= 1.9.3'
24
27
  # dependencies defined in Gemfile
25
28
  end
26
29
  Jeweler::RubygemsDotOrgTasks.new
@@ -35,10 +38,10 @@ task :default => :spec
35
38
 
36
39
  require 'rdoc/task'
37
40
  Rake::RDocTask.new do |rdoc|
38
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
41
+ version = Marvel::Version
39
42
 
40
43
  rdoc.rdoc_dir = 'rdoc'
41
44
  rdoc.title = "marvel_api #{version}"
42
45
  rdoc.rdoc_files.include('README*')
43
46
  rdoc.rdoc_files.include('lib/**/*.rb')
44
- end
47
+ end
@@ -19,22 +19,14 @@ module Marvel
19
19
  # Requests on the server side must be of the form
20
20
  # http://gateway.marvel.com/v1/comics/?ts=1&apikey=1234&hash=ffd275c5130566a2916217b101f26150
21
21
  # where ts is a timestamp
22
- # where apikey is your public API key
23
- # where hash is the MD5 hash of the concatenation of
24
- # ts, your private API key, and your public API key
22
+ # apikey is your public API key
23
+ # hash is the MD5 hash of the concatenation of
24
+ # ts, your private API key, and your public API key
25
25
 
26
- # So basic request form for all methods looks like
27
- # Faraday.get("#{BASE_URL}#{path}#{id}#{stub}#{auth}").body
28
- # e.g., get_comics_by_character_id
29
- # Faraday.get("#{BASE_URL}characters/#{id}/comics#{auth}").body
26
+ # All methods return an Array of Hashie::Mash objects
27
+ # that represent the original JSON response
30
28
 
31
- # TODO; MODULARIZE THIS!!!
32
- # TODO; Refactor — tons of duplication
33
-
34
- # All methods return a Hashie::Mash object
35
- # representation of the original JSON response
36
-
37
- # Characters:
29
+ # Characters:
38
30
 
39
31
  # fetches lists of characters
40
32
  def characters(options = {})
@@ -1,18 +1,26 @@
1
1
  require 'faraday_middleware'
2
+ require_relative 'version'
2
3
 
3
4
  module Marvel
4
5
  module Connection
6
+
7
+ BASE_API_URL = 'https://gateway.marvel.com/v1/public/'
8
+ HEADERS = {
9
+ accept: 'application/json',
10
+ user_agent: "marvel_api gem #{Marvel::Version}"
11
+ }
12
+
5
13
  private
6
14
 
7
15
  def connection
8
16
  options = {
17
+ headers: HEADERS,
9
18
  ssl: { verify: false },
10
- url: 'https://gateway.marvel.com/v1/public/'
19
+ url: BASE_API_URL
11
20
  }
12
21
 
13
22
  Faraday.new(options) do |connection|
14
23
  connection.use Faraday::Request::UrlEncoded
15
- connection.use Faraday::Response::RaiseError
16
24
  connection.use Faraday::Response::Mashify
17
25
  connection.use Faraday::Response::ParseJson
18
26
  connection.adapter(Faraday.default_adapter)
@@ -0,0 +1,16 @@
1
+ module Marvel
2
+ module Response
3
+ class Error < StandardError
4
+ attr_reader :code, :status
5
+
6
+ def initialize(response_hash)
7
+ @code = response_hash['code']
8
+ @status = response_hash['status'] || response_hash['message']
9
+ end
10
+
11
+ def to_s
12
+ "#{@code} #{@status}"
13
+ end
14
+ end
15
+ end
16
+ end
@@ -1,5 +1,10 @@
1
+ require_relative 'response'
2
+ require_relative 'error'
3
+
1
4
  module Marvel
2
5
  module Request
6
+ include Marvel::Response
7
+
3
8
  def get(path, options = {})
4
9
  request(:get, path, options)
5
10
  end
@@ -7,24 +12,33 @@ module Marvel
7
12
  private
8
13
 
9
14
  def request(method, path, options = {})
15
+ etag = options.delete(:etag)
10
16
  response = connection.send(method) do |request|
11
17
  request.url(path, options.merge(auth))
18
+ request.headers['If-None-Match'] = etag if etag
19
+ end
20
+ prepare(response)
21
+ end
22
+
23
+ def prepare(response)
24
+ case response.status
25
+ when 200 then Marvel::Response.create(response.body)
26
+ when 304 then Marvel::Response::Error.new(
27
+ { 'code' => 304, 'status' => 'Not Modified' })
28
+ else Marvel::Response::Error.new(response.body)
12
29
  end
13
- response.body
14
30
  end
15
31
 
16
- def auth
17
- ts = timestamp
18
- hsh = hash(ts)
19
- { ts: ts, apikey: api_key, hash: hsh }
32
+ def auth(nonce = timestamp)
33
+ { ts: nonce, apikey: api_key, hash: hash(nonce) }
20
34
  end
21
35
 
22
- def hash(ts)
23
- Digest::MD5.hexdigest(ts + private_key + api_key)
36
+ def hash(nonce)
37
+ Digest::MD5.hexdigest(nonce + private_key + api_key)
24
38
  end
25
39
 
26
40
  def timestamp
27
41
  Time.now.to_s
28
- end
42
+ end
29
43
  end
30
44
  end
@@ -0,0 +1,21 @@
1
+ module Marvel
2
+ module Response
3
+ def self.create(response_hash)
4
+ results = response_hash.data.results.dup rescue response_hash
5
+ results.extend(self)
6
+ results.instance_exec do
7
+ @code = response_hash.code
8
+ @status = response_hash.status
9
+ @etag = response_hash.etag
10
+ @offset = response_hash.data.offset
11
+ @limit = response_hash.data.limit
12
+ @total = response_hash.data.total
13
+ @count = response_hash.data.count
14
+ end
15
+ results
16
+ end
17
+
18
+ attr_reader :code, :status, :etag,
19
+ :offset, :limit, :total, :count
20
+ end
21
+ end
@@ -0,0 +1,14 @@
1
+ module Marvel
2
+ class Version
3
+ MAJOR = 0
4
+ MINOR = 2
5
+ PATCH = 1
6
+ PRE = nil
7
+
8
+ class << self
9
+ def to_s
10
+ [MAJOR, MINOR, PATCH, PRE].compact.join('.')
11
+ end
12
+ end
13
+ end
14
+ end
@@ -2,17 +2,17 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: marvel_api 0.2.0 ruby lib
5
+ # stub: marvel_api 0.2.1 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "marvel_api"
9
- s.version = "0.2.0"
9
+ s.version = "0.2.1"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Rahul Hor\u{e9}"]
14
- s.date = "2014-05-20"
15
- s.description = "Marvel_API is a Ruby gem that lets you explore the Marvel Universe like never before."
14
+ s.date = "2014-07-02"
15
+ s.description = "Explore the Marvel Universe like never before."
16
16
  s.email = "hore.rahul@gmail.com"
17
17
  s.extra_rdoc_files = [
18
18
  "LICENSE.txt",
@@ -21,23 +21,83 @@ Gem::Specification.new do |s|
21
21
  s.files = [
22
22
  ".document",
23
23
  ".rspec",
24
+ ".travis.yml",
24
25
  "Gemfile",
26
+ "Guardfile",
25
27
  "LICENSE.txt",
26
28
  "README.md",
27
29
  "Rakefile",
28
- "VERSION",
29
30
  "lib/marvel/client.rb",
30
31
  "lib/marvel/configuration.rb",
31
32
  "lib/marvel/connection.rb",
33
+ "lib/marvel/error.rb",
32
34
  "lib/marvel/request.rb",
35
+ "lib/marvel/response.rb",
36
+ "lib/marvel/version.rb",
33
37
  "lib/marvel_api.rb",
34
38
  "marvel_api.gemspec",
35
- "spec/marvel_api/client_spec.rb",
39
+ "spec/fixtures/characters/character.json",
40
+ "spec/fixtures/characters/character_comics.json",
41
+ "spec/fixtures/characters/character_events.json",
42
+ "spec/fixtures/characters/character_series.json",
43
+ "spec/fixtures/characters/character_stories.json",
44
+ "spec/fixtures/characters/characters.json",
45
+ "spec/fixtures/comics/comic.json",
46
+ "spec/fixtures/comics/comic_characters.json",
47
+ "spec/fixtures/comics/comic_creators.json",
48
+ "spec/fixtures/comics/comic_events.json",
49
+ "spec/fixtures/comics/comic_stories.json",
50
+ "spec/fixtures/comics/comics.json",
51
+ "spec/fixtures/creators/creator.json",
52
+ "spec/fixtures/creators/creator_comics.json",
53
+ "spec/fixtures/creators/creator_events.json",
54
+ "spec/fixtures/creators/creator_series.json",
55
+ "spec/fixtures/creators/creator_stories.json",
56
+ "spec/fixtures/creators/creators.json",
57
+ "spec/fixtures/errors/empty_parameter.json",
58
+ "spec/fixtures/errors/excessive_filter_values.json",
59
+ "spec/fixtures/errors/invalid_credentials.json",
60
+ "spec/fixtures/errors/invalid_filter_value.json",
61
+ "spec/fixtures/errors/invalid_hash_ts_key_combo.json",
62
+ "spec/fixtures/errors/invalid_ordering.json",
63
+ "spec/fixtures/errors/invalid_parameter.json",
64
+ "spec/fixtures/errors/limit_invalid.json",
65
+ "spec/fixtures/errors/limit_over_100.json",
66
+ "spec/fixtures/errors/resource_not_found.json",
67
+ "spec/fixtures/events/event.json",
68
+ "spec/fixtures/events/event_characters.json",
69
+ "spec/fixtures/events/event_comics.json",
70
+ "spec/fixtures/events/event_creators.json",
71
+ "spec/fixtures/events/event_series.json",
72
+ "spec/fixtures/events/event_stories.json",
73
+ "spec/fixtures/events/events.json",
74
+ "spec/fixtures/series/serie.json",
75
+ "spec/fixtures/series/series.json",
76
+ "spec/fixtures/series/series_characters.json",
77
+ "spec/fixtures/series/series_comics.json",
78
+ "spec/fixtures/series/series_creators.json",
79
+ "spec/fixtures/series/series_events.json",
80
+ "spec/fixtures/series/series_stories.json",
81
+ "spec/fixtures/stories/stories.json",
82
+ "spec/fixtures/stories/story.json",
83
+ "spec/fixtures/stories/story_characters.json",
84
+ "spec/fixtures/stories/story_comics.json",
85
+ "spec/fixtures/stories/story_creators.json",
86
+ "spec/fixtures/stories/story_events.json",
87
+ "spec/fixtures/stories/story_series.json",
88
+ "spec/marvel_api/client/client_character_spec.rb",
89
+ "spec/marvel_api/client/client_comic_spec.rb",
90
+ "spec/marvel_api/client/client_creator_spec.rb",
91
+ "spec/marvel_api/client/client_event_spec.rb",
92
+ "spec/marvel_api/client/client_series_spec.rb",
93
+ "spec/marvel_api/client/client_story_spec.rb",
94
+ "spec/marvel_api/error_spec.rb",
36
95
  "spec/marvel_api_spec.rb",
37
96
  "spec/spec_helper.rb"
38
97
  ]
39
98
  s.homepage = "http://github.com/O-I/marvel"
40
99
  s.licenses = ["MIT"]
100
+ s.required_ruby_version = Gem::Requirement.new(">= 1.9.3")
41
101
  s.rubygems_version = "2.2.2"
42
102
  s.summary = "Ruby bindings for the Marvel API"
43
103
 
@@ -45,39 +105,36 @@ Gem::Specification.new do |s|
45
105
  s.specification_version = 4
46
106
 
47
107
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
48
- s.add_runtime_dependency(%q<faraday>, [">= 0"])
49
- s.add_runtime_dependency(%q<faraday_middleware>, [">= 0"])
50
- s.add_runtime_dependency(%q<hashie>, [">= 0"])
108
+ s.add_runtime_dependency(%q<faraday>, ["< 0.10", ">= 0.7"])
109
+ s.add_runtime_dependency(%q<faraday_middleware>, ["< 0.10", ">= 0.8"])
110
+ s.add_runtime_dependency(%q<hashie>, [">= 0.4.0"])
51
111
  s.add_development_dependency(%q<pry>, [">= 0"])
52
112
  s.add_development_dependency(%q<rspec>, [">= 0"])
53
113
  s.add_development_dependency(%q<shoulda>, [">= 0"])
54
114
  s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
55
115
  s.add_development_dependency(%q<bundler>, ["~> 1.0"])
56
116
  s.add_development_dependency(%q<jeweler>, ["~> 1.8.7"])
57
- s.add_development_dependency(%q<simplecov>, [">= 0"])
58
117
  else
59
- s.add_dependency(%q<faraday>, [">= 0"])
60
- s.add_dependency(%q<faraday_middleware>, [">= 0"])
61
- s.add_dependency(%q<hashie>, [">= 0"])
118
+ s.add_dependency(%q<faraday>, ["< 0.10", ">= 0.7"])
119
+ s.add_dependency(%q<faraday_middleware>, ["< 0.10", ">= 0.8"])
120
+ s.add_dependency(%q<hashie>, [">= 0.4.0"])
62
121
  s.add_dependency(%q<pry>, [">= 0"])
63
122
  s.add_dependency(%q<rspec>, [">= 0"])
64
123
  s.add_dependency(%q<shoulda>, [">= 0"])
65
124
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
66
125
  s.add_dependency(%q<bundler>, ["~> 1.0"])
67
126
  s.add_dependency(%q<jeweler>, ["~> 1.8.7"])
68
- s.add_dependency(%q<simplecov>, [">= 0"])
69
127
  end
70
128
  else
71
- s.add_dependency(%q<faraday>, [">= 0"])
72
- s.add_dependency(%q<faraday_middleware>, [">= 0"])
73
- s.add_dependency(%q<hashie>, [">= 0"])
129
+ s.add_dependency(%q<faraday>, ["< 0.10", ">= 0.7"])
130
+ s.add_dependency(%q<faraday_middleware>, ["< 0.10", ">= 0.8"])
131
+ s.add_dependency(%q<hashie>, [">= 0.4.0"])
74
132
  s.add_dependency(%q<pry>, [">= 0"])
75
133
  s.add_dependency(%q<rspec>, [">= 0"])
76
134
  s.add_dependency(%q<shoulda>, [">= 0"])
77
135
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
78
136
  s.add_dependency(%q<bundler>, ["~> 1.0"])
79
137
  s.add_dependency(%q<jeweler>, ["~> 1.8.7"])
80
- s.add_dependency(%q<simplecov>, [">= 0"])
81
138
  end
82
139
  end
83
140