tatooine 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +22 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE.txt +22 -0
  5. data/README.md +52 -0
  6. data/Rakefile +8 -0
  7. data/lib/tatooine.rb +17 -0
  8. data/lib/tatooine/error.rb +25 -0
  9. data/lib/tatooine/film.rb +6 -0
  10. data/lib/tatooine/middleware/raise_http_error.rb +34 -0
  11. data/lib/tatooine/person.rb +6 -0
  12. data/lib/tatooine/planet.rb +6 -0
  13. data/lib/tatooine/resource.rb +125 -0
  14. data/lib/tatooine/species.rb +6 -0
  15. data/lib/tatooine/starship.rb +6 -0
  16. data/lib/tatooine/vehicle.rb +6 -0
  17. data/lib/tatooine/version.rb +3 -0
  18. data/spec/error_spec.rb +21 -0
  19. data/spec/film_spec.rb +107 -0
  20. data/spec/fixtures/film_schema.json +1 -0
  21. data/spec/fixtures/vcr_cassettes/film_1.yml +57 -0
  22. data/spec/fixtures/vcr_cassettes/film_1_and_schema.yml +57 -0
  23. data/spec/fixtures/vcr_cassettes/film_count.yml +101 -0
  24. data/spec/fixtures/vcr_cassettes/film_list.yml +441 -0
  25. data/spec/fixtures/vcr_cassettes/film_schema.yml +101 -0
  26. data/spec/fixtures/vcr_cassettes/person_1.yml +49 -0
  27. data/spec/fixtures/vcr_cassettes/person_1_and_schema.yml +49 -0
  28. data/spec/fixtures/vcr_cassettes/person_count.yml +58 -0
  29. data/spec/fixtures/vcr_cassettes/person_list.yml +58 -0
  30. data/spec/fixtures/vcr_cassettes/person_next.yml +56 -0
  31. data/spec/fixtures/vcr_cassettes/person_previous.yml +58 -0
  32. data/spec/fixtures/vcr_cassettes/person_schema.yml +58 -0
  33. data/spec/fixtures/vcr_cassettes/planet_1.yml +50 -0
  34. data/spec/fixtures/vcr_cassettes/planet_1_and_schema.yml +50 -0
  35. data/spec/fixtures/vcr_cassettes/planet_count.yml +60 -0
  36. data/spec/fixtures/vcr_cassettes/planet_list.yml +60 -0
  37. data/spec/fixtures/vcr_cassettes/planet_next.yml +63 -0
  38. data/spec/fixtures/vcr_cassettes/planet_previous.yml +60 -0
  39. data/spec/fixtures/vcr_cassettes/planet_schema.yml +60 -0
  40. data/spec/fixtures/vcr_cassettes/species_1.yml +52 -0
  41. data/spec/fixtures/vcr_cassettes/species_1_and_schema.yml +52 -0
  42. data/spec/fixtures/vcr_cassettes/species_count.yml +63 -0
  43. data/spec/fixtures/vcr_cassettes/species_list.yml +63 -0
  44. data/spec/fixtures/vcr_cassettes/species_next.yml +59 -0
  45. data/spec/fixtures/vcr_cassettes/species_previous.yml +63 -0
  46. data/spec/fixtures/vcr_cassettes/species_schema.yml +63 -0
  47. data/spec/fixtures/vcr_cassettes/starship_10.yml +51 -0
  48. data/spec/fixtures/vcr_cassettes/starship_2_and_schema.yml +51 -0
  49. data/spec/fixtures/vcr_cassettes/starship_count.yml +78 -0
  50. data/spec/fixtures/vcr_cassettes/starship_list.yml +78 -0
  51. data/spec/fixtures/vcr_cassettes/starship_next.yml +76 -0
  52. data/spec/fixtures/vcr_cassettes/starship_previous.yml +78 -0
  53. data/spec/fixtures/vcr_cassettes/starship_schema.yml +78 -0
  54. data/spec/fixtures/vcr_cassettes/vehicle_14.yml +50 -0
  55. data/spec/fixtures/vcr_cassettes/vehicle_14_and_schema.yml +50 -0
  56. data/spec/fixtures/vcr_cassettes/vehicle_count.yml +70 -0
  57. data/spec/fixtures/vcr_cassettes/vehicle_list.yml +70 -0
  58. data/spec/fixtures/vcr_cassettes/vehicle_next.yml +68 -0
  59. data/spec/fixtures/vcr_cassettes/vehicle_previous.yml +70 -0
  60. data/spec/fixtures/vcr_cassettes/vehicle_schema.yml +70 -0
  61. data/spec/person_spec.rb +120 -0
  62. data/spec/planet_spec.rb +106 -0
  63. data/spec/spec_helper.rb +21 -0
  64. data/spec/species_spec.rb +111 -0
  65. data/spec/starship_spec.rb +106 -0
  66. data/spec/vehicle_spec.rb +106 -0
  67. data/tatooine.gemspec +30 -0
  68. metadata +272 -0
@@ -0,0 +1,30 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'tatooine/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "tatooine"
8
+ spec.version = Tatooine::VERSION
9
+ spec.authors = ["Phil Nash"]
10
+ spec.email = ["philnash@gmail.com"]
11
+ spec.summary = %q{A Ruby interface to SWAPI (the Star Wars API).}
12
+ spec.description = %q{A Ruby interface to SWAPI (the Star Wars API). http://swapi.co/}
13
+ spec.homepage = "https://github.com/philnash/tatooine"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency "faraday", "~> 0.9.0"
22
+ spec.add_dependency "faraday_middleware"
23
+
24
+ spec.add_development_dependency "bundler", "~> 1.6"
25
+ spec.add_development_dependency "rake"
26
+ spec.add_development_dependency "vcr", "~> 2.9.3"
27
+ spec.add_development_dependency "rspec", "~> 3.1.0"
28
+ spec.add_development_dependency "webmock", "~> 1.20.0"
29
+ spec.add_development_dependency "simplecov"
30
+ end
metadata ADDED
@@ -0,0 +1,272 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tatooine
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Phil Nash
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-02-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: faraday
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 0.9.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 0.9.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: faraday_middleware
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.6'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.6'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: vcr
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 2.9.3
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 2.9.3
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 3.1.0
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 3.1.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: webmock
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 1.20.0
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 1.20.0
111
+ - !ruby/object:Gem::Dependency
112
+ name: simplecov
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ description: A Ruby interface to SWAPI (the Star Wars API). http://swapi.co/
126
+ email:
127
+ - philnash@gmail.com
128
+ executables: []
129
+ extensions: []
130
+ extra_rdoc_files: []
131
+ files:
132
+ - ".gitignore"
133
+ - Gemfile
134
+ - LICENSE.txt
135
+ - README.md
136
+ - Rakefile
137
+ - lib/tatooine.rb
138
+ - lib/tatooine/error.rb
139
+ - lib/tatooine/film.rb
140
+ - lib/tatooine/middleware/raise_http_error.rb
141
+ - lib/tatooine/person.rb
142
+ - lib/tatooine/planet.rb
143
+ - lib/tatooine/resource.rb
144
+ - lib/tatooine/species.rb
145
+ - lib/tatooine/starship.rb
146
+ - lib/tatooine/vehicle.rb
147
+ - lib/tatooine/version.rb
148
+ - spec/error_spec.rb
149
+ - spec/film_spec.rb
150
+ - spec/fixtures/film_schema.json
151
+ - spec/fixtures/vcr_cassettes/film_1.yml
152
+ - spec/fixtures/vcr_cassettes/film_1_and_schema.yml
153
+ - spec/fixtures/vcr_cassettes/film_count.yml
154
+ - spec/fixtures/vcr_cassettes/film_list.yml
155
+ - spec/fixtures/vcr_cassettes/film_schema.yml
156
+ - spec/fixtures/vcr_cassettes/person_1.yml
157
+ - spec/fixtures/vcr_cassettes/person_1_and_schema.yml
158
+ - spec/fixtures/vcr_cassettes/person_count.yml
159
+ - spec/fixtures/vcr_cassettes/person_list.yml
160
+ - spec/fixtures/vcr_cassettes/person_next.yml
161
+ - spec/fixtures/vcr_cassettes/person_previous.yml
162
+ - spec/fixtures/vcr_cassettes/person_schema.yml
163
+ - spec/fixtures/vcr_cassettes/planet_1.yml
164
+ - spec/fixtures/vcr_cassettes/planet_1_and_schema.yml
165
+ - spec/fixtures/vcr_cassettes/planet_count.yml
166
+ - spec/fixtures/vcr_cassettes/planet_list.yml
167
+ - spec/fixtures/vcr_cassettes/planet_next.yml
168
+ - spec/fixtures/vcr_cassettes/planet_previous.yml
169
+ - spec/fixtures/vcr_cassettes/planet_schema.yml
170
+ - spec/fixtures/vcr_cassettes/species_1.yml
171
+ - spec/fixtures/vcr_cassettes/species_1_and_schema.yml
172
+ - spec/fixtures/vcr_cassettes/species_count.yml
173
+ - spec/fixtures/vcr_cassettes/species_list.yml
174
+ - spec/fixtures/vcr_cassettes/species_next.yml
175
+ - spec/fixtures/vcr_cassettes/species_previous.yml
176
+ - spec/fixtures/vcr_cassettes/species_schema.yml
177
+ - spec/fixtures/vcr_cassettes/starship_10.yml
178
+ - spec/fixtures/vcr_cassettes/starship_2_and_schema.yml
179
+ - spec/fixtures/vcr_cassettes/starship_count.yml
180
+ - spec/fixtures/vcr_cassettes/starship_list.yml
181
+ - spec/fixtures/vcr_cassettes/starship_next.yml
182
+ - spec/fixtures/vcr_cassettes/starship_previous.yml
183
+ - spec/fixtures/vcr_cassettes/starship_schema.yml
184
+ - spec/fixtures/vcr_cassettes/vehicle_14.yml
185
+ - spec/fixtures/vcr_cassettes/vehicle_14_and_schema.yml
186
+ - spec/fixtures/vcr_cassettes/vehicle_count.yml
187
+ - spec/fixtures/vcr_cassettes/vehicle_list.yml
188
+ - spec/fixtures/vcr_cassettes/vehicle_next.yml
189
+ - spec/fixtures/vcr_cassettes/vehicle_previous.yml
190
+ - spec/fixtures/vcr_cassettes/vehicle_schema.yml
191
+ - spec/person_spec.rb
192
+ - spec/planet_spec.rb
193
+ - spec/spec_helper.rb
194
+ - spec/species_spec.rb
195
+ - spec/starship_spec.rb
196
+ - spec/vehicle_spec.rb
197
+ - tatooine.gemspec
198
+ homepage: https://github.com/philnash/tatooine
199
+ licenses:
200
+ - MIT
201
+ metadata: {}
202
+ post_install_message:
203
+ rdoc_options: []
204
+ require_paths:
205
+ - lib
206
+ required_ruby_version: !ruby/object:Gem::Requirement
207
+ requirements:
208
+ - - ">="
209
+ - !ruby/object:Gem::Version
210
+ version: '0'
211
+ required_rubygems_version: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - ">="
214
+ - !ruby/object:Gem::Version
215
+ version: '0'
216
+ requirements: []
217
+ rubyforge_project:
218
+ rubygems_version: 2.2.2
219
+ signing_key:
220
+ specification_version: 4
221
+ summary: A Ruby interface to SWAPI (the Star Wars API).
222
+ test_files:
223
+ - spec/error_spec.rb
224
+ - spec/film_spec.rb
225
+ - spec/fixtures/film_schema.json
226
+ - spec/fixtures/vcr_cassettes/film_1.yml
227
+ - spec/fixtures/vcr_cassettes/film_1_and_schema.yml
228
+ - spec/fixtures/vcr_cassettes/film_count.yml
229
+ - spec/fixtures/vcr_cassettes/film_list.yml
230
+ - spec/fixtures/vcr_cassettes/film_schema.yml
231
+ - spec/fixtures/vcr_cassettes/person_1.yml
232
+ - spec/fixtures/vcr_cassettes/person_1_and_schema.yml
233
+ - spec/fixtures/vcr_cassettes/person_count.yml
234
+ - spec/fixtures/vcr_cassettes/person_list.yml
235
+ - spec/fixtures/vcr_cassettes/person_next.yml
236
+ - spec/fixtures/vcr_cassettes/person_previous.yml
237
+ - spec/fixtures/vcr_cassettes/person_schema.yml
238
+ - spec/fixtures/vcr_cassettes/planet_1.yml
239
+ - spec/fixtures/vcr_cassettes/planet_1_and_schema.yml
240
+ - spec/fixtures/vcr_cassettes/planet_count.yml
241
+ - spec/fixtures/vcr_cassettes/planet_list.yml
242
+ - spec/fixtures/vcr_cassettes/planet_next.yml
243
+ - spec/fixtures/vcr_cassettes/planet_previous.yml
244
+ - spec/fixtures/vcr_cassettes/planet_schema.yml
245
+ - spec/fixtures/vcr_cassettes/species_1.yml
246
+ - spec/fixtures/vcr_cassettes/species_1_and_schema.yml
247
+ - spec/fixtures/vcr_cassettes/species_count.yml
248
+ - spec/fixtures/vcr_cassettes/species_list.yml
249
+ - spec/fixtures/vcr_cassettes/species_next.yml
250
+ - spec/fixtures/vcr_cassettes/species_previous.yml
251
+ - spec/fixtures/vcr_cassettes/species_schema.yml
252
+ - spec/fixtures/vcr_cassettes/starship_10.yml
253
+ - spec/fixtures/vcr_cassettes/starship_2_and_schema.yml
254
+ - spec/fixtures/vcr_cassettes/starship_count.yml
255
+ - spec/fixtures/vcr_cassettes/starship_list.yml
256
+ - spec/fixtures/vcr_cassettes/starship_next.yml
257
+ - spec/fixtures/vcr_cassettes/starship_previous.yml
258
+ - spec/fixtures/vcr_cassettes/starship_schema.yml
259
+ - spec/fixtures/vcr_cassettes/vehicle_14.yml
260
+ - spec/fixtures/vcr_cassettes/vehicle_14_and_schema.yml
261
+ - spec/fixtures/vcr_cassettes/vehicle_count.yml
262
+ - spec/fixtures/vcr_cassettes/vehicle_list.yml
263
+ - spec/fixtures/vcr_cassettes/vehicle_next.yml
264
+ - spec/fixtures/vcr_cassettes/vehicle_previous.yml
265
+ - spec/fixtures/vcr_cassettes/vehicle_schema.yml
266
+ - spec/person_spec.rb
267
+ - spec/planet_spec.rb
268
+ - spec/spec_helper.rb
269
+ - spec/species_spec.rb
270
+ - spec/starship_spec.rb
271
+ - spec/vehicle_spec.rb
272
+ has_rdoc: