imdb_party 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/imdb_party.gemspec +2 -2
- data/lib/imdb_party/imdb.rb +1 -1
- data/lib/imdb_party.rb +0 -2
- data/test/search_test.rb +10 -0
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/imdb_party.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{imdb_party}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jon Maddox"]
|
12
|
-
s.date = %q{2010-10-
|
12
|
+
s.date = %q{2010-10-15}
|
13
13
|
s.description = %q{IMDB client using the IMDB API that their iPhone app uses}
|
14
14
|
s.email = %q{jon@mustacheinc.com}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/imdb_party/imdb.rb
CHANGED
@@ -17,7 +17,7 @@ module ImdbParty
|
|
17
17
|
result_section["list"].each do |r|
|
18
18
|
h = {:title => r["title"], :year => r["year"], :imdb_id => r["tconst"]}
|
19
19
|
h.merge!(:poster_url => r["image"]["url"]) if r["image"] && r["image"]["url"]
|
20
|
-
movie_results << h
|
20
|
+
movie_results << h
|
21
21
|
end
|
22
22
|
end
|
23
23
|
end
|
data/lib/imdb_party.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
require 'rubygems'
|
2
1
|
require 'httparty'
|
3
2
|
|
4
3
|
directory = File.expand_path(File.dirname(__FILE__))
|
@@ -7,4 +6,3 @@ require File.join(directory, 'imdb_party', 'imdb')
|
|
7
6
|
require File.join(directory, 'imdb_party', 'movie')
|
8
7
|
require File.join(directory, 'imdb_party', 'person')
|
9
8
|
|
10
|
-
# ImdbParty::Imdb.new.find_movie_by_id("tt0100234")
|
data/test/search_test.rb
CHANGED
@@ -16,6 +16,16 @@ class SearchTest < Test::Unit::TestCase
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
+
context "search for bad title with no results" do
|
20
|
+
setup do
|
21
|
+
@results = @imdb.find_by_title("sdkljlkkl123j4lk23kl3")
|
22
|
+
end
|
23
|
+
|
24
|
+
should "have 15 results" do
|
25
|
+
assert_equal 0, @results.size
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
19
29
|
context "find movie by id" do
|
20
30
|
setup do
|
21
31
|
@movie = @imdb.find_movie_by_id("tt0382932")
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imdb_party
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 2
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jon Maddox
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-10-
|
18
|
+
date: 2010-10-15 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|