humpday 0.0.4 → 1.0.0
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.
- checksums.yaml +4 -4
- data/bin/humpday +12 -3
- data/lib/humpday/version.rb +1 -1
- data/lib/humpday.rb +44 -0
- data/lib/support/aw_cmon_i_know_you_can_hear_me.m4a +0 -0
- data/lib/support/guess_what_day_it_is.m4a +0 -0
- data/lib/support/guess_what_day_it_is2.m4a +0 -0
- data/lib/support/huh_anybody.m4a +0 -0
- data/lib/support/laugh.m4a +0 -0
- data/lib/support/uhoh.m4a +0 -0
- data/lib/support/whoowhoa.m4a +0 -0
- metadata +10 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d91f0cc751ee2997fe4d9b90d4d01a9b440e27a
|
4
|
+
data.tar.gz: 795ceb4d2b350e99ce723a2bd1fcd7a4fac1aff6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0740764b7a1b81323f865ec781ed5560cdcf314bba54dacda19bab3d05b041d159832753fa11e7c35ffef27e6c863311ac1f4eeab1c8f6d5c87b952ef5030fee
|
7
|
+
data.tar.gz: c5b39d238a02739168b6965234dc1796f0281a86041132acc135eec656028bbebdf02a7c71526da1196bd3352e812891ccf74769f7967385dd70e516a1e9967a
|
data/bin/humpday
CHANGED
@@ -1,8 +1,17 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
3
|
require 'sounder'
|
4
|
+
require_relative '../lib/humpday'
|
4
5
|
|
5
|
-
|
6
|
+
if ARGV.size == 1 && ARGV[0] == 'random'
|
7
|
+
Humpday.random
|
8
|
+
elsif ARGV.size == 1 && ARGV[0] != '-h' && ARGV[0] != 'help' && ARGV[0] != '--help'
|
9
|
+
begin
|
10
|
+
Humpday.play ARGV[0]
|
11
|
+
rescue Humpday::UnknownSoundError
|
12
|
+
abort "#{ARGV[0]} is not a known sound"
|
13
|
+
end
|
14
|
+
else
|
15
|
+
puts Humpday.usage
|
16
|
+
end
|
6
17
|
|
7
|
-
# Sounder::System.set_volume 100
|
8
|
-
Sounder.play audio_file
|
data/lib/humpday/version.rb
CHANGED
data/lib/humpday.rb
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
require 'humpday/version'
|
2
|
+
|
3
|
+
module Humpday
|
4
|
+
|
5
|
+
class UnknownSoundError < ArgumentError; end
|
6
|
+
|
7
|
+
SOUNDS = {
|
8
|
+
'uhoh' => 'uhoh',
|
9
|
+
'guess_what_day' => 'guess_what_day_it_is',
|
10
|
+
'guess_what_day2' => 'guess_what_day_it_is2',
|
11
|
+
'huh' => 'huh_anybody',
|
12
|
+
'cmon' => 'aw_cmon_i_know_you_can_hear_me',
|
13
|
+
'laugh' => 'laugh',
|
14
|
+
'whoowhoa' => 'whoowhoa',
|
15
|
+
'humpday' => 'humpday'
|
16
|
+
}
|
17
|
+
|
18
|
+
def self.play sound_name
|
19
|
+
sound = SOUNDS.fetch(sound_name) { raise UnknownSoundError }
|
20
|
+
audio_file = File.expand_path("../../lib/support/#{sound}.m4a", __FILE__)
|
21
|
+
Sounder.play audio_file
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.random
|
25
|
+
self.play SOUNDS.keys.sample
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.usage
|
29
|
+
[ "humpday version #{Humpday::VERSION}",
|
30
|
+
"Usage: humpday help (this)",
|
31
|
+
"Usage: humpday random (picks a random sound)",
|
32
|
+
"Usage: humpday <sound name>",
|
33
|
+
"Sounds:",
|
34
|
+
" uhoh",
|
35
|
+
" guess_what_day",
|
36
|
+
" guess_what_day2",
|
37
|
+
" huh",
|
38
|
+
" cmon",
|
39
|
+
" laugh",
|
40
|
+
" whoowhoa",
|
41
|
+
" humpday"
|
42
|
+
].join "\n"
|
43
|
+
end
|
44
|
+
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: humpday
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Zaninovich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sounder
|
@@ -67,8 +67,16 @@ files:
|
|
67
67
|
- Rakefile
|
68
68
|
- bin/humpday
|
69
69
|
- humpday.gemspec
|
70
|
+
- lib/humpday.rb
|
70
71
|
- lib/humpday/version.rb
|
72
|
+
- lib/support/aw_cmon_i_know_you_can_hear_me.m4a
|
73
|
+
- lib/support/guess_what_day_it_is.m4a
|
74
|
+
- lib/support/guess_what_day_it_is2.m4a
|
75
|
+
- lib/support/huh_anybody.m4a
|
71
76
|
- lib/support/humpday.m4a
|
77
|
+
- lib/support/laugh.m4a
|
78
|
+
- lib/support/uhoh.m4a
|
79
|
+
- lib/support/whoowhoa.m4a
|
72
80
|
homepage: ''
|
73
81
|
licenses:
|
74
82
|
- MIT
|