ruby-imdb 0.0.3 → 0.1.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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.1.0
@@ -0,0 +1,5 @@
1
+ Feature: Get movie information
2
+ Scenario: Get movie information and cast list from IMDB
3
+ Given I have movie name called "Fear and Loathing In Las Vegas"
4
+ When I get first entry from result set
5
+ Then "Johnny Depp" should be act as "Raoul Duke"
@@ -1,6 +1,5 @@
1
1
  Feature: Search IMDB
2
2
 
3
3
  Scenario: Search a movie in imdb
4
- Given I have keyword "asdopfajpoejf" for the search
5
- #When I doing search
4
+ Given I have keyword "District 9" for the search
6
5
  Then the result should be equal or greater than 1
@@ -0,0 +1,26 @@
1
+ begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end
2
+ require 'cucumber/formatter/unicode'
3
+ $:.unshift(File.dirname(__FILE__) + '/../../lib')
4
+ require 'imdb'
5
+
6
+ Before do
7
+ end
8
+
9
+ After do
10
+ end
11
+
12
+ Given /I have movie name called "(.*)"/ do |n|
13
+ @result = IMDB::Search.movie(n.to_s)
14
+ end
15
+
16
+ When /I get first entry from result set/ do
17
+ @movie = IMDB::Movie.new(@result[0].id)
18
+ end
19
+
20
+ Then /^"(.*?)" should be act as "(.*?)"$/ do |person, act_as|
21
+ @movie.cast.each do |c|
22
+ if c.name == person and c.char == act_as
23
+ c.name.should == person and c.char.should == act_as
24
+ end
25
+ end
26
+ end
@@ -14,5 +14,5 @@ Given /I have keyword "(.*)" for the search/ do |n|
14
14
  end
15
15
 
16
16
  Then /the result should be equal or greater than (\d+)/ do |result|
17
- @result.should >= result.to_i
17
+ @result.length.should >= result.to_i
18
18
  end
data/lib/imdb.rb CHANGED
@@ -1,9 +1,8 @@
1
- require "bundler"
2
- Bundler.require(:default)
3
-
4
1
  require "cgi"
5
2
  require "open-uri"
6
3
 
4
+ require "nokogiri"
5
+
7
6
  require "imdb/search"
8
7
  require "imdb/movie"
9
8
  require "imdb/person"
data/ruby-imdb.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ruby-imdb}
8
- s.version = "0.0.3"
8
+ s.version = "0.1.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Yalcin Acikyildiz"]
12
- s.date = %q{2010-04-26}
12
+ s.date = %q{2010-04-27}
13
13
  s.description = %q{Ruby IMDB Parsing Library}
14
14
  s.email = %q{yalcin@webliyacelebi.com}
15
15
  s.extra_rdoc_files = [
@@ -18,13 +18,14 @@ Gem::Specification.new do |s|
18
18
  ]
19
19
  s.files = [
20
20
  ".gitignore",
21
- "Gemfile",
22
21
  "LICENSE",
23
22
  "README",
24
23
  "Rakefile",
25
24
  "VERSION",
25
+ "features/movie.feature",
26
26
  "features/search.feature",
27
- "features/step_definitions/imdb_test.rb",
27
+ "features/step_definitions/movie_steps.rb",
28
+ "features/step_definitions/search_steps.rb",
28
29
  "lib/imdb.rb",
29
30
  "lib/imdb/movie.rb",
30
31
  "lib/imdb/person.rb",
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
+ - 1
7
8
  - 0
8
- - 3
9
- version: 0.0.3
9
+ version: 0.1.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Yalcin Acikyildiz
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-04-26 00:00:00 +03:00
17
+ date: 2010-04-27 00:00:00 +03:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -52,13 +52,14 @@ extra_rdoc_files:
52
52
  - README
53
53
  files:
54
54
  - .gitignore
55
- - Gemfile
56
55
  - LICENSE
57
56
  - README
58
57
  - Rakefile
59
58
  - VERSION
59
+ - features/movie.feature
60
60
  - features/search.feature
61
- - features/step_definitions/imdb_test.rb
61
+ - features/step_definitions/movie_steps.rb
62
+ - features/step_definitions/search_steps.rb
62
63
  - lib/imdb.rb
63
64
  - lib/imdb/movie.rb
64
65
  - lib/imdb/person.rb
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source :gemcutter
2
- gem "nokogiri"
3
- gem "cucumber", :group => "test"
4
-