spotlite 0.8.3 → 0.8.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,8 +2,8 @@ require 'rspec'
2
2
  require 'spotlite'
3
3
 
4
4
  RSpec.configure do |config|
5
- config.color_enabled = true
6
- config.formatter = 'documentation'
5
+ config.color = true
6
+ config.formatter = 'documentation'
7
7
  end
8
8
 
9
9
  def read_fixture(path)
@@ -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(150000).of(900000)
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(10).of(100)
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/MV5BMTQ2MTQyMzYzMV5BMl5BanBnXkFtZTcwODY0ODI4Mg@@.jpg")
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 75..85 movies" do
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(5).of(80)
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(5).of(29)
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("Love Birds in Bondage")
76
- @person.filmography(false, false)[:actor].last.imdb_id.should eql("1959459")
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 175..195 movies" do
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(10).of(185)
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("The Typewriter, the Rifle & the Movie Camera")
86
- @person.filmography(true, true).last.imdb_id.should eql("0118004")
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(10).of(75)
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.3
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: 2014-12-14 00:00:00.000000000 Z
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.3
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