deploy_sounds 0.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. checksums.yaml +15 -0
  2. data/bin/deploy_sounds +5 -0
  3. data/lib/deploy_sounds.rb +20 -0
  4. metadata +45 -0
checksums.yaml ADDED
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MWRjNDFhMWU1NjEzMGQ0NDZjNjk4Njc0YzdkNzQwNDk1OTFlZTU5OA==
5
+ data.tar.gz: !binary |-
6
+ ZTM5NWU2MDhhMmVlMWRhNDRjZDJkMmRkODIxMjljODQ3YzNhZGY1YQ==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ MDg4OWY4MjBjYTcwYmMxZmJkMzIzOWU4ZDg0ZmZkMDk3ODA2MWNkZmM3NTY5
10
+ ZDkxYzI1MTlhNmNlMWFkZTQxODQyZWFiZmE3ZjFjMjVkYjVjZTNhMzQ4MmI2
11
+ ZmFhYTZjOTlmZmFhNjBhNTM2MjY2MGEwMjBkOGMxMDA3YTEzZDg=
12
+ data.tar.gz: !binary |-
13
+ M2M3NmRjMWYwMDkzMTExNTQwNzE2OGEzYWUzMDgzNDFlZTRiNjZmOTMxNzQw
14
+ ZTQ2ZDJhOTJjYTU0ZjNiYWFjYzJmOWU1ZjA4MzZhYzUzYmRhODIzZTY2ZmRi
15
+ ZjFhNmI5OTg3ZGY3ZmNkN2EzMzk0NzU1OTcwNzg4YWQ0ZmE3YTY=
data/bin/deploy_sounds ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'deploy_sounds'
4
+
5
+ DeploySounds.play
@@ -0,0 +1,20 @@
1
+ # This module inspired by https://github.com/nodanaonlyzuul/Paul-Dix--Thundergod
2
+ module DeploySounds
3
+ AUDIO_PLAY_COMMANDS = %w(afplay play)
4
+
5
+ def self.play
6
+ AUDIO_PLAY_COMMANDS.each do |command|
7
+ random_file = Dir.glob("#{ENV['HOME']}/.deploy_sounds/*").sample
8
+
9
+ unless random_file
10
+ puts "[deploy_sounds] You don't have a ~/.deploy_sounds or it's empty."
11
+ break
12
+ end
13
+
14
+ if system("which #{command}")
15
+ `#{command} #{random_file} &`
16
+ break
17
+ end
18
+ end
19
+ end
20
+ end
metadata ADDED
@@ -0,0 +1,45 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: deploy_sounds
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Dan Guilak
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-02-19 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email:
15
+ - dan@learnup.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - bin/deploy_sounds
21
+ - lib/deploy_sounds.rb
22
+ homepage:
23
+ licenses: []
24
+ metadata: {}
25
+ post_install_message:
26
+ rdoc_options: []
27
+ require_paths:
28
+ - lib
29
+ required_ruby_version: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ! '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ required_rubygems_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ! '>='
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ requirements: []
40
+ rubyforge_project:
41
+ rubygems_version: 2.4.6
42
+ signing_key:
43
+ specification_version: 4
44
+ summary: Plays a random sound from ~/.deploy_sounds
45
+ test_files: []