patch 0.4.13 → 0.4.14

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: 222f130c3489c502fab026e74c0d669a9a84fb43
4
- data.tar.gz: a2a352a10308ee799ea3053606b29229cc523376
3
+ metadata.gz: 40b17b9d6b5e727dc820833191e39eed4436b6eb
4
+ data.tar.gz: 6d51227ecb4d486b7899673db3a4d88630a6ff3a
5
5
  SHA512:
6
- metadata.gz: 0d51314a03aa34d4bdf3ddb9fe42af9315c810bdf72b0d43e636b854e0aa267211a826ebb26f10024a19bf80713d6742999d724a86df10960eb49a5552d9e7d0
7
- data.tar.gz: ba72546ab948910ffe80cf20aa68c64274642fa8e5be8672d522fb4aac5eae4462f2c58af3f5b1130b7e93f267c452bc092295ae3a8fe5bbe4f30b97c9b7040b
6
+ metadata.gz: 525242393d6c58f27a9bd70561b753475c51e168e11ab43f6a54ed4eec807d28674b29457fecf2397158749e1c8b5ea20cd829b767e872eb2bab17ca47416737
7
+ data.tar.gz: b281f5d838d52dad011e1a2773b637113b17622c37fcd8a3b61b246fd05a1c66a4719b8dea07f04a91a177254bdc0be541b42c83a5c9dd12c26beab0ea1ab2ff
data/README.md CHANGED
@@ -14,17 +14,13 @@ Other possibilities:
14
14
  * HTTP
15
15
  * [JSON RPC 2.0](http://en.wikipedia.org/wiki/JSON-RPC)
16
16
 
17
- Patch receives messages in these formats and converts them to a generic `Patch::Message` object.
18
-
19
- At that point, these generic objects can be converted to another one of these formats and sent accordingly.
17
+ Patch can receive messages in these formats and instantly translate and send them to another format.
20
18
 
21
19
  For example:
22
20
 
23
- Patch can receive messages from a MIDI drum machine and relay them to a web API. The web API can then respond with JSON which Patch converts to MIDI and sends back to the drum machine.
24
-
25
- While this particular example can probably be accomplished using other utilities or scripts, Patch makes it possible to receive, merge, split and send different types of messages like this freely in one session.
21
+ Patch receive messages from an OSC controller, and relays them to a web API. The web API in turn responds with JSON that Patch relays to a MIDI synthesizer
26
22
 
27
- By doing so, Patch creates an interface that functions as though devices like that with different control messaging protocols had been designed to control each other.
23
+ While this particular example can probably be accomplished using other specialized utilities or scripts, Patch makes it possible to receive, merge, split and send different types of messages like this in a general way, with much less configuration
28
24
 
29
25
  ## Usage
30
26
 
data/lib/patch.rb CHANGED
@@ -37,6 +37,6 @@ require "patch/em_patch"
37
37
 
38
38
  module Patch
39
39
 
40
- VERSION = "0.4.13"
40
+ VERSION = "0.4.14"
41
41
 
42
42
  end
@@ -91,6 +91,26 @@ class Patch::IO::Websocket::NodeTest < Minitest::Test
91
91
 
92
92
  end
93
93
 
94
+ context "#ensure_socket" do
95
+
96
+ setup do
97
+ socket = Object.new
98
+ socket.expects(:on_message).once
99
+ socket.expects(:start).once
100
+ Patch::IO::Websocket::Socket.expects(:new).once.returns(socket)
101
+ assert_nil @server.instance_variable_get("@socket")
102
+ end
103
+
104
+ teardown do
105
+ Patch::IO::Websocket::Socket.unstub(:new)
106
+ end
107
+
108
+ should "convert message to json" do
109
+ assert @server.listen(@patches.first) { puts "hello" }
110
+ end
111
+
112
+ end
113
+
94
114
  end
95
115
 
96
116
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: patch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.13
4
+ version: 0.4.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ari Russo