jstp 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'singleton'
2
3
  require 'em-websocket'
3
4
  require 'em-websocket-client'
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module JSTP
2
3
  module API
3
4
  def dispatch *args, &block
@@ -10,4 +11,4 @@ module JSTP
10
11
  end
11
12
  end
12
13
  end
13
- end
14
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module JSTP
2
3
 
3
4
  # Handles the connection functionality for this JSTP reference implementation
@@ -25,4 +26,4 @@ module JSTP
25
26
  ::EventMachine::WebSocket.start host: "0.0.0.0", port: 33333, &JSTP::Server
26
27
  end
27
28
  end
28
- end
29
+ end
@@ -1,7 +1,8 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module JSTP
2
3
  module Event
3
4
  OnMessage = proc { |message|
4
5
  JSTP::Registry.instance.get.call JSON.parse message
5
6
  }
6
7
  end
7
- end
8
+ end
@@ -1,5 +1,6 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module JSTP
2
3
  EventMachine = proc {
3
4
  JSTP::Connector.instance.server
4
5
  }
5
- end
6
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module JSTP
2
3
  class Registry
3
4
  include Singleton
@@ -10,4 +11,4 @@ module JSTP
10
11
  @block
11
12
  end
12
13
  end
13
- end
14
+ end
@@ -1,5 +1,6 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module JSTP
2
3
  Server = proc { |websocket|
3
4
  websocket.onmessage &Event::OnMessage
4
5
  }
5
- end
6
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  module Jstp
2
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
3
4
  end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'spec_helper'
2
3
 
3
4
  describe JSTP::API do
@@ -37,4 +38,4 @@ describe JSTP::API do
37
38
  describe '#port' do
38
39
  it 'should configure the port number'
39
40
  end
40
- end
41
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'spec_helper'
2
3
 
3
4
  describe JSTP::Connector do
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'spec_helper'
2
3
 
3
4
  describe 'JSTP::Event::OnMessage' do
@@ -17,4 +18,4 @@ describe 'JSTP::Event::OnMessage' do
17
18
 
18
19
  JSTP::Event::OnMessage.call @message
19
20
  end
20
- end
21
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'spec_helper'
2
3
 
3
4
  describe 'JSTP::EventMachine' do
@@ -6,4 +7,4 @@ describe 'JSTP::EventMachine' do
6
7
 
7
8
  JSTP::EventMachine.call
8
9
  end
9
- end
10
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'spec_helper'
2
3
 
3
4
  describe JSTP::Registry do
@@ -20,4 +21,4 @@ describe JSTP::Registry do
20
21
  JSTP::Registry.instance.get.should == @data
21
22
  end
22
23
  end
23
- end
24
+ end
@@ -1,3 +1,4 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'spec_helper'
2
3
 
3
4
  describe 'JSTP::Server' do
@@ -10,4 +11,4 @@ describe 'JSTP::Server' do
10
11
 
11
12
  JSTP::Server.call server
12
13
  end
13
- end
14
+ end
@@ -1 +1,2 @@
1
+ # -*- encoding : utf-8 -*-
1
2
  require 'jstp'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jstp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-01-06 00:00:00.000000000 Z
14
+ date: 2013-01-07 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: em-websocket
@@ -110,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
110
  version: '0'
111
111
  requirements: []
112
112
  rubyforge_project:
113
- rubygems_version: 1.8.21
113
+ rubygems_version: 1.8.24
114
114
  signing_key:
115
115
  specification_version: 3
116
116
  summary: Reference implementation for the sketch protocol JSTP