pouf 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pouf.rb +20 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d9038bd7008ea73958eaefddc1dfc420c06bbf1
|
4
|
+
data.tar.gz: 100f3bc0862b5b0df28ad56ee2be12dd7e377dc5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f30fb1732e679e9cdbe2c1c400bc8b10a064f7d842fab03ddecf97339684a1b77c2313841df0b7c6c6d8620e23477d84bb658a8a7a18115568e5dfa7dd31e08e
|
7
|
+
data.tar.gz: cac9e4f33153cf0db4b0999a4f6652afac426db5f2cc8f0efa5c91a34a94214b0c6a70915f4652743eae0e96043e36e512a4e6881f9806df16882028103e699e
|
data/lib/pouf.rb
CHANGED
@@ -9,12 +9,29 @@ module Pouf
|
|
9
9
|
SOUNDS_DIR = File.expand_path("~/.pouf/sounds")
|
10
10
|
|
11
11
|
def version
|
12
|
-
'0.1.
|
12
|
+
'0.1.1'
|
13
|
+
end
|
14
|
+
|
15
|
+
def play_cmd
|
16
|
+
return ENV['POUF_CMD'].split(' ') if ENV['POUF_CMD']
|
17
|
+
case RUBY_PLATFORM
|
18
|
+
when /darwin/ then ['afplay']
|
19
|
+
when /linux/ then ['mpg123', '-q']
|
20
|
+
else nil
|
21
|
+
end
|
13
22
|
end
|
14
23
|
|
15
24
|
def play_sound filename
|
16
|
-
|
17
|
-
|
25
|
+
return unless filename
|
26
|
+
|
27
|
+
cmd = play_cmd
|
28
|
+
|
29
|
+
if cmd
|
30
|
+
system *cmd, filename
|
31
|
+
else
|
32
|
+
puts 'pouf is unsupported for your platform for now'
|
33
|
+
end
|
34
|
+
|
18
35
|
end
|
19
36
|
|
20
37
|
def alias2filename name
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pouf
|
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
|
- Baptiste Fontaine
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Quickly play random short sounds from the command-line
|
14
14
|
email: batifon@yahoo.fr
|