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.
@@ -1,3 +1,6 @@
1
+ ## 1.5.1
2
+ * `Plex::Video` now supports multiple media entries (`@media` renamed to `@medias`)
3
+
1
4
  ## 1.5.0
2
5
 
3
6
  * Fixed `first_*` and `last_*` helper methods to compare `index.to_i` instead
@@ -1,3 +1,3 @@
1
1
  module Plex
2
- VERSION = "1.5.0"
2
+ VERSION = "1.5.1"
3
3
  end
@@ -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 :media, :genres, :writers, :directors, :roles, :attribute_hash
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
- @media = Plex::Media.new(node.search('Media').first)
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
 
@@ -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.media.must_equal fake_video.media
26
+
27
+ @episode.medias.must_equal fake_video.medias
28
28
 
29
29
  @episode.genres.must_equal fake_video.genres
30
30
 
@@ -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.media.must_equal fake_video.media
19
+
20
+ @movie.medias.must_equal fake_video.medias
21
21
 
22
22
  @movie.genres.must_equal fake_video.genres
23
23
 
@@ -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("@media").must_equal Plex::Media.new(FAKE_VIDEO_NODE_HASH[:Media])
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
- date: 2012-01-24 00:00:00 -05:00
14
- default_executable:
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
- prerelease: false
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: "0"
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
- requirement: &id002 !ruby/object:Gem::Requirement
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: "0"
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
- requirement: &id003 !ruby/object:Gem::Requirement
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: "0"
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
- requirement: &id004 !ruby/object:Gem::Requirement
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: "0"
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
58
70
  type: :runtime
59
- version_requirements: *id004
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: "0"
123
- required_rubygems_version: !ruby/object:Gem::Requirement
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: "0"
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.6.2
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