ruby-ogginfo 0.6.5 → 0.6.6

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/.gemtest ADDED
File without changes
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 0.6.6 / 2011-12-23
2
+
3
+ * fixes for ruby 1.9 (thanks to gwolf)
4
+
1
5
  === 0.6.5 / 2011-04-07
2
6
 
3
7
  * internal reorganization, leading to more robust and faster library
data/Manifest.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  History.txt
2
2
  Manifest.txt
3
- README.rdoc
3
+ README.txt
4
4
  Rakefile
5
5
  lib/ogg/codecs/comments.rb
6
6
  lib/ogg/codecs/speex.rb
File without changes
data/Rakefile CHANGED
@@ -1,6 +1,5 @@
1
1
  # -*- ruby -*-
2
2
 
3
- require 'rubygems'
4
3
  require 'hoe'
5
4
 
6
5
  Hoe.plugin :yard
@@ -10,7 +9,9 @@ Hoe.plugin :rcov
10
9
  Hoe.spec('ruby-ogginfo') do
11
10
  developer('Guillaume Pierronnet','moumar@rubyforge.org')
12
11
  developer('Grant Gardner','grant@lastweekend.com.au')
13
- summary = 'ruby-ogginfo is a pure-ruby library that gives low level informations on ogg files'
12
+ #summary = 'ruby-ogginfo is a pure-ruby library that gives low level informations on ogg files'
13
+ remote_rdoc_dir = ''
14
+ rdoc_locations << "rubyforge.org:/var/www/gforge-projects/ruby-ogginfo/"
14
15
  end
15
16
 
16
17
  # vim: syntax=Ruby
data/lib/ogg.rb CHANGED
@@ -86,7 +86,7 @@ module Ogg
86
86
  input.rewind
87
87
  end
88
88
 
89
- codecs = Ogg::Codecs.constants.map { |module_name| Ogg::Codecs.class_eval(module_name) }.select { |c| c.is_a?(Class) }
89
+ codecs = Ogg::Codecs.constants.map { |module_name| Ogg::Codecs.class_eval(module_name.to_s) }.select { |c| c.is_a?(Class) }
90
90
  codec = codecs.detect { |c| c.match?(first_page.segments.first) }
91
91
  unless codec
92
92
  raise(StreamError,"unknown codec")
data/lib/ogginfo.rb CHANGED
@@ -26,7 +26,7 @@ end
26
26
  class OggInfoError < StandardError ; end
27
27
 
28
28
  class OggInfo
29
- VERSION = "0.6.5"
29
+ VERSION = "0.6.6"
30
30
  extend Forwardable
31
31
  include Ogg
32
32
 
@@ -146,7 +146,14 @@ class OggInfoTest < Test::Unit::TestCase
146
146
  end
147
147
 
148
148
  OggInfo.open(tf.path, "iso-8859-1") do |ogg|
149
- assert_equal "hello\xe9", ogg.tag["title"]
149
+ if RUBY_VERSION[0..2] == '1.8'
150
+ assert_equal "hello\xe9", ogg.tag["title"]
151
+ else
152
+ string = ''
153
+ string.force_encoding 'iso-8859-1'
154
+ [104, 101, 108, 108, 111, 233].each {|chr| string << chr}
155
+ assert_equal string, ogg.tag["title"]
156
+ end
150
157
  end
151
158
  end
152
159
 
@@ -91,12 +91,33 @@ class SpxInfoTest < Test::Unit::TestCase
91
91
  def test_charset
92
92
  generate_spx
93
93
  FileUtils.cp("test.spx",GEN_FILE)
94
- OggInfo.open(GEN_FILE, "utf-8") do |spx|
94
+ if RUBY_VERSION[0..2] == '1.8'
95
+ OggInfo.open(GEN_FILE, "utf-8") do |spx|
95
96
  assert_equal "hello\303\251",spx.tag["test"]
96
- end
97
+ end
98
+
99
+ OggInfo.open(GEN_FILE, "iso-8859-1") do |spx|
100
+ assert_equal "hello\xe9", spx.tag["test"]
101
+ end
102
+
103
+ else
104
+ # In Ruby >= 1.9, all strings are UTF-8, and are made up by
105
+ # characters (and not anymore bytes). So, we hand-craft it in a
106
+ # dumb-enough encoding.
107
+ OggInfo.open(GEN_FILE, "utf-8") do |spx|
108
+ string = ''
109
+ string.force_encoding 'ascii-8bit'
110
+ [104, 101, 108, 108, 111, 195, 169].each {|chr| string << chr}
111
+ assert_equal string, spx.tag["test"]
112
+ end
113
+
114
+ OggInfo.open(GEN_FILE, "iso-8859-1") do |spx|
115
+ string = ''
116
+ string.force_encoding 'iso-8859-1'
117
+ [104, 101, 108, 108, 111, 233].each {|chr| string << chr}
118
+ assert_equal string, spx.tag["test"]
119
+ end
97
120
 
