humpday 1.1.0 → 1.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/humpday/version.rb +1 -1
- data/lib/humpday.rb +8 -13
- 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: 3c284c04206a1a7bd557ad3bd30d2b460201991a
|
4
|
+
data.tar.gz: 478694c7de0c4c6ea945449b104e231eff68c422
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 352ddf9b96e7af8f3e9e6678cb8c315f29dc64ea7b8e37305d036b183cdc0040e577f2ad6d4212e27d0d3458d9ec7751df4d98bfa037e71fce8d836f2fc8c93c
|
7
|
+
data.tar.gz: 61f515db7bdeb3d09827b5b958a28109315cfeb0e2586cd9c7ada770e01b0e831066c521ba093379e3a8d6dd0aaa04c86bfc7a34a1550e0f4d81edde35f3531e
|
data/lib/humpday/version.rb
CHANGED
data/lib/humpday.rb
CHANGED
@@ -17,7 +17,7 @@ module Humpday
|
|
17
17
|
|
18
18
|
def self.play name
|
19
19
|
sound_name = self.fuzzy_find name
|
20
|
-
raise UnknownSoundError if sound_name.nil?
|
20
|
+
raise UnknownSoundError if sound_name.nil?
|
21
21
|
sound = SOUNDS.fetch(sound_name) { raise UnknownSoundError }
|
22
22
|
audio_file = File.expand_path("../../lib/support/#{sound}.m4a", __FILE__)
|
23
23
|
Sounder.play audio_file
|
@@ -28,22 +28,17 @@ module Humpday
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def self.usage
|
31
|
-
[ "humpday version #{Humpday::VERSION}",
|
31
|
+
usage = [ "humpday version #{Humpday::VERSION}",
|
32
32
|
"Usage: humpday help (this)",
|
33
33
|
"Usage: humpday random (picks a random sound)",
|
34
34
|
"Usage: humpday <sound name> (it will fuzzy match the name)",
|
35
|
-
"Sounds:"
|
36
|
-
|
37
|
-
"
|
38
|
-
|
39
|
-
|
40
|
-
" cmon",
|
41
|
-
" laugh",
|
42
|
-
" whoowhoa",
|
43
|
-
" humpday"
|
44
|
-
].join "\n"
|
35
|
+
"Sounds:"
|
36
|
+
] + SOUNDS.keys.map do |sound|
|
37
|
+
" #{sound}"
|
38
|
+
end
|
39
|
+
usage.join "\n"
|
45
40
|
end
|
46
|
-
|
41
|
+
|
47
42
|
private
|
48
43
|
def self.fuzzy_find name
|
49
44
|
SOUNDS.keys.select { |sn| sn.include? name }.first
|
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: 1.1.
|
4
|
+
version: 1.1.1
|
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-08-
|
11
|
+
date: 2013-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sounder
|