wasabi_pea 0.2 → 0.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.
Files changed (2) hide show
  1. data/lib/wasabi_pea.rb +9 -4
  2. metadata +1 -1
data/lib/wasabi_pea.rb CHANGED
@@ -14,12 +14,17 @@ module TextToSpeech
14
14
  end
15
15
  rescue Exception => error
16
16
  $stderr.puts(" #{error.message}")
17
+ return nil
17
18
  end
18
19
 
19
- io = StringIO.new(open(file, "rb") {|io| io.read })
20
- io.original_filename = "#{file_name}.mp3"
21
- io.content_type = "audio/mpeg"
22
- io
20
+ begin
21
+ io = StringIO.new(open(file, "rb") {|io| io.read })
22
+ io.original_filename = "#{file_name}.mp3"
23
+ io.content_type = "audio/mpeg"
24
+ return io
25
+ rescue
26
+ return nil
27
+ end
23
28
  end
24
29
 
25
30
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wasabi_pea
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: '0.3'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: