imdb_party 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -7,9 +7,9 @@
7
7
  imdb = ImdbParty::Imdb.new
8
8
  ### Search for a movie by title
9
9
 
10
- imdb.find_movie_by_title("The Dark Knight") => [{:title => "The Dark Knight", :year => "2008", :imdb_id => "tt0468569"}, {:title => "Batman Unmasked", ...}]
10
+ imdb.find_by_title("The Dark Knight") => [{:title => "The Dark Knight", :year => "2008", :imdb_id => "tt0468569"}, {:title => "Batman Unmasked", ...}]
11
11
 
12
- ### Get a movie by its imdb_id
12
+ ### Get a movie by its imdb_id
13
13
 
14
14
  movie = imdb.find_movie_by_id("tt0468569")
15
15
 
@@ -18,10 +18,9 @@
18
18
  movie.certification => "PG-13"
19
19
 
20
20
  ### Find the top 250 movies of all time
21
-
21
+
22
22
  imdb.top_250 => [{:title => "Shawshank Redemption", :year => "1994", :imdb_id => "tt0111161"}, {:title => "The Godfather", ...}]
23
23
 
24
24
  ### Get the currently popular tv shows
25
25
 
26
- imdb.top_shows => [{:title => "Glee", :year => "2009", :imdb_id => "tt1327801"}, {:title => "Dexter", ...}]
27
-
26
+ imdb.popular_shows => [{:title => "Glee", :year => "2009", :imdb_id => "tt1327801"}, {:title => "Dexter", ...}]
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.4.0
data/imdb_party.gemspec CHANGED
@@ -1,49 +1,47 @@
1
1
  # Generated by jeweler
2
- # DO NOT EDIT THIS FILE
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{imdb_party}
8
- s.version = "0.3.0"
8
+ s.version = "0.4.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-11-19}
12
+ s.date = %q{2011-01-04}
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 = [
16
16
  "LICENSE",
17
- "README.md"
17
+ "README.md"
18
18
  ]
19
19
  s.files = [
20
20
  ".document",
21
- ".gitignore",
22
- "LICENSE",
23
- "README.md",
24
- "Rakefile",
25
- "VERSION",
26
- "imdb_party.gemspec",
27
- "lib/imdb_party.rb",
28
- "lib/imdb_party/httparty_icebox.rb",
29
- "lib/imdb_party/imdb.rb",
30
- "lib/imdb_party/movie.rb",
31
- "lib/imdb_party/person.rb",
32
- "test/movie_test.rb",
33
- "test/person_test.rb",
34
- "test/search_test.rb",
35
- "test/test_helper.rb"
21
+ "LICENSE",
22
+ "README.md",
23
+ "Rakefile",
24
+ "VERSION",
25
+ "imdb_party.gemspec",
26
+ "lib/imdb_party.rb",
27
+ "lib/imdb_party/httparty_icebox.rb",
28
+ "lib/imdb_party/imdb.rb",
29
+ "lib/imdb_party/movie.rb",
30
+ "lib/imdb_party/person.rb",
31
+ "test/movie_test.rb",
32
+ "test/person_test.rb",
33
+ "test/search_test.rb",
34
+ "test/test_helper.rb"
36
35
  ]
