unimidi 0.2.3-i386-mingw32 → 0.2.4-i386-mingw32

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,7 +11,7 @@ module UniMIDI
11
11
  @device = device_obj
12
12
  @id = @device.id
13
13
  @name = @device.name
14
- @type = @device.type
14
+ populate_type
15
15
  end
16
16
 
17
17
  def enabled?
@@ -119,6 +119,15 @@ module UniMIDI
119
119
  end
120
120
 
121
121
  end
122
+
123
+ private
124
+
125
+ def populate_type
126
+ @type = case @device.type
127
+ when :source, :input then :input
128
+ when :destination, :output then :output
129
+ end
130
+ end
122
131
 
123
132
  end
124
133
 
data/lib/unimidi.rb CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  module UniMIDI
8
8
 
9
- VERSION = "0.2.3"
9
+ VERSION = "0.2.4"
10
10
 
11
11
  end
12
12
 
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'helper'
4
+
5
+ class CongruousApiAdapterTest < Test::Unit::TestCase
6
+
7
+ include UniMIDI
8
+ include TestHelper
9
+
10
+ def test_input_type
11
+ i = $test_device[:input]
12
+ assert_equal(:input, i.type)
13
+ end
14
+
15
+ def test_output_type
16
+ o = $test_device[:output]
17
+ assert_equal(:output, o.type)
18
+ end
19
+
20
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unimidi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  prerelease:
6
6
  platform: i386-mingw32
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-03 00:00:00.000000000Z
12
+ date: 2011-09-08 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: midi-winmm
16
- requirement: &70148241611300 !ruby/object:Gem::Requirement
16
+ requirement: &70229632126520 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70148241611300
24
+ version_requirements: *70229632126520
25
25
  description: Platform Independent, realtime MIDI input and output for Ruby
26
26
  email:
27
27
  - ari.russo@gmail.com
@@ -40,6 +40,7 @@ files:
40
40
  - lib/unimidi/type_conversion.rb
41
41
  - lib/unimidi.rb
42
42
  - test/helper.rb
43
+ - test/test_congruous_api_adapter.rb
43
44
  - test/test_input_buffer.rb
44
45
  - test/test_io.rb
45
46
  - test/test_platform.rb