playlist 1.0.0 → 1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bc3a6497a40653031438f4692659e4f1136e2a29
4
- data.tar.gz: 88e19ff093d5b1eba7569f011f02e2707751daae
3
+ metadata.gz: 30be0088143707327ec29c8888bd04f94ee2ff22
4
+ data.tar.gz: 1c462de277427d226a81ce130c060910ac74c525
5
5
  SHA512:
6
- metadata.gz: 7d7baa63b8aed79765ffac6280baa708eb65b5afccc30b40590b7f6383d91bddd1a5d0a9d80c57916c9f05ffc856d5203557cce99953b525e65a025ed2df6593
7
- data.tar.gz: 09dfeed3a840b1c3aa8a1e8fb98dd85a3ec1a6175755f18c6dc3e4c2a9a29dcbc1e39d0bdcf58593b3e85d9f8f295dd44e16852b1c15f81632e5ff818ebb6e00
6
+ metadata.gz: 53b751fa9ad238e6acb13c0287e84ec4387a86d406d3a6ade773eb2bad5d1571b656328ac336a6cd5f24932ed4e609be4dd283cac437b57200293d290ebd54cc
7
+ data.tar.gz: 21563296d9604407988d425bc9002b830bee0be57c118982ffa32408fefc0e04e87de29d506be7a7e85b560cdefc4cdc66143a6969173bbc74b036ced80c841a
data/README.md CHANGED
@@ -39,7 +39,7 @@ Playlists can be constructed by passing a list of attributes to the constructor
39
39
 
40
40
  ```ruby
41
41
  playlist = Playlist.new(:title => "My awesome playlist")
42
- playlist.annotation = "Each week I add best tracks I can think of."
42
+ playlist.description = "Each week I add best tracks I can think of."
43
43
  playlist.add_track(
44
44
  :performer => "Jon Hopkins",
45
45
  :title => "Everything Connected"
@@ -10,9 +10,9 @@ class Playlist
10
10
  # @return [String]
11
11
  attr_accessor :creator
12
12
 
13
- # A description/synopsis of the playlist
13
+ # A description/annotation/synopsis of the playlist
14
14
  # @return [String]
15
- attr_accessor :annotation
15
+ attr_accessor :description
16
16
 
17
17
  # A URI (or filename) to the location of the media
18
18
  # Use this if the playlist is a single file
@@ -14,6 +14,9 @@ module Playlist::Format::XSPF
14
14
  Playlist.new do |playlist|
15
15
  doc = Nokogiri::XML(input)
16
16
  playlist.title = doc.content_at('/xmlns:playlist/xmlns:title')
17
+ playlist.description = doc.content_at(
18
+ '/xmlns:playlist/xmlns:annotation'
19
+ )
17
20
  doc.xpath('/xmlns:playlist/xmlns:trackList/xmlns:track').each do |track|
18
21
  playlist.tracks << parse_track(track)
19
22
  end
@@ -27,6 +30,7 @@ module Playlist::Format::XSPF
27
30
  builder = Nokogiri::XML::Builder.new do |xml|
28
31
  xml.playlist(:version => 1, :xmlns => 'http://xspf.org/ns/0/') do
29
32
  xml.title(playlist.title) unless playlist.title.nil?
33
+ xml.annotation(playlist.description) unless playlist.description.nil?
30
34
  xml.trackList do
31
35
  playlist.tracks.each { |track| generate_track(xml, track) }
32
36
  end
@@ -1,4 +1,4 @@
1
1
  class Playlist
2
2
  # The version number of the Playlist Ruby gem
3
- VERSION = '1.0.0'
3
+ VERSION = '1.1.0'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playlist
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicholas Humfrey