pouf 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/pouf +1 -1
  3. data/lib/pouf.rb +6 -8
  4. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9d9038bd7008ea73958eaefddc1dfc420c06bbf1
4
- data.tar.gz: 100f3bc0862b5b0df28ad56ee2be12dd7e377dc5
3
+ metadata.gz: 8e605a4981b545829d3bd08cb9e2f5b2e80af4ad
4
+ data.tar.gz: 315eeff15c05820216034de32cb7ded538f192a1
5
5
  SHA512:
6
- metadata.gz: f30fb1732e679e9cdbe2c1c400bc8b10a064f7d842fab03ddecf97339684a1b77c2313841df0b7c6c6d8620e23477d84bb658a8a7a18115568e5dfa7dd31e08e
7
- data.tar.gz: cac9e4f33153cf0db4b0999a4f6652afac426db5f2cc8f0efa5c91a34a94214b0c6a70915f4652743eae0e96043e36e512a4e6881f9806df16882028103e699e
6
+ metadata.gz: 5655cf8585f74c3624ac6f8ed0adcde4b2aeea0eeac8aafb11cf5206546f9f31fb6d042bb0dd9f10ad2ebf16cca5923923771e92d0b7158181dc41752df1e8d0
7
+ data.tar.gz: b944a7d0fc77a569cd985c77341c67c8e5d2e3c3e6f8789731337cbbae35ba53fe362f560a3024ecb3f7a90236489e13833eab1fc0d3f99ec58f64d205736f8b
data/bin/pouf CHANGED
@@ -39,5 +39,5 @@ when 'rm' then
39
39
  Pouf.rm(*ARGV)
40
40
  else
41
41
  show_help if !cmd
42
- Pouf.play cmd == 'play' ? ARGV.first : cmd
42
+ Pouf.play (cmd == 'play' ? ARGV.first : cmd), ENV['POUF_CMD']
43
43
  end
@@ -9,7 +9,7 @@ module Pouf
9
9
  SOUNDS_DIR = File.expand_path("~/.pouf/sounds")
10
10
 
11
11
  def version
12
- '0.1.1'
12
+ '0.1.2'
13
13
  end
14
14
 
15
15
  def play_cmd
@@ -21,10 +21,10 @@ module Pouf
21
21
  end
22
22
  end
23
23
 
24
- def play_sound filename
24
+ def play_sound filename, cmd=nil
25
25
  return unless filename
26
26
 
27
- cmd = play_cmd
27
+ cmd ||= play_cmd
28
28
 
29
29
  if cmd
30
30
  system *cmd, filename
@@ -70,11 +70,9 @@ module Pouf
70
70
  FileUtils.mv(f1, f2) if f1 and f2
71
71
  end
72
72
 
73
- def play *aliases
74
- aliases.each do |a|
75
- fname = alias2filename a
76
- play_sound fname if fname
77
- end
73
+ def play name, cmd=nil
74
+ fname = alias2filename name
75
+ play_sound(fname, cmd) if fname
78
76
  end
79
77
 
80
78
  def rm *names
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.1
4
+ version: 0.1.2
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-24 00:00:00.000000000 Z
11
+ date: 2014-01-28 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
@@ -17,8 +17,8 @@ executables:
17
17
  extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
- - lib/pouf.rb
21
20
  - bin/pouf
21
+ - lib/pouf.rb
22
22
  homepage: https://github.com/bfontaine/pouf
23
23
  licenses:
24
24
  - MIT
@@ -39,7 +39,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
39
39
  version: '0'
40
40
  requirements: []
41
41
  rubyforge_project:
42
- rubygems_version: 2.0.3
42
+ rubygems_version: 2.2.1
43
43
  signing_key:
44
44
  specification_version: 4
45
45
  summary: Play random sounds from the command-line