woody 0.3.2 → 0.3.3

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.
@@ -32,6 +32,7 @@ module Woody
32
32
  end
33
33
  end
34
34
 
35
+ episodes.sort!
35
36
 
36
37
  # Check for files in meta but not found
37
38
  unless meta.empty?
data/lib/woody/episode.rb CHANGED
@@ -61,7 +61,7 @@ module Woody
61
61
 
62
62
  # @return [Integer] the size of the episodes media file in bytes
63
63
  def size
64
- File.size "content/#{filename}"
64
+ File.size File.join("content", filename)
65
65
  end
66
66
 
67
67
  # @return [String] 'yes' if explicit content, otherwise n'o'
@@ -73,7 +73,7 @@ module Woody
73
73
  def duration
74
74
  return @duration unless @duration.nil?
75
75
  length = 0
76
- Mp3Info.open("content/#{@filename}") do |mp3|
76
+ Mp3Info.open(File.join("content", filename)) do |mp3|
77
77
  length = mp3.length
78
78
  end
79
79
  @duration = Time.at(length).gmtime.strftime('%R:%S') # Should work up to 24 hours
@@ -82,5 +82,9 @@ module Woody
82
82
  end
83
83
  end
84
84
 
85
+ def <=> (other)
86
+ other.date <=> self.date
87
+ end
88
+
85
89
  end
86
90
  end
data/lib/woody/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Woody
2
2
  # Specifies Woody gem version
3
- VERSION = "0.3.2"
3
+ VERSION = "0.3.3"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: woody
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: