msd-fretboard 0.0.6 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/README +46 -0
  2. data/Rakefile +42 -0
  3. data/bin/fb +1 -2
  4. data/lib/fretboard.rb +19 -6
  5. metadata +35 -9
data/README ADDED
@@ -0,0 +1,46 @@
1
+ #
2
+ # = Fretboard -- class to be used to learn the guitar fretboard
3
+ #
4
+ # == Synopsis
5
+ #
6
+ # This program provides configurable drilling sessions for learning
7
+ # the notes on the guitar fretboard. Currently, the range of frets
8
+ # is constrained to only the first twelve. Also, only the standard
9
+ # EADGBE tuning is supported by default but is easily changed in the
10
+ # code.
11
+ #
12
+ # == Examples
13
+ #
14
+ # The following command invocation drills the user on only the first
15
+ # two strings (E and B):
16
+ # fretboard -s 1:2
17
+ #
18
+ # The following command invocation constrains drilling to strings
19
+ # 3 and 4 for only frets 7 through 12:
20
+ # fretboard -s 3:4 -f 7:12
21
+ #
22
+ # == Usage
23
+ # See Options below.
24
+ #
25
+ # For help use: fretboard --help
26
+ #
27
+ # == Options
28
+ # -h, --help Display help message
29
+ # -t, --timeout SECONDS Set timeout on user response
30
+ # -f MIN[:MAX] Set fret number(s) to drill
31
+ # (default 0-12)
32
+ # -s MIN[:MAX] Set string number(s) to drill
33
+ # (default 1-6)
34
+ # -d, --display [flat|sharp] Show fretboard
35
+ # -l, --log LOGFILE Log session score to LOGFILE
36
+ # -v, --version Show version
37
+ #
38
+ # == Author
39
+ # Mark DeWandel mailto:mark.dewandel@gmail.com
40
+ #
41
+ # == Copyright
42
+ # Copyright (c) 2009 Mark DeWandel.
43
+ #
44
+ # This is free software; you can redistribute it and/or modify it under
45
+ # the terms of the GNU General Public License Version 2 as published by
46
+ # the Free Software Foundation: www.gnu.org/copyleft/gpl.html
data/Rakefile ADDED
@@ -0,0 +1,42 @@
1
+ require 'rake'
2
+
3
+ begin
4
+ require 'jeweler'
5
+ Jeweler::Tasks.new do |gem|
6
+ gem.name = "fretboard"
7
+ gem.summary = "Program for learning the guitar fretboard"
8
+ gem.email = "mark.dewandel@gmail.com"
9
+ gem.homepage = "http://msd.github.com"
10
+ # gem.extra_rdoc_files = FileList["README", "COPYING"]
11
+ gem.authors = ["Mark DeWandel"]
12
+ gem.files = FileList['lib/fretboard.rb', 'bin/fb', 'Rakefile',
13
+ 'README', 'COPYING', 'doc/**/*']
14
+ gem.executables = ['fb']
15
+ gem.email = "mark.dewandel@gmail.com"
16
+ gem.homepage = "http://msd.github.com"
17
+ gem.has_rdoc = true
18
+ # gem.test_files = FileList['tests/**/*']
19
+ # gem.version = '0.0.7'
20
+ gem.add_dependency("term-ansicolor")
21
+ end
22
+ rescue LoadError
23
+ puts "Jeweler, or one of its dependencies, is not available."
24
+ puts "Install it with: sudo gem install technicalpickles-jeweler"
25
+ puts " -s http://gems.github.com"
26
+ end
27
+
28
+ require 'rake/testtask'
29
+ desc "Run basic tests"
30
+ Rake::TestTask.new('test') do |t|
31
+ t.pattern = 'test/**/test_*.rb'
32
+ t.warning = true
33
+ end
34
+
35
+ require 'rake/rdoctask'
36
+ desc "Build RDOC documentation"
37
+ Rake::RDocTask.new('rdoc') do |t|
38
+ t.rdoc_dir = 'doc'
39
+ t.rdoc_files.include('README', 'lib/**/*.rb')
40
+ t.main = 'README'
41
+ t.title = "PlayingCards API documentation"
42
+ end
data/bin/fb CHANGED
@@ -7,5 +7,4 @@
7
7
  require 'fretboard'