98
- OggInfo.open(GEN_FILE, "iso-8859-1") do |spx|
99
- assert_equal "hello\xe9", spx.tag["test"]
100
121
  end
101
122
  end
102
123
 
metadata CHANGED
@@ -1,69 +1,58 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ruby-ogginfo
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 6
8
- - 5
9
- version: 0.6.5
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.6.6
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Guillaume Pierronnet
13
9
  - Grant Gardner
14
10
  autorequire:
15
11
  bindir: bin
16
12
  cert_chain: []
17
-
18
- date: 2011-04-07 00:00:00 +02:00
13
+ date: 2011-12-23 00:00:00.000000000 +01:00
19
14
  default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
22
- name: hoe-yard
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- segments:
29
- - 0
30
- - 1
31
- - 2
32
- version: 0.1.2
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: rdoc
18
+ requirement: &2156269120 !ruby/object:Gem::Requirement
19
+ none: false
20
+ requirements:
21
+ - - ~>
22
+ - !ruby/object:Gem::Version
23
+ version: '3.10'
33
24
  type: :development
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: hoe
37
25
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
39
- requirements:
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- segments:
43
- - 2
44
- - 8
45
- - 0
46
- version: 2.8.0
26
+ version_requirements: *2156269120
27
+ - !ruby/object:Gem::Dependency
28
+ name: hoe
29
+ requirement: &2156268300 !ruby/object:Gem::Requirement
30
+ none: false
31
+ requirements:
32
+ - - ~>
33
+ - !ruby/object:Gem::Version
34
+ version: '2.12'
47
35
  type: :development
48
- version_requirements: *id002
49
- description: |-
50
- ruby-ogginfo gives you access to low level information on ogg files
36
+ prerelease: false
37
+ version_requirements: *2156268300
38
+ description: ! 'ruby-ogginfo gives you access to low level information on ogg files
39
+
51
40
  (bitrate, length, samplerate, encoder, etc... ), as well as tag.
52
- It is written in pure ruby.
53
- email:
41
+
42
+ It is written in pure ruby.'
43
+ email:
54
44
  - moumar@rubyforge.org
55
45
  - grant@lastweekend.com.au
56
46
  executables: []
57
-
58
47
  extensions: []
59
-
60
- extra_rdoc_files:
48
+ extra_rdoc_files:
61
49
  - History.txt
62
50
  - Manifest.txt
63
- files:
51
+ - README.txt
52
+ files:
64
53
  - History.txt
65
54
  - Manifest.txt
66
- - README.rdoc
55
+ - README.txt
67
56
  - Rakefile
68
57
  - lib/ogg/codecs/comments.rb
69
58
  - lib/ogg/codecs/speex.rb
@@ -76,38 +65,35 @@ files:
76
65
  - setup.rb
77
66
  - test/test_ruby-ogginfo.rb
78
67
  - test/test_ruby-spxinfo.rb
79
- has_rdoc: yard
68
+ - .gemtest
69
+ has_rdoc: true
80
70
  homepage: http://ruby-ogginfo.rubyforge.org/
81
71
  licenses: []
82
-
83
72
  post_install_message:
84
- rdoc_options:
85
- - --title
86
- - RubyOgginfo Documentation
87
- - --quiet
88
- require_paths:
73
+ rdoc_options:
74
+ - --main
75
+ - README.txt
76
+ require_paths:
89
77
  - lib
90
- required_ruby_version: !ruby/object:Gem::Requirement
91
- requirements:
92
- - - ">="
93
- - !ruby/object:Gem::Version
94
- segments:
95
- - 0
96
- version: "0"
97
- required_rubygems_version: !ruby/object:Gem::Requirement
98
- requirements:
99
- - - ">="
100
- - !ruby/object:Gem::Version
101
- segments:
102
- - 0
103
- version: "0"
78
+ required_ruby_version: !ruby/object:Gem::Requirement
79
+ none: false
80
+ requirements:
81
+ - - ! '>='
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
84
+ required_rubygems_version: !ruby/object:Gem::Requirement
85
+ none: false
86
+ requirements:
87
+ - - ! '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
104
90
  requirements: []
105
-
106
91
  rubyforge_project: ruby-ogginfo
107
- rubygems_version: 1.3.6
92
+ rubygems_version: 1.6.2
108
93
  signing_key:
109
94
  specification_version: 3
110
- summary: ruby-ogginfo gives you access to low level information on ogg files (bitrate, length, samplerate, encoder, etc..
111
- test_files:
112
- - test/test_ruby-spxinfo.rb
95
+ summary: ruby-ogginfo gives you access to low level information on ogg files (bitrate,
96
+ length, samplerate, encoder, etc..
97
+ test_files:
113
98
  - test/test_ruby-ogginfo.rb
99
+ - test/test_ruby-spxinfo.rb