spotlite 0.8.3 → 0.8.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 +4 -4
- data/lib/spotlite/movie.rb +9 -5
- data/lib/spotlite/version.rb +1 -1
- data/spec/fixtures/movie_find_conan +337 -241
- data/spec/fixtures/movie_find_no_results +338 -242
- data/spec/fixtures/nm0000233/index +2377 -1422
- data/spec/fixtures/nm0005132/index +1231 -541
- data/spec/fixtures/nm0864666/index +808 -283
- data/spec/fixtures/nm1659547/index +1669 -781
- data/spec/fixtures/person_find_conan +337 -241
- data/spec/fixtures/person_find_no_results +338 -242
- data/spec/fixtures/search_name_count_50 +485 -274
- data/spec/fixtures/search_title_count_50 +562 -351
- data/spec/fixtures/tt0002186/index +909 -2113
- data/spec/fixtures/tt0047396/releaseinfo +539 -384
- data/spec/fixtures/tt0112873/index +1269 -658
- data/spec/fixtures/tt0120338/technical +384 -252
- data/spec/fixtures/tt0133093/criticreviews +384 -252
- data/spec/fixtures/tt0133093/fullcredits +817 -641
- data/spec/fixtures/tt0133093/index +1487 -789
- data/spec/fixtures/tt0133093/keywords +1698 -1549
- data/spec/fixtures/tt0133093/mediaindex_still_frame +351 -249
- data/spec/fixtures/tt0133093/releaseinfo +407 -260
- data/spec/fixtures/tt0133093/trivia +1847 -1459
- data/spec/fixtures/tt0169547/index +1480 -735
- data/spec/fixtures/tt0317248/index +1404 -702
- data/spec/fixtures/tt1134629/fullcredits +699 -520
- data/spec/spec_helper.rb +2 -2
- data/spec/spotlite/movie_spec.rb +2 -2
- data/spec/spotlite/person_spec.rb +11 -11
- metadata +3 -3
data/spec/spec_helper.rb
CHANGED
data/spec/spotlite/movie_spec.rb
CHANGED
@@ -41,7 +41,7 @@ describe "Spotlite::Movie" do
|
|
41
41
|
end
|
42
42
|
|
43
43
|
it "should return number of votes" do
|
44
|
-
@movie.votes.should be_within(
|
44
|
+
@movie.votes.should be_within(500_000).of(1_500_000)
|
45
45
|
end
|
46
46
|
|
47
47
|
it "should return Metascore rating" do
|
@@ -126,7 +126,7 @@ describe "Spotlite::Movie" do
|
|
126
126
|
|
127
127
|
it "should return trivia" do
|
128
128
|
@movie.trivia.should be_an(Array)
|
129
|
-
@movie.trivia.size.should be_within(
|
129
|
+
@movie.trivia.size.should be_within(100).of(200)
|
130
130
|
@movie.trivia.should include("Nicolas Cage turned down the part of Neo because of family commitments. Other actors considered for the role included Tom Cruise and Leonardo DiCaprio.")
|
131
131
|
@movie.trivia.should include("Carrie-Anne Moss twisted her ankle while shooting one of her scenes but decided not to tell anyone until after filming, so they wouldn't re-cast her.")
|
132
132
|
@movie.trivia.should include("Gary Oldman was considered as Morpheus at one point, as well as Samuel L. Jackson.")
|
@@ -35,7 +35,7 @@ describe "Spotlite::Person" do
|
|
35
35
|
it "should return new style photo URL" do
|
36
36
|
# Carey Mulligan
|
37
37
|
@person = Spotlite::Person.new("1659547")
|
38
|
-
@person.photo_url.should eql("http://ia.media-imdb.com/images/M/
|
38
|
+
@person.photo_url.should eql("http://ia.media-imdb.com/images/M/MV5BMTYyNDE1NTQ1M15BMl5BanBnXkFtZTcwMzg4Mzc3Nw@@.jpg")
|
39
39
|
end
|
40
40
|
|
41
41
|
it "should return nil if photo doesn't exist" do
|
@@ -52,9 +52,9 @@ describe "Spotlite::Person" do
|
|
52
52
|
end
|
53
53
|
|
54
54
|
context "with basic jobs (director, actor, writer, producer), flattened to array" do
|
55
|
-
it "should return an array of
|
55
|
+
it "should return an array of 50..250 movies" do
|
56
56
|
@person.filmography.should be_an(Array)
|
57
|
-
@person.filmography.size.should be_within(
|
57
|
+
@person.filmography.size.should be_within(150).of(200)
|
58
58
|
@person.filmography.each{ |movie| movie.should be_a(Spotlite::Movie) }
|
59
59
|
@person.filmography.last.title.should eql("My Best Friend's Birthday")
|
60
60
|
@person.filmography.last.imdb_id.should eql("0359715")
|
@@ -70,20 +70,20 @@ describe "Spotlite::Person" do
|
|
70
70
|
|
71
71
|
it "should be able to retrieve an array of +Spotlite::Movie+ objects by a hash key" do
|
72
72
|
@person.filmography(false, false)[:actor].should be_an(Array)
|
73
|
-
@person.filmography(false, false)[:actor].size.should be_within(
|
73
|
+
@person.filmography(false, false)[:actor].size.should be_within(50).of(60)
|
74
74
|
@person.filmography(false, false)[:actor].each{ |movie| movie.should be_a(Spotlite::Movie) }
|
75
|
-
@person.filmography(false, false)[:actor].last.title.should eql("
|
76
|
-
@person.filmography(false, false)[:actor].last.imdb_id.should eql("
|
75
|
+
@person.filmography(false, false)[:actor].last.title.should eql("My Best Friend's Birthday")
|
76
|
+
@person.filmography(false, false)[:actor].last.imdb_id.should eql("0359715")
|
77
77
|
end
|
78
78
|
end
|
79
79
|
|
80
80
|
context "with all available jobs, flattened to array" do
|
81
|
-
it "should return an array of
|
81
|
+
it "should return an array of 50..350 movies" do
|
82
82
|
@person.filmography(true, true).should be_an(Array)
|
83
|
-
@person.filmography(true, true).size.should be_within(
|
83
|
+
@person.filmography(true, true).size.should be_within(150).of(200)
|
84
84
|
@person.filmography(true, true).each{ |movie| movie.should be_a(Spotlite::Movie) }
|
85
|
-
@person.filmography(true, true).last.title.should eql("
|
86
|
-
@person.filmography(true, true).last.imdb_id.should eql("
|
85
|
+
@person.filmography(true, true).last.title.should eql("God Said, 'Ha!'")
|
86
|
+
@person.filmography(true, true).last.imdb_id.should eql("0119207")
|
87
87
|
end
|
88
88
|
end
|
89
89
|
|
@@ -96,7 +96,7 @@ describe "Spotlite::Person" do
|
|
96
96
|
|
97
97
|
it "should be able to retrieve an array of +Spotlite::Movie+ objects by a hash key" do
|
98
98
|
@person.filmography(true, false)[:thanks].should be_an(Array)
|
99
|
-
@person.filmography(true, false)[:thanks].size.should be_within(
|
99
|
+
@person.filmography(true, false)[:thanks].size.should be_within(90).of(100)
|
100
100
|
@person.filmography(true, false)[:thanks].each{ |movie| movie.should be_a(Spotlite::Movie) }
|
101
101
|
@person.filmography(true, false)[:thanks].last.title.should eql("White Man's Burden")
|
102
102
|
@person.filmography(true, false)[:thanks].last.imdb_id.should eql("0114928")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spotlite
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Artem Pakk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -149,7 +149,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
149
|
version: '0'
|
150
150
|
requirements: []
|
151
151
|
rubyforge_project:
|
152
|
-
rubygems_version: 2.4.
|
152
|
+
rubygems_version: 2.4.8
|
153
153
|
signing_key:
|
154
154
|
specification_version: 4
|
155
155
|
summary: Ruby gem to fetch publicly available information about movies from IMDb
|