gsay 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.md +12 -0
  2. data/bin/gsay +4 -17
  3. data/gsay.gemspec +1 -1
  4. metadata +1 -1
data/README.md CHANGED
@@ -7,3 +7,15 @@ SPEAK LIKE A ROBOT!
7
7
  brew install mpg123
8
8
  gem install gsay
9
9
  gsay "Speak like a robot"
10
+
11
+ ## Some good ones to try
12
+
13
+ gsay "irony is wasted on the stupid"
14
+
15
+ gsay "what"
16
+
17
+ gsay "party rock is in the house tonight everybody just have a good time and we gonna make you lose your mind"
18
+
19
+ gsay "i just wanna tell you how i am feeling gotta make you understand never gonna give you up never gonna let you down"
20
+
21
+ gsay "i miss the earth so much i miss my wife it is lonely out in space on such a timeless flight oh no no no i am a rocket man rocket man burning out his fuse out here alone"
data/bin/gsay CHANGED
@@ -5,21 +5,8 @@ require 'open-uri'
5
5
 
6
6
  words = ARGV.first.scan(/\w+/).map(&:downcase)
7
7
 
8
- begin
9
- sounds = words.map { |word| Tempfile.new(word) }
10
-
11
- words.each_with_index do |word, index|
12
- @word = word
13
- url = "https://ssl.gstatic.com/dictionary/static/sounds/de/0/#{word}.mp3"
14
- sounds[index].write(open(url).read)
15
- end
16
-
17
- `mpg123 -q #{sounds.map(&:path).join(" ")}`
18
- rescue OpenURI::HTTPError
19
- abort "Couldn't gsay '#{@word}' :("
20
- ensure
21
- sounds.each do |sound|
22
- sound.close
23
- sound.unlink
24
- end
8
+ sounds = words.map do |word|
9
+ "http://ssl.gstatic.com/dictionary/static/sounds/de/0/#{word}.mp3"
25
10
  end
11
+
12
+ `mpg123 -q #{sounds.join(" ")}`
@@ -10,5 +10,5 @@ Gem::Specification.new do |gem|
10
10
  gem.name = "gsay"
11
11
  gem.require_paths = ["lib"]
12
12
 
13
- gem.version = "1.0.0"
13
+ gem.version = "1.0.1"
14
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gsay
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: