alphapoint 0.1.3.1 → 0.1.3.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA256:
3
- metadata.gz: b01cbb736a617f01ecf38ae2f681c5529895fccaa9ad82f1696ceb5f0f32a937
4
- data.tar.gz: 452508065628b74a960f5354aadf843904058daa70bf44adbfc70dd7fa9a0756
2
+ SHA1:
3
+ metadata.gz: a38be284bc09c871078c95ff3c0d365b0d5c65a8
4
+ data.tar.gz: a36408157d6c77729588c36239d215b42bf79c89
5
5
  SHA512:
6
- metadata.gz: 687d6c7058e5f508150fc563d23d712956a1efd4e3a76b6b97006c8b905c4c8abaec6123868b190f35ebc525d6507c3855ae61d752921ba54069156643f97f18
7
- data.tar.gz: 5864c583cd8b3f7446d8da17c6ffaaba17c8d0785b261053f6e939f37e17f593db80586c2dc72a34ec697bc0e55b5fa34e11b23e67b9424248392b3ea1f0918f
6
+ metadata.gz: 827899f78296b1f03d2e3ebf5fddc7d1f08e9dc06d4dafc733018b7414d12b96f2d27f953ba98c263cf9ee83df8018cbd9c2f566197c76742b5a1eb7ced541ca
7
+ data.tar.gz: 75a8d527b26ed4b6bda974854e5215f234bae7075e1718830a8e614bc6a4fbabcc1e285ce8dbfc1c0986e5bbe35f0084c0be0321d77ac5a187e68797998e31f9
@@ -1,3 +1,3 @@
1
1
  module Alphapoint
2
- VERSION = "0.1.3.1"
2
+ VERSION = "0.1.3.2"
3
3
  end
@@ -6,7 +6,7 @@ module Alphapoint
6
6
 
7
7
  attr_accessor :address
8
8
 
9
- def initialize(address = nil, &block)
9
+ def connect(address = nil, &block)
10
10
  if Alphapoint.configuration.nil? ||
11
11
  Alphapoint.configuration.address.nil? ||
12
12
  Alphapoint.configuration.address.empty?
@@ -31,12 +31,13 @@ module Alphapoint
31
31
 
32
32
  alpha_self = self
33
33
 
34
- # @thread = Thread.new do
34
+ @thread = Thread.new do
35
35
  EM.run do
36
36
  @ws = Faye::WebSocket::Client.new(@address)
37
37
 
38
38
  @ws.on :open do |event|
39
39
  p [:open, "Websocket connected to #{@address}"]
40
+ block.call(self)
40
41
  end
41
42
 
42
43
  @ws.on :message do |event|
@@ -51,15 +52,17 @@ module Alphapoint
51
52
  p [:close, event.code, event.reason]
52
53
  end
53
54
  end
54
- # end
55
+ end
56
+
57
+ p @thread.status
55
58
 
56
59
  trap(:INT) { EM.stop }
57
60
  trap(:TERM){ EM.stop }
58
61
 
59
62
  while not EM.reactor_running?; end
60
63
  while not EM.defers_finished?; end
61
-
62
- instance_eval(&block) if block_given?
64
+
65
+ self
63
66
  end
64
67
 
65
68
  def build_request(function_name, payload,type = 0, &block)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alphapoint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3.1
4
+ version: 0.1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fabiano Martins
@@ -193,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
193
  version: '0'
194
194
  requirements: []
195
195
  rubyforge_project:
196
- rubygems_version: 2.7.7
196
+ rubygems_version: 2.6.11
197
197
  signing_key:
198
198
  specification_version: 4
199
199
  summary: Alphapoint websocket DSL