midiator 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +40 -0
- data/LICENSE +22 -0
- data/LICENSE.prp +22 -0
- data/Manifest.txt +32 -0
- data/README.md +53 -0
- data/Rakefile +18 -0
- data/examples/a_little_end_music.rb +944 -0
- data/lib/midiator.rb +1 -1
- data/spec/driver_registry_spec.rb +1 -1
- data/spec/driver_spec.rb +1 -1
- data/spec/interface_spec.rb +3 -3
- data/spec/string_extensions_spec.rb +1 -1
- metadata +117 -38
- data/misc/rake/packaging.rb +0 -52
- data/misc/rake/rdoc.rb +0 -40
- data/misc/rake/testing.rb +0 -32
data/lib/midiator.rb
CHANGED
data/spec/driver_spec.rb
CHANGED
data/spec/interface_spec.rb
CHANGED
@@ -17,7 +17,7 @@
|
|
17
17
|
# This code released under the terms of the MIT license.
|
18
18
|
#
|
19
19
|
|
20
|
-
require
|
20
|
+
require 'midiator'
|
21
21
|
|
22
22
|
describe MIDIator::Interface do
|
23
23
|
before( :each ) do
|
@@ -72,8 +72,8 @@ describe MIDIator::Interface do
|
|
72
72
|
@interface.should_receive( :require ).with( path )
|
73
73
|
|
74
74
|
# stub out the rest of #use
|
75
|
-
Object.should_receive( :module_eval ).and_return(
|
76
|
-
mock( 'foo'
|
75
|
+
Object.should_receive( :module_eval ).and_return(
|
76
|
+
mock( 'foo' ).as_null_object
|
77
77
|
)
|
78
78
|
|
79
79
|
@interface.use( @driver_name )
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# This code released under the terms of the MIT license.
|
15
15
|
#
|
16
16
|
|
17
|
-
require
|
17
|
+
require 'midiator'
|
18
18
|
|
19
19
|
describe "MIDIator's extensions to Ruby's String class" do
|
20
20
|
it "converts under_scored strings to CamelCase" do
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: midiator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 21
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 3
|
9
|
+
- 3
|
10
|
+
version: 0.3.3
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Ben Bleything
|
@@ -9,32 +15,106 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date:
|
18
|
+
date: 2010-11-13 00:00:00 -06:00
|
13
19
|
default_executable:
|
14
20
|
dependencies:
|
15
21
|
- !ruby/object:Gem::Dependency
|
16
22
|
name: Platform
|
17
|
-
|
18
|
-
|
19
|
-
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
20
26
|
requirements:
|
21
27
|
- - ">="
|
22
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 15
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
- 4
|
33
|
+
- 0
|
23
34
|
version: 0.4.0
|
24
|
-
|
25
|
-
|
26
|
-
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: rubyforge
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 7
|
46
|
+
segments:
|
47
|
+
- 2
|
48
|
+
- 0
|
49
|
+
- 4
|
50
|
+
version: 2.0.4
|
51
|
+
type: :development
|
52
|
+
version_requirements: *id002
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: rspec
|
55
|
+
prerelease: false
|
56
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
hash: 11
|
62
|
+
segments:
|
63
|
+
- 2
|
64
|
+
- 1
|
65
|
+
- 0
|
66
|
+
version: 2.1.0
|
67
|
+
type: :development
|
68
|
+
version_requirements: *id003
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: hoe
|
71
|
+
prerelease: false
|
72
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
hash: 19
|
78
|
+
segments:
|
79
|
+
- 2
|
80
|
+
- 6
|
81
|
+
- 2
|
82
|
+
version: 2.6.2
|
83
|
+
type: :development
|
84
|
+
version_requirements: *id004
|
85
|
+
description: |-
|
86
|
+
A nice Ruby interface to your system's MIDI services.
|
87
|
+
|
88
|
+
MIDIator was inspired by Topher Cyll's fantastic Practical Ruby Projects
|
89
|
+
book. In it, Topher describes how to interact with the MIDI providers
|
90
|
+
in OSX, Linux, and Windows. As I was reading the book, I noticed some
|
91
|
+
things I would do differently, which got me thinking that maybe it
|
92
|
+
would be valuable to package up my modifications to the book's code and
|
93
|
+
release it as a gem.
|
94
|
+
email:
|
95
|
+
- ben@bleything.net
|
27
96
|
executables: []
|
28
97
|
|
29
98
|
extensions: []
|
30
99
|
|
31
|
-
extra_rdoc_files:
|
32
|
-
|
100
|
+
extra_rdoc_files:
|
101
|
+
- Manifest.txt
|
33
102
|
files:
|
34
|
-
-
|
35
|
-
-
|
36
|
-
-
|
37
|
-
-
|
103
|
+
- CHANGELOG.md
|
104
|
+
- LICENSE
|
105
|
+
- LICENSE.prp
|
106
|
+
- Manifest.txt
|
107
|
+
- README.md
|
108
|
+
- Rakefile
|
109
|
+
- examples/a_little_end_music.rb
|
110
|
+
- examples/amen_break.rb
|
111
|
+
- examples/chords.rb
|
112
|
+
- examples/chromatic_scale.rb
|
113
|
+
- examples/drum_chords.rb
|
114
|
+
- examples/metronome.rb
|
115
|
+
- examples/synth.rb
|
116
|
+
- examples/twinkle.rb
|
117
|
+
- lib/midiator.rb
|
38
118
|
- lib/midiator/driver.rb
|
39
119
|
- lib/midiator/driver_registry.rb
|
40
120
|
- lib/midiator/drivers/alsa.rb
|
@@ -47,46 +127,45 @@ files:
|
|
47
127
|
- lib/midiator/interface.rb
|
48
128
|
- lib/midiator/notes.rb
|
49
129
|
- lib/midiator/timer.rb
|
50
|
-
- lib/midiator.rb
|
51
130
|
- lib/string_extensions.rb
|
52
|
-
-
|
53
|
-
-
|
54
|
-
-
|
55
|
-
-
|
56
|
-
- examples/metronome.rb
|
57
|
-
- examples/synth.rb
|
58
|
-
- examples/twinkle.rb
|
59
|
-
- misc/rake/packaging.rb
|
60
|
-
- misc/rake/rdoc.rb
|
61
|
-
- misc/rake/testing.rb
|
131
|
+
- spec/driver_registry_spec.rb
|
132
|
+
- spec/driver_spec.rb
|
133
|
+
- spec/interface_spec.rb
|
134
|
+
- spec/string_extensions_spec.rb
|
62
135
|
has_rdoc: true
|
63
|
-
homepage: http://
|
64
|
-
|
65
|
-
rdoc_options: []
|
136
|
+
homepage: http://github.com/bleything/midiator
|
137
|
+
licenses: []
|
66
138
|
|
139
|
+
post_install_message:
|
140
|
+
rdoc_options:
|
141
|
+
- --main
|
142
|
+
- README.md
|
67
143
|
require_paths:
|
68
144
|
- lib
|
69
145
|
required_ruby_version: !ruby/object:Gem::Requirement
|
146
|
+
none: false
|
70
147
|
requirements:
|
71
148
|
- - ">="
|
72
149
|
- !ruby/object:Gem::Version
|
150
|
+
hash: 3
|
151
|
+
segments:
|
152
|
+
- 0
|
73
153
|
version: "0"
|
74
|
-
version:
|
75
154
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
155
|
+
none: false
|
76
156
|
requirements:
|
77
157
|
- - ">="
|
78
158
|
- !ruby/object:Gem::Version
|
159
|
+
hash: 3
|
160
|
+
segments:
|
161
|
+
- 0
|
79
162
|
version: "0"
|
80
|
-
version:
|
81
163
|
requirements: []
|
82
164
|
|
83
165
|
rubyforge_project: midiator
|
84
|
-
rubygems_version: 1.3.
|
166
|
+
rubygems_version: 1.3.7
|
85
167
|
signing_key:
|
86
|
-
specification_version:
|
87
|
-
summary:
|
88
|
-
test_files:
|
89
|
-
|
90
|
-
- spec/driver_spec.rb
|
91
|
-
- spec/interface_spec.rb
|
92
|
-
- spec/string_extensions_spec.rb
|
168
|
+
specification_version: 3
|
169
|
+
summary: A nice Ruby interface to your system's MIDI services
|
170
|
+
test_files: []
|
171
|
+
|
data/misc/rake/packaging.rb
DELETED
@@ -1,52 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# Rake tasks related to packaging.
|
4
|
-
#
|
5
|
-
# == Authors
|
6
|
-
#
|
7
|
-
# * Ben Bleything <ben@bleything.net>
|
8
|
-
#
|
9
|
-
# == Copyright
|
10
|
-
#
|
11
|
-
# Copyright (c) 2008 Ben Bleything
|
12
|
-
#
|
13
|
-
# This code released under the terms of the MIT license.
|
14
|
-
#
|
15
|
-
|
16
|
-
require 'midiator'
|
17
|
-
|
18
|
-
require 'rake/packagetask'
|
19
|
-
require 'rake/gempackagetask'
|
20
|
-
|
21
|
-
### Task: gem
|
22
|
-
gemspec = Gem::Specification.new do |gem|
|
23
|
-
gem.name = "midiator"
|
24
|
-
gem.version = MIDIator::VERSION
|
25
|
-
|
26
|
-
gem.summary = "MIDIator - A a nice Ruby interface to your system's MIDI services."
|
27
|
-
gem.description = "MIDIator provides an OS-agnostic way to send live MIDI messages to " +
|
28
|
-
"your machine's MIDI playback system."
|
29
|
-
|
30
|
-
gem.authors = "Ben Bleything"
|
31
|
-
gem.email = "ben@bleything.net"
|
32
|
-
gem.homepage = "http://projects.bleything.net/projects/show/midiator"
|
33
|
-
|
34
|
-
gem.rubyforge_project = 'midiator'
|
35
|
-
|
36
|
-
gem.has_rdoc = true
|
37
|
-
|
38
|
-
gem.files = RELEASE_FILES.
|
39
|
-
collect {|f| f.relative_path_from(BASE_DIR).to_s }
|
40
|
-
gem.test_files = SPEC_FILES.
|
41
|
-
collect {|f| f.relative_path_from(BASE_DIR).to_s }
|
42
|
-
|
43
|
-
gem.add_dependency 'Platform', [">= 0.4.0"]
|
44
|
-
end
|
45
|
-
|
46
|
-
Rake::GemPackageTask.new( gemspec ) do |task|
|
47
|
-
task.gem_spec = gemspec
|
48
|
-
task.need_tar = false
|
49
|
-
task.need_tar_gz = true
|
50
|
-
task.need_tar_bz2 = true
|
51
|
-
task.need_zip = true
|
52
|
-
end
|
data/misc/rake/rdoc.rb
DELETED
@@ -1,40 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# Rake tasks for generating rdoc
|
4
|
-
#
|
5
|
-
# == Authors
|
6
|
-
#
|
7
|
-
# * Ben Bleything <ben@bleything.net>
|
8
|
-
#
|
9
|
-
# == Copyright
|
10
|
-
#
|
11
|
-
# Copyright (c) 2008 Ben Bleything
|
12
|
-
#
|
13
|
-
# This code released under the terms of the MIT license.
|
14
|
-
#
|
15
|
-
|
16
|
-
require 'rake/rdoctask'
|
17
|
-
|
18
|
-
# uncomment for hanna!
|
19
|
-
# gem 'mislav-hanna'
|
20
|
-
# require 'hanna'
|
21
|
-
|
22
|
-
### Task: rdoc
|
23
|
-
Rake::RDocTask.new do |rdoc|
|
24
|
-
rdoc.rdoc_dir = 'docs/rdoc'
|
25
|
-
rdoc.title = "MIDIator - a nice Ruby interface to your system's MIDI services."
|
26
|
-
|
27
|
-
rdoc.options += [
|
28
|
-
'-w', '4',
|
29
|
-
'-SHNa',
|
30
|
-
'-i', BASE_DIR.to_s,
|
31
|
-
# '-T', 'hanna', # uncomment for hanna!
|
32
|
-
'-m', 'README',
|
33
|
-
'-W', 'http://projects.bleything.net/repositories/changes/midiator/',
|
34
|
-
]
|
35
|
-
|
36
|
-
rdoc.rdoc_files.include 'README'
|
37
|
-
rdoc.rdoc_files.include 'LICENSE'
|
38
|
-
rdoc.rdoc_files.include 'LICENSE.prp'
|
39
|
-
rdoc.rdoc_files.include LIB_FILES.collect {|f| f.relative_path_from(BASE_DIR).to_s }
|
40
|
-
end
|
data/misc/rake/testing.rb
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
#
|
3
|
-
# Rake tasks related to testing.
|
4
|
-
#
|
5
|
-
# == Authors
|
6
|
-
#
|
7
|
-
# * Ben Bleything <ben@bleything.net>
|
8
|
-
#
|
9
|
-
# == Copyright
|
10
|
-
#
|
11
|
-
# Copyright (c) 2008 Ben Bleything
|
12
|
-
#
|
13
|
-
# This code released under the terms of the MIT license.
|
14
|
-
#
|
15
|
-
|
16
|
-
require 'spec/rake/spectask'
|
17
|
-
|
18
|
-
desc "Run the RSpec suite"
|
19
|
-
Spec::Rake::SpecTask.new( :spec ) do |r|
|
20
|
-
r.libs = SPEC_FILES
|
21
|
-
r.spec_opts = %w(--format specdoc --color)
|
22
|
-
end
|
23
|
-
|
24
|
-
namespace :spec do
|
25
|
-
### Run the specifications and generate coverage information
|
26
|
-
Spec::Rake::SpecTask.new( :coverage ) do |r|
|
27
|
-
r.rcov = true
|
28
|
-
r.rcov_dir = 'coverage'
|
29
|
-
r.rcov_opts = %w( -x Library\/Ruby,^spec )
|
30
|
-
r.libs = SPEC_FILES
|
31
|
-
end
|
32
|
-
end
|