midi-message 0.4.5 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 33e3e855ef83585302fda5a2b7f332254b089c9f
4
- data.tar.gz: d130122274fa395bd8939da501ac735c75f9b1ee
3
+ metadata.gz: 3524480addf08fbff3d0ff0895a035b24cebf1d8
4
+ data.tar.gz: 83faadad1ad868779a0a22354d1dc877d4ec5d4e
5
5
  SHA512:
6
- metadata.gz: 78bd93128dae08a2f2367028f9e6fd38442919777d17b7445b8a8a16e8310f39f291a904a5ebd394bac90245abdb681c28d580e20badf7ef44274219d5959a55
7
- data.tar.gz: b96b8747c8582d448a991f37f9fe34f7b9f66af4644892bd449267e083eefb9ceb8a1b302d7d74ff4af1870bc64b868614736dd8691e887399fd918bfef8b21a
6
+ metadata.gz: b9aeefc9a4b4dd10e1a9cb42771ca5266fe90cf461654694b0aba55415178da6ec26c1b3c04c5bbc085417be2c4f6cd3d0a0f30046b09329079ead357f6cd971
7
+ data.tar.gz: ab692acd6ec98d41c5b9c538f59dc0159a1431c977bf7dd738ce452e07fa05b726cfc075dcccceda3a393024996bc6d6fa5351d53171aec8e75596f5a40390fe
@@ -151,7 +151,7 @@ module MIDIMessage
151
151
  {
152
152
  :const => const,
153
153
  :name => const.key,
154
- :verbose_name => "#{message.class.display_name}: #{@name}"
154
+ :verbose_name => "#{message.class.display_name}: #{const.key}"
155
155
  }
156
156
  end
157
157
  end
@@ -32,7 +32,7 @@ module MIDIMessage
32
32
  # The name of the note without its octave e.g. F#
33
33
  # @return [String]
34
34
  def note_name
35
- name.split(/-?\d\z/).first
35
+ name.split(/-?\d\z/).first unless name.nil?
36
36
  end
37
37
 
38
38
  end
data/lib/midi-message.rb CHANGED
@@ -25,6 +25,6 @@ require "midi-message/parser"
25
25
 
26
26
  module MIDIMessage
27
27
 
28
- VERSION = "0.4.5"
28
+ VERSION = "0.4.6"
29
29
 
30
30
  end
@@ -7,14 +7,16 @@ class ConstantsTest < Minitest::Test
7
7
  assert_equal(MIDIMessage::NoteOn, msg.class)
8
8
  assert_equal("C3", msg.name)
9
9
  assert_equal("C", msg.note_name)
10
+ assert_equal("Note On: C3", msg.verbose_name)
10
11
  assert_equal([0x90, 0x30, 100], msg.to_a)
11
12
  end
12
13
 
13
- def test_control_change
14
- msg = MIDIMessage::NoteOn["C3"].new(0, 100)
15
- assert_equal(MIDIMessage::NoteOn, msg.class)
16
- assert_equal("C3", msg.name)
17
- assert_equal([0x90, 0x30, 100], msg.to_a)
14
+ def test_note_off
15
+ msg = MIDIMessage::NoteOff["C2"].new(0, 100)
16
+ assert_equal(MIDIMessage::NoteOff, msg.class)
17
+ assert_equal("C2", msg.name)
18
+ assert_equal("Note Off: C2", msg.verbose_name)
19
+ assert_equal([0x80, 0x24, 100], msg.to_a)
18
20
  end
19
21
 
20
22
  def test_control_change
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: midi-message
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.5
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ari Russo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-03 00:00:00.000000000 Z
11
+ date: 2015-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest