tmdb_trailer 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.7
1
+ 0.2.8
data/lib/tmdb_trailer.rb CHANGED
@@ -13,7 +13,7 @@ module TMDB
13
13
  # country - country code i.e "us" for united states, "hk" for hongkong
14
14
  # db_name - database name to store mongo documents, will create one for you if it doesnt exists
15
15
  def initialize(country,db_name)
16
- @base_uri = "http://api.themoviedb.org/2.1/Movie.browse/en-US/json/"
16
+ @base_uri = "http://api.themoviedb.org/2.1/Movie.browse/en/json/"
17
17
  @country = country
18
18
 
19
19
  #initialize the mongoDB connection
@@ -61,7 +61,7 @@ module TMDB
61
61
 
62
62
  # get the result of parsed json response of Movie.browse API call of TMDB
63
63
  def get_movies(page)
64
- votes = @country == "us" ? 3 : 1
64
+ votes = @country == "us" ? 3 : 0
65
65
  @params = "countries=#{@country}&order_by=rating&" +
66
66
  "min_votes=#{votes}&order=desc&page=#{page}&per_page=50"
67
67
  url = "#{@base_uri}#{API_KEY}?#{@params}"
data/spec/test.pstore CHANGED
@@ -1 +1,2 @@
1
- {"nzi"czi"bri
1
+ {
2
+ "nzi"czi"bri"roi"usi
@@ -132,5 +132,13 @@ describe TMDB::Trailer do
132
132
  progress = @trailer.report
133
133
  progress.should match(/60 out of 60/)
134
134
  end
135
+
136
+ it "should fully populate database for a country" do
137
+ WebMock.allow_net_connect!
138
+ @trailer = TMDB::Trailer.new("ro","test")
139
+ @trailer.coll.remove()
140
+ @trailer.populate
141
+ @trailer.coll.count.should >= 28
142
+ end
135
143
  end
136
144
  end
data/tmdb_trailer.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{tmdb_trailer}
8
- s.version = "0.2.7"
8
+ s.version = "0.2.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["redgetan"]
12
- s.date = %q{2011-02-15}
12
+ s.date = %q{2011-02-21}
13
13
  s.description = %q{ Movie Trailer information will be stored in mongoDB. Information includes year released, movie genres, keywords, and country}
14
14
  s.email = %q{redge.tan@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tmdb_trailer
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 7
10
- version: 0.2.7
9
+ - 8
10
+ version: 0.2.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - redgetan
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-15 00:00:00 -05:00
18
+ date: 2011-02-21 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency