Skip to content

Commit

Permalink
Merge pull request #45 from arirusso/0.5.1
Browse files Browse the repository at this point in the history
0.5.1
  • Loading branch information
arirusso authored Feb 18, 2022
2 parents 8372819 + cc1d930 commit 9afb7ff
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 18 deletions.
9 changes: 4 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# frozen_string_literal: true

source 'https://rubygems.org'

gem 'rake', '~> 13.0', '>= 13.0.6', groups: %i[development test]
gem 'rspec', '~> 3.11', '>= 3.11.0', groups: %i[test]
gem 'rubocop', '~> 1.25', '>= 1.25.1', groups: %i[development test]
gem 'rubocop', '~> 1.10', '>= 1.10.0', groups: %i[development test], require: false

gem 'alsa-rawmidi', '~> 0.3', '>= 0.3.1', require: false # linux
gem 'ffi-coremidi', '~> 0.5', '>= 0.5.0', require: false # osx
gem 'midi-jruby', '~> 0.1', '>= 0.1.4', require: false # jruby
gem 'alsa-rawmidi', '~> 0.4', '>= 0.4.0', require: false # linux
gem 'ffi-coremidi', '~> 0.5', '>= 0.5.1', require: false # osx
gem 'midi-jruby', '~> 0.2', '>= 0.2.0', require: false # jruby
gem 'midi-winmm', '~> 0.1', '>= 0.1.10', require: false # windows
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ Also see [MicroMIDI](http://github.com/arirusso/micromidi) which builds a full M

### Requirements

Using Ruby 1.9.2 or JRuby 1.6.1 (or newer) is strongly recommended. JRuby should be run in 1.9 mode where applicable

UniMIDI uses one of the following libraries, depending on which platform you're using it on. The necessary library should install automatically with the unimidi gem.

Platform
Expand Down Expand Up @@ -57,7 +55,7 @@ UniMIDI includes a set of tests which assume that an output is connected to an i

The tests can be run using

`rake test`
`rake spec`

See below for additional notes on testing with JRuby

Expand All @@ -69,7 +67,6 @@ See below for additional notes on testing with JRuby

##### JRuby

* You must be in 1.9 mode. This is normally accomplished by passing --1.9 to JRuby at the command line. For testing in 1.9 mode, use `jruby --1.9 -S rake test`
* javax.sound has some documented issues with SysEx messages in some versions OSX Snow Leopard which do affect this library.

##### Linux
Expand Down
2 changes: 1 addition & 1 deletion lib/unimidi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
require 'unimidi/output'

module UniMIDI
VERSION = '0.5.0'
VERSION = '0.5.1'

Platform.bootstrap
end
1 change: 0 additions & 1 deletion lib/unimidi/adapter/alsa-rawmidi.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# frozen_string_literal: true

require 'alsa-rawmidi'

module UniMIDI
Expand Down
2 changes: 1 addition & 1 deletion spec/integration/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module Integration
module_function

def sysex_ok?
ENV['_system_name'] != 'OSX' || !RUBY_PLATFORM.include?('java')
!RUBY_PLATFORM.include?('java') || RbConfig::CONFIG["host_os"] != 'darwin'
end

def devices
Expand Down
4 changes: 2 additions & 2 deletions spec/integration/input_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
let(:output) { SpecHelper::Integration.devices[:output].open }
let(:messages) { SpecHelper::Integration.numeric_messages }
before do
sleep 0.1
sleep 0.3
input.buffer.clear
end

Expand All @@ -24,7 +24,7 @@
p "sending: #{message}"
output.puts(message)
sent_bytes += message
sleep 0.1
sleep 0.3
buffer = input.buffer.map { |m| m[:data] }.flatten
p "received: #{buffer}"
expect(buffer).to eq(sent_bytes)
Expand Down
11 changes: 7 additions & 4 deletions spec/integration/io_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
# these tests assume that TestOutput is connected to TestInput
let(:input) { SpecHelper::Integration.devices[:input].open }
let(:output) { SpecHelper::Integration.devices[:output].open }

before do
sleep 0.3
input.buffer.clear
end
after do
input.close
output.close
Expand All @@ -23,7 +26,7 @@
p "sending: #{message}"

output.puts(message)
sleep(0.1)
sleep 0.3
received = input.gets.map { |m| m[:data] }.flatten

p "received: #{received}"
Expand All @@ -46,7 +49,7 @@
p "sending: #{message}"

output.puts(message)
sleep(0.1)
sleep 0.3
received = input.gets_bytestr.map { |m| m[:data] }.flatten.join
p "received: #{received}"

Expand All @@ -69,7 +72,7 @@
p "sending: #{message.inspect}"

output.puts(message)
sleep(0.1)
sleep 0.3
received = input.gets.map { |m| m[:data] }.flatten

p "received: #{received}"
Expand Down

0 comments on commit 9afb7ff

Please sign in to comment.