8
8
 
9
9
  opts = Fretboard::parse_args(ARGV)
10
- f = Fretboard.new(opts)
11
- f.run
10
+ Fretboard.new(opts).run
data/lib/fretboard.rb CHANGED
@@ -45,15 +45,29 @@ require 'optparse'
45
45
  require 'timeout'
46
46
  require 'pp'
47
47
 
48
- require 'rubygems'
49
- require 'term/ansicolor'
50
- include Term::ANSIColor
48
+ begin
49
+ require 'rubygems'
50
+ require 'term/ansicolor'
51
+ include Term::ANSIColor
52
+ rescue LoadError
53
+ def green(args)
54
+ args
55
+ end
56
+
57
+ def red(args)
58
+ args
59
+ end
60
+
61
+ def bold(args)
62
+ args
63
+ end
64
+ end
51
65
 
52
66
  # Fretboard class for learning the guitar fretboard.
53
67
  class Fretboard
54
68
  FRETS = 12
55
69
  STRINGS = 6
56
- VERSION = '0.0.6'
70
+ VERSION = '0.0.7'
57
71
 
58
72
  def self.display_version
59
73
  puts "#{File.basename(__FILE__)} version #{VERSION}"
@@ -302,6 +316,5 @@ end
302
316
 
303
317
  if $0 == __FILE__
304
318
  opts = Fretboard::parse_args(ARGV)
305
- f = Fretboard.new(opts)
306
- f.run
319
+ Fretboard.new(opts).run
307
320
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: msd-fretboard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark DeWandel
@@ -9,8 +9,8 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-02-13 00:00:00 -08:00
13
- default_executable:
12
+ date: 2009-02-27 00:00:00 -08:00
13
+ default_executable: fb
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: term-ansicolor
@@ -31,14 +31,40 @@ extensions: []
31
31
  extra_rdoc_files: []
32
32
 
33
33
  files:
34
- - COPYING
35
- - bin/fb
36
34
  - lib/fretboard.rb
37
- has_rdoc: false
38
- homepage:
35
+ - bin/fb
36
+ - Rakefile
37
+ - README
38
+ - COPYING
39
+ - doc/files
40
+ - doc/files/README.html
41
+ - doc/files/lib
42
+ - doc/files/lib/fretboard_rb.html
43
+ - doc/files/lib/fretboard_rb.src
44
+ - doc/files/lib/fretboard_rb.src/M000001.html
45
+ - doc/files/lib/fretboard_rb.src/M000002.html
46
+ - doc/files/lib/fretboard_rb.src/M000003.html
47
+ - doc/fr_class_index.html
48
+ - doc/rdoc-style.css
49
+ - doc/classes
50
+ - doc/classes/Fretboard.html
51
+ - doc/classes/Fretboard.src
52
+ - doc/classes/Fretboard.src/M000004.html
53
+ - doc/classes/Fretboard.src/M000010.html
54
+ - doc/classes/Fretboard.src/M000008.html
55
+ - doc/classes/Fretboard.src/M000005.html
56
+ - doc/classes/Fretboard.src/M000006.html
57
+ - doc/classes/Fretboard.src/M000007.html
58
+ - doc/fr_method_index.html
59
+ - doc/created.rid
60
+ - doc/fr_file_index.html
61
+ - doc/index.html
62
+ has_rdoc: true
63
+ homepage: http://msd.github.com
39
64
  post_install_message:
40
- rdoc_options: []
41
-
65
+ rdoc_options:
66
+ - --inline-source
67
+ - --charset=UTF-8
42
68
  require_paths:
43
69
  - lib
44
70
  required_ruby_version: !ruby/object:Gem::Requirement