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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 713e4c636e0d5a5ecbc3bd919989c9e4a61aedcc
4
- data.tar.gz: 30b223624e8b671764020e818a827372c8f2221a
3
+ metadata.gz: 3c284c04206a1a7bd557ad3bd30d2b460201991a
4
+ data.tar.gz: 478694c7de0c4c6ea945449b104e231eff68c422
5
5
  SHA512:
6
- metadata.gz: 2f2e0da9cb44c122b3b0f3859eab2a222f2fae0e6da921eb4e483e3961e39725c860ab04e1c22b4992a0dbb6a5c30bf81ba61c8152075fc4b053f7802aba53bd
7
- data.tar.gz: 8cbffb0fc86c8f6b7c17fb46cfa4127a5672040303f17140c8350033c2408730caa77bf18d23944f74e94146e89624e06227a8c485cb7e0e37bb2ee7cce276cb
6
+ metadata.gz: 352ddf9b96e7af8f3e9e6678cb8c315f29dc64ea7b8e37305d036b183cdc0040e577f2ad6d4212e27d0d3458d9ec7751df4d98bfa037e71fce8d836f2fc8c93c
7
+ data.tar.gz: 61f515db7bdeb3d09827b5b958a28109315cfeb0e2586cd9c7ada770e01b0e831066c521ba093379e3a8d6dd0aaa04c86bfc7a34a1550e0f4d81edde35f3531e
@@ -1,3 +1,3 @@
1
1
  module Humpday
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
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
- " uhoh",
37
- " guess_what_day",
38
- " guess_what_day_2",
39
- " huh",
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.0
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-01 00:00:00.000000000 Z
11
+ date: 2013-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sounder