spotlite 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/spec/spec_helper.rb CHANGED
@@ -20,6 +20,7 @@ IMDB_SAMPLES = {
20
20
  "http://www.imdb.com/title/tt0169547/" => "tt0169547/index",
21
21
  "http://www.imdb.com/title/tt0047396/releaseinfo" => "tt0047396/releaseinfo",
22
22
  "http://www.imdb.com/title/tt0002186/" => "tt0002186/index",
23
+ "http://www.imdb.com/title/tt1134629/fullcredits" => "tt1134629/fullcredits",
23
24
  "http://www.imdb.com/find?q=the+core&s=all" => "search_the_core"
24
25
  }
25
26
 
@@ -116,6 +116,12 @@ describe "Spotlite::Movie" do
116
116
  @movie.writers.should include({:imdb_id => "0905154", :name => "Lana Wachowski"})
117
117
  end
118
118
 
119
+ it "should return only unique writers" do
120
+ # The Private Lives of Pippa Lee (2009)
121
+ @movie = Spotlite::Movie.new("1134629")
122
+ @movie.writers.size.should eql(1)
123
+ end
124
+
119
125
  it "should return producers" do
120
126
  @movie.producers.should be_an(Array)
121
127
  @movie.producers.size.should eql(10)
@@ -136,11 +142,19 @@ describe "Spotlite::Movie" do
136
142
  @movie.cast.should include({:imdb_id => "3269395", :name => "Rana Morrison", :character => "Shaylae - Woman in Office (uncredited)"})
137
143
  end
138
144
 
145
+ it "should return starred actors" do
146
+ @movie.stars.should be_an(Array)
147
+ @movie.stars.size.should eql(3)
148
+ @movie.stars.should include({:imdb_id => "0000206", :name => "Keanu Reeves"})
149
+ @movie.stars.should include({:imdb_id => "0000401", :name => "Laurence Fishburne"})
150
+ @movie.stars.should include({:imdb_id => "0005251", :name => "Carrie-Anne Moss"})
151
+ end
152
+
139
153
  it "should return release dates" do
140
154
  # Rear Window (1954)
141
155
  @movie = Spotlite::Movie.new("0047396")
142
156
  @movie.release_dates.should be_an(Array)
143
- @movie.release_dates.size.should eql(42)
157
+ @movie.release_dates.size.should eql(43)
144
158
  @movie.release_dates.should include({:code => "jp", :region => "Japan", :date => Date.new(1955,1,14)})
145
159
  @movie.release_dates.should include({:code => "tr", :region => "Turkey", :date => Date.new(1956,4,1)})
146
160
  @movie.release_dates.should include({:code => "us", :region => "USA", :date => Date.new(1968,1,1)})
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spotlite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
5
- prerelease:
4
+ version: 0.2.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Artem Pakk
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-02-22 00:00:00.000000000 Z
11
+ date: 2013-04-21 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: nokogiri
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
@@ -30,7 +27,6 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rspec
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
31
  - - ~>
36
32
  - !ruby/object:Gem::Version
@@ -38,7 +34,6 @@ dependencies:
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
38
  - - ~>
44
39
  - !ruby/object:Gem::Version
@@ -46,7 +41,6 @@ dependencies:
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: fakeweb
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
45
  - - ! '>='
52
46
  - !ruby/object:Gem::Version
@@ -54,7 +48,6 @@ dependencies:
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
52
  - - ! '>='
60
53
  - !ruby/object:Gem::Version
@@ -90,6 +83,7 @@ files:
90
83
  - spec/fixtures/tt0133093/trivia
91
84
  - spec/fixtures/tt0169547/index
92
85
  - spec/fixtures/tt0317248/index
86
+ - spec/fixtures/tt1134629/fullcredits
93
87
  - spec/spec_helper.rb
94
88
  - spec/spotlite/movie_spec.rb
95
89
  - spec/spotlite/search_spec.rb
@@ -97,27 +91,26 @@ files:
97
91
  - tasks/fixtures.rake
98
92
  homepage: http://github.com/defeed/spotlite
99
93
  licenses: []
94
+ metadata: {}
100
95
  post_install_message:
101
96
  rdoc_options: []
102
97
  require_paths:
103
98
  - lib
104
99
  required_ruby_version: !ruby/object:Gem::Requirement
105
- none: false
106
100
  requirements:
107
101
  - - ! '>='
108
102
  - !ruby/object:Gem::Version
109
103
  version: '0'
110
104
  required_rubygems_version: !ruby/object:Gem::Requirement
111
- none: false
112
105
  requirements:
113
106
  - - ! '>='
114
107
  - !ruby/object:Gem::Version
115
108
  version: '0'
116
109
  requirements: []
117
110
  rubyforge_project:
118
- rubygems_version: 1.8.24
111
+ rubygems_version: 2.0.3
119
112
  signing_key:
120
- specification_version: 3
113
+ specification_version: 4
121
114
  summary: Ruby gem to fetch publicly available information about movies from IMDb
122
115
  test_files:
123
116
  - spec/fixtures/search_the_core
@@ -130,6 +123,7 @@ test_files:
130
123
  - spec/fixtures/tt0133093/trivia
131
124
  - spec/fixtures/tt0169547/index
132
125
  - spec/fixtures/tt0317248/index
126
+ - spec/fixtures/tt1134629/fullcredits
133
127
  - spec/spec_helper.rb
134
128
  - spec/spotlite/movie_spec.rb
135
129
  - spec/spotlite/search_spec.rb