ruby-audioinfo 0.1 → 0.1.1

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/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ === 0.1.1 / 2008-04-17
2
+
3
+ * updated gem dependency on MP4Info >= 0.3.2, which fixes utf-8 handling
4
+ * added lib/shell_escape.rb that lacks from previous version
5
+
1
6
  === 0.1 / 2008-03-28
2
7
 
3
8
  * first release
data/Manifest.txt CHANGED
@@ -6,4 +6,5 @@ lib/audioinfo.rb
6
6
  lib/audioinfo/album.rb
7
7
  lib/audioinfo/apetag.rb
8
8
  lib/audioinfo/mpcinfo.rb
9
+ lib/shell_escape.rb
9
10
  test/mpcinfo.rb
data/README.txt CHANGED
@@ -29,11 +29,11 @@ wma, flac, aac, mp4, m4a.
29
29
 
30
30
  == REQUIREMENTS:
31
31
 
32
- * ruby-mp3info
33
- * ruby-ogginfo
34
- * MP4Info
35
- * flacinfo-rb
36
- * wmainfo-rb
32
+ * ruby-mp3info[http://ruby-mp3info.rubyforge.org/]
33
+ * ruby-ogginfo[http://ruby-ogginfo.rubyforge.org/]
34
+ * MP4Info[http://mp4info.rubyforge.org/]
35
+ * flacinfo-rb[http://rubyforge.org/projects/flacinfo-rb/]
36
+ * wmainfo-rb[http://rubyforge.org/projects/wmainfo/]
37
37
 
38
38
  == INSTALL:
39
39
 
data/Rakefile CHANGED
@@ -9,7 +9,7 @@ Hoe.new('ruby-audioinfo', AudioInfo::VERSION) do |p|
9
9
  p.email = 'moumar@rubyforge.org'
10
10
  p.extra_deps << [ "ruby-mp3info", ">= 0.6.3"]
11
11
  p.extra_deps << [ "ruby-ogginfo", ">= 0.3.1" ]
12
- p.extra_deps << [ "MP4Info", ">= 0.3.1" ]
12
+ p.extra_deps << [ "MP4Info", ">= 0.3.2" ]
13
13
  p.extra_deps << [ "wmainfo-rb", ">= 0.5" ]
14
14
  p.extra_deps << "flacinfo-rb"
15
15
  p.description = p.paragraphs_of('README.txt', 3).first
data/lib/audioinfo.rb CHANGED
@@ -3,7 +3,6 @@
3
3
  require "iconv"
4
4
  require "stringio"
5
5
 
6
- require "shell_escape"
7
6
  $: << File.dirname(__FILE__)+"/audioinfo"
8
7
 
9
8
  require "mp3info"
@@ -13,6 +12,7 @@ require "apetag"
13
12
  require "wmainfo"
14
13
  require "mp4info"
15
14
  require "flacinfo"
15
+ require "shell_escape"
16
16
 
17
17
  class AudioInfoError < Exception ; end
18
18
 
@@ -30,7 +30,7 @@ class AudioInfo
30
30
 
31
31
  SUPPORTED_EXTENSIONS = %w{mp3 ogg mpc wma mp4 aac m4a flac}
32
32
 
33
- VERSION = "0.1"
33
+ VERSION = "0.1.1"
34
34
 
35
35
  attr_reader :path, :extension, :musicbrainz_infos, :tracknum, :bitrate, :vbr
36
36
  attr_reader :artist, :album, :title, :length, :date
@@ -296,7 +296,9 @@ class AudioInfo
296
296
  tags = {}
297
297
  Iconv.open(@encoding, from_encoding) do |ic|
298
298
  tags_orig.inject(tags) do |hash, (k, v)|
299
- hash[ic.iconv(k)] = ic.iconv(v)
299
+ if v.is_a?(String)
300
+ hash[ic.iconv(k)] = ic.iconv(v)
301
+ end
300
302
  hash
301
303
  end
302
304
  end
@@ -0,0 +1,6 @@
1
+ class String
2
+ # escape special characters used in most unix shells to use it, for example, with system()
3
+ def shell_escape
4
+ "'" + gsub(/'/) { "'\\''" } + "'"
5
+ end
6
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-audioinfo
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.1"
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guillaume Pierronnet
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-03-28 00:00:00 +01:00
12
+ date: 2008-04-17 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -37,7 +37,7 @@ dependencies:
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 0.3.1
40
+ version: 0.3.2
41
41
  version:
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: wmainfo-rb
@@ -85,6 +85,7 @@ files:
85
85
  - lib/audioinfo/album.rb
86
86
  - lib/audioinfo/apetag.rb
87
87
  - lib/audioinfo/mpcinfo.rb
88
+ - lib/shell_escape.rb
88
89
  - test/mpcinfo.rb
89
90
  has_rdoc: true
90
91
  homepage: http://ruby-audioinfo.rubyforge.org