waveform 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -87,6 +87,10 @@ Sample sound file used in tests is in the Public Domain from soundbible.com: <ht
87
87
  Changes
88
88
  =======
89
89
 
90
+ 0.1.2
91
+ -----
92
+ * Added more helpful deprecation notice for non-WAV audio files
93
+
90
94
  0.1.1
91
95
  -----
92
96
  * Fixed RMS calculation (was calculating RMSD instead of RMS before) -- thanks, cviedmai
@@ -129,7 +129,7 @@ class Waveform
129
129
  frames
130
130
  rescue RubyAudio::Error => e
131
131
  raise e unless e.message == "File contains data in an unknown format."
132
- raise Waveform::RuntimeError.new("Source audio file #{source} could not be read by RubyAudio library -- try converting to WAV first (RubyAudio: #{e.message})")
132
+ raise Waveform::RuntimeError.new("Source audio file #{source} could not be read by RubyAudio library -- Hint: non-WAV files are no longer supported, convert to WAV first using something like ffmpeg (RubyAudio: #{e.message})")
133
133
  end
134
134
 
135
135
  # Draws the given samples using the given options, returns a ChunkyPNG::Image.
@@ -1,3 +1,3 @@
1
1
  class Waveform
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -1,7 +1,6 @@
1
1
  require File.expand_path(File.join(File.dirname(__FILE__), "..", "lib", "waveform"))
2
2
 
3
3
  require "test/unit"
4
- require "ruby-debug"
5
4
  require "fileutils"
6
5
 
7
6
  module Helpers
@@ -162,7 +161,15 @@ class WaveformTest < Test::Unit::TestCase
162
161
  assert_raises Waveform::RuntimeError do
163
162
  Waveform.generate(fixture("sample.wav"), output("wont_be_overwritten_by_default.png"))
164
163
  end
165
- end
164
+ end
165
+
166
+ def test_raises_deprecation_exception_if_ruby_audio_fails_to_read_source_file
167
+ begin
168
+ Waveform.generate(fixture("sample.txt"), output("shouldnt_exist.png"))
169
+ rescue Waveform::RuntimeError => e
170
+ assert_match /Hint: non-WAV files are no longer supported, convert to WAV first using something like ffmpeg/, e.message
171
+ end
172
+ end
166
173
  end
167
174
 
168
175
  WaveformTest.cleanup
metadata CHANGED
@@ -1,60 +1,48 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: waveform
3
- version: !ruby/object:Gem::Version
4
- hash: 25
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.2
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 1
9
- - 1
10
- version: 0.1.1
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Ben Alavi
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-09-28 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2012-10-29 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: ruby-audio
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &70419740 !ruby/object:Gem::Requirement
24
17
  none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- hash: 3
29
- segments:
30
- - 0
31
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
32
22
  type: :runtime
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
35
- name: chunky_png
36
23
  prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *70419740
25
+ - !ruby/object:Gem::Dependency
26
+ name: chunky_png
27
+ requirement: &70419500 !ruby/object:Gem::Requirement
38
28
  none: false
39
- requirements:
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- hash: 3
43
- segments:
44
- - 0
45
- version: "0"
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
46
33
  type: :runtime
47
- version_requirements: *id002
48
- description: Generate waveform images from audio files. Includes a Waveform class for generating waveforms in your code as well as a simple command-line program called 'waveform' for generating on the command line.
49
- email:
34
+ prerelease: false
35
+ version_requirements: *70419500
36
+ description: Generate waveform images from audio files. Includes a Waveform class
37
+ for generating waveforms in your code as well as a simple command-line program called
38
+ 'waveform' for generating on the command line.
39
+ email:
50
40
  - benalavi@gmail.com
51
- executables:
41
+ executables:
52
42
  - waveform
53
43
  extensions: []
54
-
55
44
  extra_rdoc_files: []
56
-
57
- files:
45
+ files:
58
46
  - README.md
59
47
  - Rakefile
60
48
  - lib/waveform/version.rb
@@ -64,36 +52,26 @@ files:
64
52
  - bin/waveform
65
53
  homepage: http://github.com/benalavi/waveform
66
54
  licenses: []
67
-
68
55
  post_install_message:
69
56
  rdoc_options: []
70
-
71
- require_paths:
57
+ require_paths:
72
58
  - lib
73
- required_ruby_version: !ruby/object:Gem::Requirement
59
+ required_ruby_version: !ruby/object:Gem::Requirement
74
60
  none: false
75
- requirements:
76
- - - ">="
77
- - !ruby/object:Gem::Version
78
- hash: 3
79
- segments:
80
- - 0
81
- version: "0"
82
- required_rubygems_version: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ! '>='
63
+ - !ruby/object:Gem::Version
64
+ version: '0'
65
+ required_rubygems_version: !ruby/object:Gem::Requirement
83
66
  none: false
84
- requirements:
85
- - - ">="
86
- - !ruby/object:Gem::Version
87
- hash: 3
88
- segments:
89
- - 0
90
- version: "0"
67
+ requirements:
68
+ - - ! '>='
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
91
71
  requirements: []
92
-
93
72
  rubyforge_project:
94
- rubygems_version: 1.8.24
73
+ rubygems_version: 1.8.11
95
74
  signing_key:
96
75
  specification_version: 3
97
76
  summary: Generate waveform images from audio files
98
77
  test_files: []
99
-