ambient_spec 2.0.1 → 2.0.2

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
  SHA256:
3
- metadata.gz: d52000c3fed3a2f700710b8f33ee235e82f03aaa9a054e1f4d342618de1e23e4
4
- data.tar.gz: ea05b0d2625169c7eaf747abe60646d05f44d9e541a4caa4d9daec535c273516
3
+ metadata.gz: 26d9681fe02cc318a9cee8d88f767472d214434d30a1e4bf112220fbd9c4a92e
4
+ data.tar.gz: ea1656753c8efe5e65e99f8fa0e6349267d4c4e8150f1b0e5c6c31117ed218c7
5
5
  SHA512:
6
- metadata.gz: dc8739f9841d47537a45395797164f08cb817b71871b96c13737a8814bbf3fb05e51496715e81e3ca59c6a97c65165a8a06c26572815c15787e6b9557dd8c0fa
7
- data.tar.gz: e74a8342c48c5d33e8baab4c59c2135769297177eb8ce9fa80d896e2018a3df03bf83602afe6991a59af20177e6590d8124a256daf66251120a6ef67c3fc4167
6
+ metadata.gz: 9bc950c582cd4e70279da0a2061510d5fe0e34acd9c78e24e060d476a6aec484a78d2c5dff443ff28718fb684591a841d9e1f97131222a2a0d686019d8f2ff55
7
+ data.tar.gz: 7b0189469bb71b40fd9d96a7f99c05a54f628df5fab17fdb87fea8a18b8f4fdf5dead852144f74dbe5de179a309800393003b716138fddf20768553d05553bd5
@@ -4,10 +4,6 @@ class AmbientDocumentationFormatter < RSpec::Core::Formatters::DocumentationForm
4
4
 
5
5
  RSpec::Core::Formatters.register self, :example_passed, :example_failed
6
6
 
7
- def example_started
8
- @start_time = Time.now
9
- end
10
-
11
7
  def example_passed(_)
12
8
  player.sing(:pass)
13
9
  super
@@ -6,16 +6,17 @@ module AmbientSpec
6
6
 
7
7
  FIFTHS = %w{c g d a e b f}.freeze
8
8
  PATCHES = %w{breathy dark ghost harp piano plasma swirl waves}.freeze
9
+ PATH_TO_FILES = File.join(File.dirname(File.expand_path(__FILE__)), 'sounds').freeze
9
10
 
10
11
  def sing(status=:pass)
11
12
  if status == :pass
12
13
  return unless should_play?
13
14
  folder = PATCHES.sample
14
15
  filename = FIFTHS.sample
15
- system("afplay #{path_to_files}/#{folder}/#{filename}.wav &>/dev/null &")
16
+ system("afplay #{PATH_TO_FILES}/#{folder}/#{filename}.wav &>/dev/null &")
16
17
  increment_timer
17
18
  else
18
- system("afplay #{path_to_files}/failure/failure.wav &>/dev/null &")
19
+ system("afplay #{PATH_TO_FILES}/failure/failure.wav &>/dev/null &")
19
20
  end
20
21
  end
21
22
 
@@ -29,9 +30,5 @@ module AmbientSpec
29
30
  @last_played_at = Time.now
30
31
  end
31
32
 
32
- def path_to_files
33
- @path_to_files ||= File.join(File.dirname(File.expand_path(__FILE__)), 'sounds')
34
- end
35
-
36
33
  end
37
34
  end
@@ -1,3 +1,3 @@
1
1
  module AmbientSpec
2
- VERSION = "2.0.1"
2
+ VERSION = "2.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ambient_spec
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Coraline Ada Ehmke