beeps 0.1.21 → 0.1.22

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: 5168afe572bdee1ba0d56d966878ebd82ffa908632b52cd719c5aca71acb7ffc
4
- data.tar.gz: e139adc26fd8752f1f788710c72cf9cc02a4ccbbe6f4531f40bcd720cb1e39ac
3
+ metadata.gz: 8858e07b1dd91738496c12731a6b492498f507859b5ed34a6da7bdecd1fa07af
4
+ data.tar.gz: b79f6e4c7b85caa1dc95f5d222afb08656fed4553f9a049807c61b6b7c4ccd56
5
5
  SHA512:
6
- metadata.gz: 93c7c234d3b480d2ce944ab987e5d3ff3f91083071612967c9e00204c70483b48d826215b066b845f3ec2624135c7f23632f2acc0b3846920a2d6e3caa89f437
7
- data.tar.gz: 7e4da80df43f3b2f101b2cbd87a05dc6ffdd7f80c8e91d21a85c3febb6373a2244260c5bf66dee268fb1527f46e08cb8315621e8c83d94a2e1fe68159f879120
6
+ metadata.gz: 0d7df1bc0b1606590f96cb0b5d9e055f170dcb944a1b6371795b8e487d28101eb4edac33fbb59bf75854bd842e3c15ebb947c65afceb7812b126946a7ee356e1
7
+ data.tar.gz: a78626b6dc382fe94c24c50ae9094a9d206f094de0e2bd2bf40bd1fc97a6b38531f0ad6d2703468bef5ce9dd8585800c9bd028675571cb48486d377f3f0042d3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.21
1
+ 0.1.22
data/beeps.gemspec CHANGED
@@ -28,8 +28,8 @@ Gem::Specification.new do |s|
28
28
  s.platform = Gem::Platform::RUBY
29
29
  s.required_ruby_version = '~> 2'
30
30
 
31
- s.add_runtime_dependency 'xot', '~> 0.1.21'
32
- s.add_runtime_dependency 'rucy', '~> 0.1.21'
31
+ s.add_runtime_dependency 'xot', '~> 0.1.22'
32
+ s.add_runtime_dependency 'rucy', '~> 0.1.22'
33
33
 
34
34
  s.files = `git ls-files`.split $/
35
35
  s.executables = s.files.grep(%r{^bin/}) {|f| File.basename f}
@@ -4,7 +4,7 @@
4
4
  require 'beeps/ext'
5
5
 
6
6
 
7
- unless $BEEPS_NOAUTOINIT
7
+ unless defined?($BEEPS_NOAUTOINIT) && $BEEPS_NOAUTOINIT
8
8
  Beeps.init!
9
9
  at_exit {Beeps.fin!}
10
10
  end
data/lib/beeps/beeps.rb CHANGED
@@ -11,33 +11,33 @@ module Beeps
11
11
 
12
12
  extend module ClassMethods
13
13
 
14
- def be ()
14
+ def be()
15
15
  beep_sound(0.1).play
16
16
  end
17
17
 
18
- def bee ()
18
+ def bee()
19
19
  beep_sound(0.3).play
20
20
  end
21
21
 
22
- def beep (time = 0.5)
22
+ def beep(time = 0.5)
23
23
  beep_sound(time).play
24
24
  end
25
25
 
26
- def beeep ()
26
+ def beeep()
27
27
  beep_sound(1).play
28
28
  end
29
29
 
30
- def beeeep ()
30
+ def beeeep()
31
31
  beep_sound(1.5).play
32
32
  end
33
33
 
34
- def beeeeep ()
34
+ def beeeeep()
35
35
  beep_sound(2).play
36
36
  end
37
37
 
38
38
  private
39
39
 
40
- def beep_sound (time)
40
+ def beep_sound(time)
41
41
  Sound.new SquareWave.new, time
42
42
  end
43
43
 
data/lib/beeps/module.rb CHANGED
@@ -8,23 +8,23 @@ module Beeps
8
8
 
9
9
  module_function
10
10
 
11
- def name ()
11
+ def name()
12
12
  super.split('::')[-2]
13
13
  end
14
14
 
15
- def version ()
15
+ def version()
16
16
  open(root_dir 'VERSION') {|f| f.readline.chomp}
17
17
  end
18
18
 
19
- def root_dir (path = '')
19
+ def root_dir(path = '')
20
20
  File.expand_path "../../#{path}", __dir__
21
21
  end
22
22
 
23
- def inc_dir ()
23
+ def inc_dir()
24
24
  root_dir 'include'
25
25
  end
26
26
 
27
- def lib_dir ()
27
+ def lib_dir()
28
28
  root_dir 'lib'
29
29
  end
30
30
 
@@ -14,7 +14,7 @@ module Beeps
14
14
 
15
15
  include Xot::Setter
16
16
 
17
- def initialize (options = nil, &block)
17
+ def initialize(options = nil, &block)
18
18
  super()
19
19
  set options if options
20
20
  Xot::BlockUtil.instance_eval_or_block_call self, &block if block
data/lib/beeps/sound.rb CHANGED
@@ -9,7 +9,7 @@ module Beeps
9
9
 
10
10
  class Sound
11
11
 
12
- def self.load (path)
12
+ def self.load(path)
13
13
  Sound.new FileIn.new(path), 1
14
14
  end
15
15
 
data/test/helper.rb CHANGED
@@ -12,6 +12,6 @@ require 'beeps'
12
12
  include Xot::Test
13
13
 
14
14
 
15
- unless $BEEPS_NOAUTOINIT
16
- def Beeps.fin! () end
15
+ unless defined?($BEEPS_NOAUTOINIT) && $BEEPS_NOAUTOINIT
16
+ def Beeps.fin!() end
17
17
  end
data/test/test_beeps.rb CHANGED
@@ -8,7 +8,7 @@ require_relative 'helper'
8
8
 
9
9
  class TestBeeps < Test::Unit::TestCase
10
10
 
11
- def test_init! ()
11
+ def test_init!()
12
12
  assert_raise(Rucy::NativeError) {Beeps.fin!}
13
13
  assert Beeps.init!
14
14
  assert_raise(Rucy::NativeError) {Beeps.init!}
data/test/test_sound.rb CHANGED
@@ -6,15 +6,15 @@ require_relative 'helper'
6
6
 
7
7
  class TestSound < Test::Unit::TestCase
8
8
 
9
- def s ()
9
+ def s()
10
10
  Beeps::Sound.new Beeps::SineWave.new, 0.1
11
11
  end
12
12
 
13
- def test_play ()
13
+ def test_play()
14
14
  assert_nothing_raised {s.play}
15
15
  end
16
16
 
17
- def test_beep ()
17
+ def test_beep()
18
18
  assert_nothing_raised {Beeps.be}
19
19
  assert_nothing_raised {Beeps.bee}
20
20
  assert_nothing_raised {Beeps.beep}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beeps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.21
4
+ version: 0.1.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - xordog
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-16 00:00:00.000000000 Z
11
+ date: 2021-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xot
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.1.21
19
+ version: 0.1.22
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.1.21
26
+ version: 0.1.22
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rucy
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.1.21
33
+ version: 0.1.22
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.1.21
40
+ version: 0.1.22
41
41
  description: Synthesize and play beep sounds.
42
42
  email: xordog@gmail.com
43
43
  executables: []