feep 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/bin/feep +20 -10
  4. data/lib/feep/version.rb +1 -1
  5. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 682ebfe9341f8da31c751f408e461391443d9d65
4
- data.tar.gz: 0bc71769e2958d9b6ec49954b32df5656f2945eb
3
+ metadata.gz: ad44164b261eb318f20f3e1fc3c44528f5f18552
4
+ data.tar.gz: 3f0905a2d7fc561454920e73d911d20f15cc25d5
5
5
  SHA512:
6
- metadata.gz: 43ea180fe723e0352fe84bb6998f572c759127d3f7206312811be494d1bf97d8c64ca065d99450938b0f086e68fc2c9970e8223a34038cb39dea47a57de6be56
7
- data.tar.gz: dcd085f39f80a1291341d50a5e3d3799b30fbf144af618245f07fd9b6b0b0be3d6be1eafb79721a4bad85a62f0b8d1acfafb08f19e8573073f140de19652a299
6
+ metadata.gz: af5021622f750a39e7609645ff117bcf30bbd85d0d63b88cc956fab9b6cce185522f74a92588e0ac898b81f1a24a2a766ce71fc14ac66900d0a036cdcf5a62e0
7
+ data.tar.gz: a8c86f5474b26d368d1dd633749d5f9416969ecbf2bd109c2566e8c099601bc51a609c2437bbbb86afbc0b6a0a68bce1336a5515af2709fcfce9305e10bf2b56
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- feep (0.1.1)
4
+ feep (0.1.4)
5
5
  os (~> 0.9, >= 0.9.6)
6
6
  wavefile (= 0.6.0)
7
7
 
@@ -75,4 +75,4 @@ DEPENDENCIES
75
75
  rubocop (~> 0.29)
76
76
 
77
77
  BUNDLED WITH
78
- 1.10.3
78
+ 1.13.1
data/bin/feep CHANGED
@@ -1,33 +1,43 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'optparse'
4
- require 'pry'
5
4
 
6
5
  require_relative '../lib/feep'
7
6
  require_relative '../lib/feep/version'
8
7
 
9
8
  def parse_options
10
- options = {:freq_or_note => '440.000', :scale => nil, :waveform => 'sine', :volume => 0.5, :duration => 100, :save => false, :loud => false, :notext => false, :usage => nil}
9
+ options = {
10
+ :freq_or_note => '440.000',
11
+ :scale => nil,
12
+ :waveform => 'sine',
13
+ :volume => 0.5,
14
+ :duration => 100,
15
+ :save => false,
16
+ :loud => false,
17
+ :notext => false,
18
+ :usage => nil
19
+ }
11
20
 
12
21
  optparse = OptionParser.new do |opts|
13
- opts.banner = 'usage: feep [-f, -n, --frequency, --note FREQUENCY|NOTE_NAME] [-s, --scale SCALE_ID] [-sd, --degrees NUMBER_OF_SCALE_DEGREES] [-w, --waveform WAVEFORM_ID] [-a, --amplitude MAX_AMPLITUDE] [-d, --duration DURATION] [--save] [--loud] [--notext]'
22
+ opts.banner = "Play sounds on the command line\n"
23
+ opts.banner += "usage: feep [-f, -n, --frequency, --note FREQUENCY|NOTE_NAME] [-s, --scale SCALE_ID] [-sd, --degrees NUMBER_OF_SCALE_DEGREES] [-w, --waveform WAVEFORM_ID] [-a, --amplitude MAX_AMPLITUDE] [-d, --duration DURATION] [--save] [--loud] [--notext]\n\n"
14
24
 
15
25
  opts.on('-f', '--frequency FREQUENCY', 'One or more frequencies or to play at once, e.g. 440 or 220,440,880') do |frequency|
16
26
  options[:freq_or_note] = frequency
17
27
  end
18
-
28
+
19
29
  opts.on('-n', '--note NOTE_NAME', 'One or more note names to play at once, e.g. A4 or A4,C5,E5') do |note|
20
30
  options[:freq_or_note] = note
21
31
  end
22
-
32
+
23
33
  opts.on('-s', '--scale SCALE_ID', 'Name of a scale to play') do |scale_id|
24
34
  options[:scale] = scale_id
25
35
  end
26
-
36
+
27
37
  opts.on('--degrees SCALE_DEGREES', 'Number of degrees of the scale to play') do |degrees|
28
38
  options[:degrees] = degrees
29
39
  end
30
-
40
+
31
41
  opts.on('-w', '--waveform WAVEFORM', 'Waveform type to use for the sound') do |waveform|
32
42
  options[:waveform] = waveform
33
43
  end
@@ -35,7 +45,7 @@ def parse_options
35
45
  opts.on('-a', '--amplitude MAX_AMPLITUDE', 'Amplitude/volume (0.0 - 1.0) to play the sound(s) at') do |amplitude|
36
46
  options[:volume] = amplitude.to_f
37
47
  end
38
-
48
+
39
49
  opts.on('-d', '--duration DURATION', 'Duration in ms to play the sound(s)') do |duration|
40
50
  options[:duration] = duration.to_i
41
51
  end
@@ -43,11 +53,11 @@ def parse_options
43
53
  opts.on('--save', 'Save the resulting WAV file in the current directory') do
44
54
  options[:save] = true
45
55
  end
46
-
56
+
47
57
  opts.on('--loud', 'Displays information about note(s) being played') do
48
58
  options[:loud] = true
49
59
  end
50
-
60
+
51
61
  opts.on('--notext', 'No "Feeep!" text on play') do
52
62
  options[:notext] = true
53
63
  end
@@ -1,3 +1,3 @@
1
1
  module Feep
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: feep
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Chadwick
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-25 00:00:00.000000000 Z
11
+ date: 2016-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: wavefile
@@ -159,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
159
159
  version: '0'
160
160
  requirements: []
161
161
  rubyforge_project:
162
- rubygems_version: 2.4.8
162
+ rubygems_version: 2.6.6
163
163
  signing_key:
164
164
  specification_version: 4
165
165
  summary: Make your computer feep with Ruby