imdb 0.3.0 → 0.4.0

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.
Files changed (5) hide show
  1. data/History.txt +7 -1
  2. data/README.rdoc +24 -1
  3. data/lib/imdb.rb +1 -1
  4. data/lib/imdb/cli.rb +8 -4
  5. metadata +3 -3
@@ -1,4 +1,10 @@
1
- == 0.3.0
1
+ == 0.4.0 2009-06-14
2
+
3
+ * Updates to the console 'imdb' utility
4
+ * Show the IMDB ID
5
+ * Show the full IMDB URL
6
+
7
+ == 0.3.0 2009-06-07
2
8
 
3
9
  * Fixed typo in CLI field name 'Cast by'
4
10
  * Fixed retrieval of multiple directors. (#1)
@@ -1,5 +1,7 @@
1
1
  = imdb
2
2
 
3
+ The code, issue tracker and wiki can be found at:
4
+
3
5
  * http://github.com/ariejan/imdb
4
6
 
5
7
  == DESCRIPTION:
@@ -8,10 +10,16 @@ This packages allows you to easy access publicly available data from IMDB.
8
10
 
9
11
  == FEATURES/PROBLEMS:
10
12
 
11
- * Searching is not yet supported.
13
+ IMDB currently features the following:
14
+
15
+ * Querying details movie info
16
+ * Searching for movies
17
+ * Command-line utility included.
12
18
 
13
19
  == SYNOPSIS:
14
20
 
21
+ Movies:
22
+
15
23
  i = Imdb::Movie.new("0095016")
16
24
 
17
25
  i.title
@@ -19,6 +27,21 @@ This packages allows you to easy access publicly available data from IMDB.
19
27
  i.cast_member.first
20
28
  #=> "Bruce Willis"
21
29
 
30
+ Searching:
31
+
32
+ i = Imdb::Search.new("Star Trek")
33
+
34
+ i.movies.size
35
+ #=> 97
36
+
37
+ Using the command line utility is quite easy:
38
+
39
+ $ imdb Star Trek
40
+
41
+ or to get movie info
42
+
43
+ $ imdb 0095016
44
+
22
45
  == REQUIREMENTS:
23
46
 
24
47
  All required gems are installed automagically through RubyGems.
@@ -10,5 +10,5 @@ require 'imdb/search'
10
10
  require 'imdb/string_extensions'
11
11
 
12
12
  module Imdb
13
- VERSION = '0.3.0'
13
+ VERSION = '0.4.0'
14
14
  end
@@ -75,16 +75,20 @@ module Imdb
75
75
  end
76
76
 
77
77
  def self.display_movie_details(movie)
78
+ title = "#{movie.title} (#{movie.year})"
79
+ id = "ID #{movie.id}"
80
+
78
81
  @stdout.puts
79
- @stdout.puts "#{movie.title} (#{movie.year})"
80
- @stdout.puts "=" * 72
82
+ @stdout.puts "#{title}#{" " * (75 - 1 - title.length - id.length)}#{id} "
83
+ @stdout.puts "=" * 75
81
84
  @stdout.puts "Rating: #{movie.rating}"
82
85
  @stdout.puts "Duration: #{movie.length} minutes"
83
86
  @stdout.puts "Directed by: #{movie.director.join(", ")}"
84
87
  @stdout.puts "Cast: #{movie.cast_members[0..4].join(", ")}"
85
88
  @stdout.puts "Genre: #{movie.genres.join(", ")}"
86
- @stdout.puts "#{movie.plot}"
87
- @stdout.puts "=" * 72
89
+ @stdout.puts "Plot: #{movie.plot}"
90
+ @stdout.puts "IMDB URL: #{movie.url}"
91
+ @stdout.puts "=" * 75
88
92
  @stdout.puts
89
93
  end
90
94
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ariejan de Vroom
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-04 00:00:00 +02:00
12
+ date: 2009-06-14 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -84,7 +84,7 @@ files:
84
84
  - spec/spec_helper.rb
85
85
  - tasks/rspec.rake
86
86
  has_rdoc: true
87
- homepage: http://github.com/ariejan/imdb
87
+ homepage: "The code, issue tracker and wiki can be found at:"
88
88
  post_install_message:
89
89
  rdoc_options:
90
90
  - --main