sounder 1.1.1 → 1.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9601bd2ac45b568b2a0058e7810dce841cb9918c
4
- data.tar.gz: 3cd888f2bf2a4b8e638c811ec1864c40012a3ec1
3
+ metadata.gz: 7d594d707cba2c317f06a36967baec4bd7918e2c
4
+ data.tar.gz: caf9e3b80c2c2845fad950d4c1faac75272a6d58
5
5
  SHA512:
6
- metadata.gz: c9207f925476d5b6dd742643c235481cd3d51597637d43dd787a38e1e422fe050f504584c46f28c5563e29f7c4affb276000d9761d27598627a63d8a0cf57ff2
7
- data.tar.gz: 257df3b56b1264889775a438d10b38878bc14d3273499075af46e9cc0b848ddb2f00ad24f3959d5eebd5a7e0d465f04cfa6de64edda77d3109c32d041f27c598
6
+ metadata.gz: ff56a7a5a35477de93fd6ea96eeab3a319f2a6756d368151547a5ef8653785ae3061ac7c1b417653bb8bb4f2ac293ba5b328b714e02d8a86904af1ddcda5e246
7
+ data.tar.gz: 52ab665826b9d203ae065df767c8999027fd8affa9e57db6fa64c729736984e3d9624b883e9534c4e2accd2cbf9616b4fd3196d99878119cd2abdc994a09be57
@@ -29,10 +29,10 @@ module Sounder
29
29
  end
30
30
  end
31
31
 
32
-
33
32
  private
33
+
34
34
  def fuzzy_find name
35
- @sounds.keys.select { |sn| sn.include? name }.first
35
+ @sounds.keys.select { |sn| sn.downcase.include? name.downcase }.first
36
36
  end
37
37
 
38
38
  end
@@ -1,3 +1,3 @@
1
1
  module Sounder
2
- VERSION = "1.1.1"
2
+ VERSION = "1.2.0"
3
3
  end
@@ -5,8 +5,8 @@ describe Sounder do
5
5
  describe Sounder::SoundGroup do
6
6
  let!(:sounds) do
7
7
  {
8
- sound_a: 'sounda.m4a',
9
- 'sound_b' => 'soundb.m4a'
8
+ sound_a: 'sound_a',
9
+ 'sound B' => 'sound_b',
10
10
  }
11
11
  end
12
12
 
@@ -25,14 +25,14 @@ describe Sounder do
25
25
  describe '#play' do
26
26
  it "plays a sound corresponding to the argument passed in" do
27
27
  group = Sounder::SoundGroup.new sounds
28
- sound_b = group.sounds.fetch "sound_b"
28
+ sound_b = group.sounds.fetch "sound B"
29
29
  expect(sound_b).to receive(:play)
30
- group.play "sound_b"
30
+ group.play "sound B"
31
31
  end
32
32
 
33
33
  it "fuzzy matches the sound name" do
34
34
  group = Sounder::SoundGroup.new sounds
35
- sound_b = group.sounds.fetch "sound_b"
35
+ sound_b = group.sounds.fetch "sound B"
36
36
  expect(sound_b).to receive(:play)
37
37
  group.play "b"
38
38
  end
@@ -56,7 +56,7 @@ describe Sounder do
56
56
  group = Sounder::SoundGroup.new sounds
57
57
  expect(group.usage).to include "random (picks a random sound)"
58
58
  expect(group.usage).to include " sound_a"
59
- expect(group.usage).to include " sound_b"
59
+ expect(group.usage).to include " sound B"
60
60
  end
61
61
  end
62
62
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sounder
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Zaninovich