37
36
  s.homepage = %q{http://github.com/maddox/imdb_party}
38
- s.rdoc_options = ["--charset=UTF-8"]
39
37
  s.require_paths = ["lib"]
40
38
  s.rubygems_version = %q{1.3.7}
41
39
  s.summary = %q{IMDB client using the IMDB API that their iPhone app uses}
42
40
  s.test_files = [
43
41
  "test/movie_test.rb",
44
- "test/person_test.rb",
45
- "test/search_test.rb",
46
- "test/test_helper.rb"
42
+ "test/person_test.rb",
43
+ "test/search_test.rb",
44
+ "test/test_helper.rb"
47
45
  ]
48
46
 
49
47
  if s.respond_to? :specification_version then
@@ -62,3 +60,4 @@ Gem::Specification.new do |s|
62
60
  s.add_dependency(%q<httparty>, [">= 0"])
63
61
  end
64
62
  end
63
+
@@ -12,7 +12,7 @@ module ImdbParty
12
12
  movie_results = []
13
13
  results = self.class.get('/find', :query => {:q => title}).parsed_response
14
14
 
15
- if results["data"]["results"]
15
+ if results["data"] && results["data"]["results"]
16
16
  results["data"]["results"].each do |result_section|
17
17
  result_section["list"].each do |r|
18
18
  next unless r["tconst"] && r["title"]
data/test/movie_test.rb CHANGED
@@ -2,7 +2,7 @@ require 'test_helper'
2
2
 
3
3
  class MovieTest < Test::Unit::TestCase
4
4
  context "a movie" do
5
- setup do
5
+ setup do
6
6
  @imdb = ImdbParty::Imdb.new
7
7
  @movie = @imdb.find_movie_by_id("tt0382932")
8
8
  end
@@ -32,7 +32,7 @@ class MovieTest < Test::Unit::TestCase
32
32
  end
33
33
 
34
34
  should "have a poster_url" do
35
- assert_equal "http://ia.media-imdb.com/images/M/MV5BMzgwNzY0MDkwOF5BMl5BanBnXkFtZTcwNzMxMDI1MQ@@._V1_.jpg", @movie.poster_url
35
+ assert_match /http:\/\/ia.media-imdb.com\/images\/.*/, @movie.poster_url
36
36
  end
37
37
 
38
38
  should "have a release date" do
@@ -70,4 +70,4 @@ class MovieTest < Test::Unit::TestCase
70
70
  end
71
71
 
72
72
  end
73
- end
73
+ end
data/test/person_test.rb CHANGED
@@ -2,11 +2,11 @@ require 'test_helper'
2
2
 
3
3
  class PersonTest < Test::Unit::TestCase
4
4
  context "a person" do
5
- setup do
5
+ setup do
6
6
  @imdb = ImdbParty::Imdb.new
7
7
  @movie = @imdb.find_movie_by_id("tt0382932")
8
8
  end
9
-
9
+
10
10
  context "actors" do
11
11
  should "have a name" do
12
12
  assert_equal "Patton Oswalt", @movie.actors.first.name
@@ -22,7 +22,7 @@ class PersonTest < Test::Unit::TestCase
22
22
  assert_equal "Brad Bird", @movie.directors.first.name
23
23
  end
24
24
 
25
- should "have not have a role" do
25
+ should "not have a role" do
26
26
  assert_equal nil, @movie.directors.first.role
27
27
  end
28
28
  end
@@ -32,7 +32,7 @@ class PersonTest < Test::Unit::TestCase
32
32
  assert_equal "Brad Bird", @movie.writers.first.name
33
33
  end
34
34
 
35
- should "have not have a role" do
35
+ should "not have a role" do
36
36
  assert_equal nil, @movie.writers.first.role
37
37
  end
38
38
  end
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: 19
4
+ hash: 15
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 3
8
+ - 4
9
9
  - 0
10
- version: 0.3.0
10
+ version: 0.4.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-11-19 00:00:00 -05:00
18
+ date: 2011-01-04 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -57,7 +57,6 @@ extra_rdoc_files:
57
57
  - README.md
58
58
  files:
59
59
  - .document
60
- - .gitignore
61
60
  - LICENSE
62
61
  - README.md
63
62
  - Rakefile
@@ -77,8 +76,8 @@ homepage: http://github.com/maddox/imdb_party
77
76
  licenses: []
78
77
 
79
78
  post_install_message:
80
- rdoc_options:
81
- - --charset=UTF-8
79
+ rdoc_options: []
80
+
82
81
  require_paths:
83
82
  - lib
84
83
  required_ruby_version: !ruby/object:Gem::Requirement
data/.gitignore DELETED
@@ -1,5 +0,0 @@
1
- *.sw?
2
- .DS_Store
3
- coverage
4
- rdoc
5
- pkg