plex-ruby 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +3 -0
- data/lib/plex-ruby/version.rb +1 -1
- data/lib/plex-ruby/video.rb +7 -7
- data/test/test_episode.rb +2 -2
- data/test/test_movie.rb +2 -2
- data/test/test_video.rb +2 -2
- metadata +79 -62
data/CHANGELOG.md
CHANGED
data/lib/plex-ruby/version.rb
CHANGED
data/lib/plex-ruby/video.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
module Plex
|
2
2
|
class Video
|
3
3
|
|
4
|
-
ATTRIBUTES = %w(ratingKey key studio type title titleSort contentRating summary
|
5
|
-
rating viewCount year tagline thumb art duration
|
4
|
+
ATTRIBUTES = %w(ratingKey key studio type title titleSort contentRating summary
|
5
|
+
rating viewCount year tagline thumb art duration
|
6
6
|
originallyAvailableAt updatedAt)
|
7
|
-
|
8
|
-
attr_reader :
|
7
|
+
|
8
|
+
attr_reader :medias, :genres, :writers, :directors, :roles, :attribute_hash
|
9
9
|
|
10
10
|
# @param [Nokogiri::XML::Element] nokogiri element that represents this
|
11
11
|
# Video
|
@@ -18,11 +18,11 @@ module Plex
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
@
|
21
|
+
@medias = node.search('Media').map { |m| Plex::Media.new(m) }
|
22
22
|
@genres = node.search('Genre').map { |m| Plex::Genre.new(m) }
|
23
23
|
@writers = node.search('Writer').map { |m| Plex::Writer.new(m) }
|
24
|
-
@directors = node.search('Director').map { |m| Plex::Director.new(m) }
|
25
|
-
@roles = node.search('Role').map { |m| Plex::Role.new(m) }
|
24
|
+
@directors = node.search('Director').map { |m| Plex::Director.new(m) }
|
25
|
+
@roles = node.search('Role').map { |m| Plex::Role.new(m) }
|
26
26
|
end
|
27
27
|
|
28
28
|
|
data/test/test_episode.rb
CHANGED
@@ -23,8 +23,8 @@ describe Plex::Episode do
|
|
23
23
|
(Plex::Video::ATTRIBUTES - %w(key)).map {|m| Plex.underscore(m) }.each { |method|
|
24
24
|
@episode.send(method.to_sym).must_equal fake_video.send(method.to_sym)
|
25
25
|
}
|
26
|
-
|
27
|
-
@episode.
|
26
|
+
|
27
|
+
@episode.medias.must_equal fake_video.medias
|
28
28
|
|
29
29
|
@episode.genres.must_equal fake_video.genres
|
30
30
|
|
data/test/test_movie.rb
CHANGED
@@ -16,8 +16,8 @@ describe Plex::Movie do
|
|
16
16
|
(Plex::Video::ATTRIBUTES - %w(key)).map {|m| Plex.underscore(m) }.each { |method|
|
17
17
|
@movie.send(method.to_sym).must_equal fake_video.send(method.to_sym)
|
18
18
|
}
|
19
|
-
|
20
|
-
@movie.
|
19
|
+
|
20
|
+
@movie.medias.must_equal fake_video.medias
|
21
21
|
|
22
22
|
@movie.genres.must_equal fake_video.genres
|
23
23
|
|
data/test/test_video.rb
CHANGED
@@ -11,9 +11,9 @@ describe Plex::Video do
|
|
11
11
|
@video.send(method.to_sym).must_equal FAKE_VIDEO_NODE_HASH[method.to_sym]
|
12
12
|
end
|
13
13
|
}
|
14
|
-
|
14
|
+
|
15
15
|
it "should correctly referance its media object" do
|
16
|
-
@video.instance_variable_get("@
|
16
|
+
@video.instance_variable_get("@medias").must_equal Array( Plex::Media.new(FAKE_VIDEO_NODE_HASH[:Media]) )
|
17
17
|
end
|
18
18
|
|
19
19
|
it "should correctly referance its genre objects" do
|
metadata
CHANGED
@@ -1,72 +1,87 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: plex-ruby
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.5.1
|
4
5
|
prerelease:
|
5
|
-
version: 1.5.0
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Eric Koslow
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2013-12-16 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
17
15
|
name: minitest
|
18
|
-
|
19
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
20
17
|
none: false
|
21
|
-
requirements:
|
22
|
-
- -
|
23
|
-
- !ruby/object:Gem::Version
|
24
|
-
version:
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
25
22
|
type: :development
|
26
|
-
version_requirements: *id001
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rake
|
29
23
|
prerelease: false
|
30
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: rake
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
31
33
|
none: false
|
32
|
-
requirements:
|
33
|
-
- -
|
34
|
-
- !ruby/object:Gem::Version
|
35
|
-
version:
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
36
38
|
type: :development
|
37
|
-
version_requirements: *id002
|
38
|
-
- !ruby/object:Gem::Dependency
|
39
|
-
name: fakeweb
|
40
39
|
prerelease: false
|
41
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: fakeweb
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
42
49
|
none: false
|
43
|
-
requirements:
|
44
|
-
- -
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version:
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
47
54
|
type: :development
|
48
|
-
version_requirements: *id003
|
49
|
-
- !ruby/object:Gem::Dependency
|
50
|
-
name: nokogiri
|
51
55
|
prerelease: false
|
52
|
-
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: nokogiri
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
53
65
|
none: false
|
54
|
-
requirements:
|
55
|
-
- -
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
version:
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
58
70
|
type: :runtime
|
59
|
-
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
60
78
|
description: Extracts the Plex Media Server API into easy to write ruby code
|
61
|
-
email:
|
79
|
+
email:
|
62
80
|
- ekoslow@gmail.com
|
63
81
|
executables: []
|
64
|
-
|
65
82
|
extensions: []
|
66
|
-
|
67
83
|
extra_rdoc_files: []
|
68
|
-
|
69
|
-
files:
|
84
|
+
files:
|
70
85
|
- .gitignore
|
71
86
|
- .travis.yml
|
72
87
|
- CHANGELOG.md
|
@@ -105,35 +120,37 @@ files:
|
|
105
120
|
- test/test_show.rb
|
106
121
|
- test/test_stream.rb
|
107
122
|
- test/test_video.rb
|
108
|
-
has_rdoc: true
|
109
123
|
homepage: https://github.com/ekosz/Plex-Ruby
|
110
124
|
licenses: []
|
111
|
-
|
112
125
|
post_install_message:
|
113
126
|
rdoc_options: []
|
114
|
-
|
115
|
-
require_paths:
|
127
|
+
require_paths:
|
116
128
|
- lib
|
117
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
129
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
118
130
|
none: false
|
119
|
-
requirements:
|
120
|
-
- -
|
121
|
-
- !ruby/object:Gem::Version
|
122
|
-
version:
|
123
|
-
|
131
|
+
requirements:
|
132
|
+
- - ! '>='
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: '0'
|
135
|
+
segments:
|
136
|
+
- 0
|
137
|
+
hash: 1533681294103733520
|
138
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
124
139
|
none: false
|
125
|
-
requirements:
|
126
|
-
- -
|
127
|
-
- !ruby/object:Gem::Version
|
128
|
-
version:
|
140
|
+
requirements:
|
141
|
+
- - ! '>='
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '0'
|
144
|
+
segments:
|
145
|
+
- 0
|
146
|
+
hash: 1533681294103733520
|
129
147
|
requirements: []
|
130
|
-
|
131
148
|
rubyforge_project: plex-ruby
|
132
|
-
rubygems_version: 1.
|
149
|
+
rubygems_version: 1.8.23
|
133
150
|
signing_key:
|
134
151
|
specification_version: 3
|
135
152
|
summary: Plex Media Server APIs in easy ruby code
|
136
|
-
test_files:
|
153
|
+
test_files:
|
137
154
|
- test/test_client.rb
|
138
155
|
- test/test_episode.rb
|
139
156
|
- test/test_helper.rb
|