themoviedb 0.0.17 → 0.0.18
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/lib/themoviedb.rb +1 -1
- data/lib/themoviedb/job.rb +26 -0
- data/lib/themoviedb/version.rb +1 -1
- data/spec/people_spec.rb +27 -0
- data/themoviedb.gemspec +2 -0
- metadata +15 -13
- checksums.yaml +0 -7
data/lib/themoviedb.rb
CHANGED
@@ -5,7 +5,7 @@ require 'httparty'
|
|
5
5
|
require File.join(File.dirname(__FILE__), "themoviedb", inc)
|
6
6
|
end
|
7
7
|
|
8
|
-
["movie", "tv", "season", "episode", "collection", "people", "company", "genre", "find"].each do |inc|
|
8
|
+
["movie", "tv", "season", "episode", "collection", "people", "company", "genre", "find", "job"].each do |inc|
|
9
9
|
require File.join(File.dirname(__FILE__), "themoviedb", inc)
|
10
10
|
end
|
11
11
|
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Tmdb
|
2
|
+
class Job
|
3
|
+
def initialize(attributes={})
|
4
|
+
attributes.each do |key, value|
|
5
|
+
if self.respond_to?(key.to_sym)
|
6
|
+
self.instance_variable_set("@#{key}", value)
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
# http://docs.themoviedb.apiary.io/#jobs
|
12
|
+
@@fields = [
|
13
|
+
:name,
|
14
|
+
:department
|
15
|
+
]
|
16
|
+
|
17
|
+
@@fields.each do |field|
|
18
|
+
attr_accessor field
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.list
|
22
|
+
search = Tmdb::Search.new("/job/list")
|
23
|
+
search.fetch_response
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
data/lib/themoviedb/version.rb
CHANGED
data/spec/people_spec.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
#encoding: utf-8
|
2
|
+
require 'rspec'
|
3
|
+
require 'spec_helper'
|
4
|
+
require 'vcr'
|
5
|
+
|
6
|
+
describe Tmdb::People do
|
7
|
+
|
8
|
+
@fields = [:id,:name,:place_of_birth,:also_known_as,
|
9
|
+
:adult,:biography,:birthday,:deathday,:homepage,
|
10
|
+
:profile_path]
|
11
|
+
|
12
|
+
@fields.each do |field|
|
13
|
+
it { should respond_to field }
|
14
|
+
end
|
15
|
+
|
16
|
+
describe "For people" do
|
17
|
+
before(:each) do
|
18
|
+
@people = Tmdb::People
|
19
|
+
end
|
20
|
+
|
21
|
+
it "should return the popular people" do
|
22
|
+
VCR.use_cassette 'people/popular' do
|
23
|
+
@people.popular.should be_true
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/themoviedb.gemspec
CHANGED
@@ -19,6 +19,7 @@ Gem::Specification.new do |s|
|
|
19
19
|
"lib/themoviedb/company.rb",
|
20
20
|
"lib/themoviedb/configuration.rb",
|
21
21
|
"lib/themoviedb/genre.rb",
|
22
|
+
"lib/themoviedb/job.rb",
|
22
23
|
"lib/themoviedb/movie.rb",
|
23
24
|
"lib/themoviedb/people.rb",
|
24
25
|
"lib/themoviedb/resource.rb",
|
@@ -33,6 +34,7 @@ Gem::Specification.new do |s|
|
|
33
34
|
"spec/movie_spec.rb",
|
34
35
|
"spec/tv_spec.rb",
|
35
36
|
"spec/company_spec.rb",
|
37
|
+
"spec/people_spec.rb",
|
36
38
|
"spec/find_spec.rb"
|
37
39
|
]
|
38
40
|
s.require_paths = ["lib"]
|
metadata
CHANGED
@@ -1,29 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: themoviedb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.18
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Ahmet Abdi
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
12
|
+
date: 2014-01-14 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: httparty
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirement: &13226780 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
19
|
- - ~>
|
18
20
|
- !ruby/object:Gem::Version
|
19
21
|
version: '0'
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
|
-
version_requirements:
|
23
|
-
requirements:
|
24
|
-
- - ~>
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
24
|
+
version_requirements: *13226780
|
27
25
|
description: Provides a simple, easy to use interface for the Movie Database API.
|
28
26
|
email:
|
29
27
|
- ahmetabdi@gmail.com
|
@@ -38,6 +36,7 @@ files:
|
|
38
36
|
- lib/themoviedb/company.rb
|
39
37
|
- lib/themoviedb/configuration.rb
|
40
38
|
- lib/themoviedb/genre.rb
|
39
|
+
- lib/themoviedb/job.rb
|
41
40
|
- lib/themoviedb/movie.rb
|
42
41
|
- lib/themoviedb/people.rb
|
43
42
|
- lib/themoviedb/resource.rb
|
@@ -50,32 +49,35 @@ files:
|
|
50
49
|
- spec/movie_spec.rb
|
51
50
|
- spec/tv_spec.rb
|
52
51
|
- spec/company_spec.rb
|
52
|
+
- spec/people_spec.rb
|
53
53
|
- spec/find_spec.rb
|
54
54
|
homepage: http://rubygems.org/gems/themoviedb
|
55
55
|
licenses: []
|
56
|
-
metadata: {}
|
57
56
|
post_install_message:
|
58
57
|
rdoc_options: []
|
59
58
|
require_paths:
|
60
59
|
- lib
|
61
60
|
required_ruby_version: !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
62
62
|
requirements:
|
63
|
-
- - '>='
|
63
|
+
- - ! '>='
|
64
64
|
- !ruby/object:Gem::Version
|
65
65
|
version: '0'
|
66
66
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
67
68
|
requirements:
|
68
|
-
- - '>='
|
69
|
+
- - ! '>='
|
69
70
|
- !ruby/object:Gem::Version
|
70
71
|
version: '0'
|
71
72
|
requirements: []
|
72
73
|
rubyforge_project: themoviedb
|
73
|
-
rubygems_version:
|
74
|
+
rubygems_version: 1.8.11
|
74
75
|
signing_key:
|
75
|
-
specification_version:
|
76
|
+
specification_version: 3
|
76
77
|
summary: A Ruby wrapper for the The Movie Database API.
|
77
78
|
test_files:
|
78
79
|
- spec/movie_spec.rb
|
79
80
|
- spec/tv_spec.rb
|
80
81
|
- spec/company_spec.rb
|
82
|
+
- spec/people_spec.rb
|
81
83
|
- spec/find_spec.rb
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 2fc68f4dcbb4318c38be22690199437240f07e6b
|
4
|
-
data.tar.gz: 5349c445c2d6d7b6204f419eb10fa57040db0a54
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 46713f15b4c4e45aa942a75ef196c8f3d5fd7e5271cd0d36b892f6c34d1a2823e8c2b6c956e2f136d1eae55089523302413cac8f5d311a8fd75f79679cb1e37b
|
7
|
-
data.tar.gz: 08ebc4f39a05e7e9742257d60a11e9bede0c1138ad9158317d284e9832b1c43fc279facde5a7c0f2a3c4e6afd0593389cd817ba0508e42fdba435dbcc50cddbb
|