themoviedb 0.0.19 → 0.0.20

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 567c0e0a4fff4d66e67a3f9cf9e7d0641ee27016
4
+ data.tar.gz: 4066ccbb075ec3360ffe717cc01f2b5d28844241
5
+ SHA512:
6
+ metadata.gz: d6032d0a84a869cc52b330ad3a184fc61b669095c58c0947f5d3b2c040e1a54bfaaea16bb98a8c929a49ec25e7eb7eb55ef75812cfb094c1423d224aa34d2a88
7
+ data.tar.gz: d10d904fc51c4cec12dba4dd62c011e098180b95656dc43eb6c11e909e88a7550b1d8a950c4b451f416ba906e439deaed2cc946c9d116c8c4bf99ea09a3f211d
@@ -26,7 +26,17 @@ module Tmdb
26
26
  :tagline,
27
27
  :title,
28
28
  :vote_average,
29
- :vote_count
29
+ :vote_count,
30
+ :alternative_titles,
31
+ :credits,
32
+ :images,
33
+ :keywords,
34
+ :releases,
35
+ :trailers,
36
+ :translations,
37
+ :reviews,
38
+ :lists,
39
+ :changes
30
40
  ]
31
41
 
32
42
  @@fields.each do |field|
@@ -13,7 +13,12 @@ module Tmdb
13
13
  :id,
14
14
  :name,
15
15
  :place_of_birth,
16
- :profile_path
16
+ :profile_path,
17
+ :movie_credits,
18
+ :tv_credits,
19
+ :combined_credits,
20
+ :images,
21
+ :changes
17
22
  ]
18
23
 
19
24
  @@fields.each do |field|
data/lib/themoviedb/tv.rb CHANGED
@@ -26,7 +26,9 @@ module Tmdb
26
26
  :seasons,
27
27
  :status,
28
28
  :vote_average,
29
- :vote_count
29
+ :vote_count,
30
+ :credits,
31
+ :external_ids
30
32
  ]
31
33
 
32
34
  @@fields.each do |field|
@@ -1,3 +1,3 @@
1
1
  module Tmdb
2
- VERSION = "0.0.19"
2
+ VERSION = "0.0.20"
3
3
  end
data/spec/movie_spec.rb CHANGED
@@ -10,7 +10,8 @@ describe Tmdb::Movie do
10
10
  :overview,:popularity,:poster_path,:production_companies,
11
11
  :production_countries,:release_date,:revenue,:runtime,
12
12
  :spoken_languages,:status,:tagline,:title,:vote_average,
13
- :vote_count]
13
+ :vote_count,:alternative_titles,:credits,:images,:keywords,
14
+ :releases,:trailers,:translations,:reviews,:lists]
14
15
 
15
16
  @fields.each do |field|
16
17
  it { should respond_to field }
@@ -211,6 +212,69 @@ describe Tmdb::Movie do
211
212
  end
212
213
  end
213
214
 
215
+ describe 'For a movie detail with appended response' do
216
+ let(:append_fields) { %w{ alternative_titles credits images keywords releases
217
+ trailers translations reviews lists changes }.join(',') }
218
+ before(:each) do
219
+ VCR.use_cassette 'movie/detail_with_appended_response' do
220
+ @movie = Tmdb::Movie.detail(22855, append_to_response: append_fields)
221
+ end
222
+ end
223
+
224
+ it 'should return alternative_titles' do
225
+ @movie.alternative_titles['titles'].size.should == 4
226
+ @movie.alternative_titles['titles'].first['title'].should == 'Superman und Batman Public Enemies'
227
+ end
228
+
229
+ it 'should return credits' do
230
+ @movie.credits['cast'].size.should == 20
231
+ @movie.credits['cast'].first['id'].should == 34947
232
+ @movie.credits['crew'].size.should == 3
233
+ @movie.credits['crew'].first['id'].should == 90367
234
+ end
235
+
236
+ it 'should return images' do
237
+ @movie.images['backdrops'].size.should == 6
238
+ @movie.images['backdrops'].first['file_path'].should == '/mXuqM7ksHW1AJ30AInwJvJTAwut.jpg'
239
+ @movie.images['posters'].size.should == 9
240
+ @movie.images['posters'].first['file_path'].should == '/7eaHkUKAzfstt6XQCiXyuKiZUAw.jpg'
241
+ end
242
+
243
+ it 'should return keywords' do
244
+ @movie.keywords['keywords'].size.should == 2
245
+ @movie.keywords['keywords'].first['id'].should == 9715
246
+ end
247
+
248
+ it 'should return releases' do
249
+ @movie.releases['countries'].size.should == 1
250
+ @movie.releases['countries'].first['release_date'].should == '2009-09-29'
251
+ end
252
+
253
+ it 'should return trailers' do
254
+ @movie.trailers['quicktime'].should == []
255
+ @movie.trailers['youtube'].size.should == 1
256
+ @movie.trailers['youtube'].first['name'].should == 'Official Preview Trailer'
257
+ end
258
+
259
+ it 'should return translations' do
260
+ @movie.translations['translations'].size.should == 13
261
+ @movie.translations['translations'].first['name'].should == 'English'
262
+ end
263
+
264
+ it 'should return reviews' do
265
+ @movie.reviews['results'].should == []
266
+ end
267
+
268
+ it 'should return lists' do
269
+ @movie.lists['results'].size.should == 4
270
+ @movie.lists['results'].first['id'].should == '51d6b52219c295172912ff1e'
271
+ end
272
+
273
+ it 'should return changes' do
274
+ @movie.changes['changes'].should == []
275
+ end
276
+ end
277
+
214
278
  describe "For a movies images" do
215
279
 
216
280
  before(:each) do
data/spec/person_spec.rb CHANGED
@@ -6,7 +6,8 @@ require 'vcr'
6
6
  describe Tmdb::Person do
7
7
  @fields = [:id,:name,:place_of_birth,:also_known_as,
8
8
  :adult,:biography,:birthday,:deathday,:homepage,
9
- :profile_path]
9
+ :profile_path,:movie_credits,:tv_credits,:combined_credits,
10
+ :images,:changes]
10
11
 
11
12
  @fields.each do |field|
12
13
  it { should respond_to field }
@@ -90,6 +91,46 @@ describe Tmdb::Person do
90
91
  end
91
92
  end
92
93
 
94
+ describe 'For a person detail with appended response' do
95
+ let(:append_fields) { %w{ movie_credits tv_credits combined_credits images changes }.join(',') }
96
+
97
+ before(:each) do
98
+ VCR.use_cassette 'person/detail_with_appended_response' do
99
+ @person = Tmdb::Person.detail(5292, append_to_response: append_fields)
100
+ end
101
+ end
102
+
103
+ it 'should return movie credits' do
104
+ @person.movie_credits['cast'].size.should == 47
105
+ @person.movie_credits['cast'].first['id'].should == 388
106
+ @person.movie_credits['crew'].size.should == 4
107
+ @person.movie_credits['crew'].first['id'].should == 13435
108
+ end
109
+
110
+ it 'should return tv credits' do
111
+ @person.tv_credits['cast'].size.should == 17
112
+ @person.tv_credits['cast'].first['id'].should == 1709
113
+ @person.tv_credits['crew'].size.should == 3
114
+ @person.tv_credits['crew'].first['id'].should == 18881
115
+ end
116
+
117
+ it 'should return combined credits' do
118
+ @person.combined_credits['cast'].size.should == 64
119
+ @person.combined_credits['cast'].first['id'].should == 388
120
+ @person.combined_credits['crew'].size.should == 7
121
+ @person.combined_credits['crew'].first['id'].should == 13435
122
+ end
123
+
124
+ it 'should return images' do
125
+ @person.images['profiles'].size.should == 6
126
+ @person.images['profiles'].first['file_path'].should == '/khMf8LLTtppUwuZqqnigD2nAy26.jpg'
127
+ end
128
+
129
+ it 'should return changes' do
130
+ @person.changes['changes'].should == []
131
+ end
132
+ end
133
+
93
134
  describe "For images of a person" do
94
135
  before(:each) do
95
136
  VCR.use_cassette 'person/images' do
data/spec/tv_spec.rb CHANGED
@@ -27,7 +27,9 @@ describe Tmdb::TV do
27
27
  :seasons,
28
28
  :status,
29
29
  :vote_average,
30
- :vote_count
30
+ :vote_count,
31
+ :credits,
32
+ :external_ids
31
33
  ]
32
34
 
33
35
  @fields.each do |field|
@@ -152,6 +154,27 @@ describe Tmdb::TV do
152
154
 
153
155
  end
154
156
 
157
+ describe "For a TV detail with appended response" do
158
+ let(:append_fields) { %w{ credits external_ids }.join(',') }
159
+
160
+ before(:each) do
161
+ VCR.use_cassette 'tv/detail_with_appeded_response' do
162
+ @tv = Tmdb::TV.detail(1396, append_to_response: append_fields)
163
+ end
164
+ end
165
+
166
+ it 'should return credits' do
167
+ @tv.credits['cast'].size.should == 7
168
+ @tv.credits['cast'].first['id'].should == 17419
169
+ @tv.credits['crew'].size.should == 4
170
+ @tv.credits['crew'].first['id'].should == 5162
171
+ end
172
+
173
+ it 'should return external_ids' do
174
+ @tv.external_ids['imdb_id'].should == 'tt0903747'
175
+ end
176
+ end
177
+
155
178
  describe "For popular TV shows" do
156
179
 
157
180
  before(:each) do
@@ -431,4 +454,4 @@ describe Tmdb::TV do
431
454
 
432
455
  end
433
456
 
434
- end
457
+ end
metadata CHANGED
@@ -1,27 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: themoviedb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.19
5
- prerelease:
4
+ version: 0.0.20
6
5
  platform: ruby
7
6
  authors:
8
7
  - Ahmet Abdi
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-01-18 00:00:00.000000000 Z
11
+ date: 2014-02-03 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: httparty
16
- requirement: &19356660 !ruby/object:Gem::Requirement
17
- none: false
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *19356660
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
25
27
  description: Provides a simple, easy to use interface for the Movie Database API.
26
28
  email:
27
29
  - ahmetabdi@gmail.com
@@ -53,27 +55,26 @@ files:
53
55
  - spec/find_spec.rb
54
56
  homepage: http://rubygems.org/gems/themoviedb
55
57
  licenses: []
58
+ metadata: {}
56
59
  post_install_message:
57
60
  rdoc_options: []
58
61
  require_paths:
59
62
  - lib
60
63
  required_ruby_version: !ruby/object:Gem::Requirement
61
- none: false
62
64
  requirements:
63
- - - ! '>='
65
+ - - '>='
64
66
  - !ruby/object:Gem::Version
65
67
  version: '0'
66
68
  required_rubygems_version: !ruby/object:Gem::Requirement
67
- none: false
68
69
  requirements:
69
- - - ! '>='
70
+ - - '>='
70
71
  - !ruby/object:Gem::Version
71
72
  version: '0'
72
73
  requirements: []
73
74
  rubyforge_project: themoviedb
74
- rubygems_version: 1.8.11
75
+ rubygems_version: 2.1.11
75
76
  signing_key:
76
- specification_version: 3
77
+ specification_version: 4
77
78
  summary: A Ruby wrapper for the The Movie Database API.
78
79
  test_files:
79
80
  - spec/movie_spec.rb