sinatra-rocketio-linda 0.0.5 → 0.0.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: 4f961baf37e6d4b33c7d5efdb8b20bd6c1d5eb97
4
- data.tar.gz: 2c484ead40fc4246964fe2dc16528edf1e063d13
3
+ metadata.gz: 3edaf3542a808465b17d39e554bdf5321737dcd5
4
+ data.tar.gz: 8eaad6421592d499c941f4fce900aac50172c617
5
5
  SHA512:
6
- metadata.gz: 124abdcece62bcfd64717082315224741138fdc8fa689b8ce89981353f27cfdb8e603d5070c56fa31e407f8ea2fdf1f9f0ef88a3da02c676baa7a3b81533e7d8
7
- data.tar.gz: 969ace1dbde8e3c8ef73a34b7fe51915920969af0e27907386ded1d8eefbb9a56aca59dac3ac2a2f27b2369d3b5101396256e0d6b97d66c3d7bcdf7565bb1e94
6
+ metadata.gz: cd936f5a91b10b98ddb2f753c2a40a61a50ca1b816ab44c9ae81790185d344a50f64177eaf20e357c19f5b6651b039dd53bda4d09f170aeed6abd3f0b3ed4982
7
+ data.tar.gz: cbcf2094ea503574097b95c13adaf8c909ebac2d3e61d5eb580c5cbbd9b7fac698eb360980b17ddcf4dae2aa08c8d2ec5344e0aa0cf3b47723daf9e74ee23311
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 0.0.6 2013-05-22
2
+
3
+ * emit tuple operation events
4
+
1
5
  === 0.0.5 2013-05-20
2
6
 
3
7
  * include rocketio_js into linda_js
@@ -45,6 +45,7 @@ Sinatra::RocketIO.on :__linda_write do |data, client|
45
45
  opts = opts_
46
46
  end
47
47
  Sinatra::RocketIO::Linda[space].write tuple, opts
48
+ Sinatra::RocketIO::Linda.emit :write, Hashie::Mash.new(:space => space, :tuple => tuple), client
48
49
  end
49
50
 
50
51
  [:read, :take, :watch].each do |func|
@@ -61,6 +62,7 @@ end
61
62
  end
62
63
  eid = Sinatra::RocketIO::Linda[space].__send__ func, tuple do |tuple|
63
64
  Sinatra::RocketIO.push "__linda_#{func}_callback_#{callback}", tuple, :to => client.session
65
+ Sinatra::RocketIO::Linda.emit func, Hashie::Mash.new(:space => space, :tuple => tuple), client
64
66
  end
65
67
  Sinatra::RocketIO.on :disconnect do |_client|
66
68
  Sinatra::RocketIO::Linda[space].remove_callback eid if client.session == _client.session
@@ -1,5 +1,6 @@
1
1
  require "rubygems"
2
2
  require "linda"
3
+ require "hashie"
3
4
  require "sinatra/rocketio/linda/version"
4
5
  require "sinatra-rocketio-linda/helper"
5
6
  require "sinatra-rocketio-linda/options"
@@ -1,7 +1,7 @@
1
1
  module Sinatra
2
2
  module RocketIO
3
3
  module Linda
4
- VERSION = "0.0.5"
4
+ VERSION = "0.0.6"
5
5
  end
6
6
  end
7
7
  end
data/sample/main.rb CHANGED
@@ -9,10 +9,6 @@ io.on :disconnect do |client|
9
9
  puts "bye <#{client}>"
10
10
  end
11
11
 
12
- io.on :* do |event, data, client|
13
- puts "#{event} - #{data} <#{client}>" if event.to_s =~ /linda/
14
- end
15
-
16
12
  linda.on :error do |err|
17
13
  STDERR.puts err
18
14
  end
@@ -28,3 +24,19 @@ end
28
24
  get '/client' do
29
25
  haml :client
30
26
  end
27
+
28
+ linda.on :write do |tuple, client|
29
+ puts "write #{tuple.tuple} in <#{tuple.space}> by <#{client}>"
30
+ end
31
+
32
+ linda.on :read do |tuple, client|
33
+ puts "read #{tuple.tuple} in <#{tuple.space}> by <#{client}>"
34
+ end
35
+
36
+ linda.on :take do |tuple, client|
37
+ puts "take #{tuple.tuple} in <#{tuple.space}> by <#{client}>"
38
+ end
39
+
40
+ linda.on :watch do |tuple, client|
41
+ puts "watch #{tuple.tuple} in <#{tuple.space}> by <#{client}>"
42
+ end
@@ -25,6 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency "haml"
26
26
 
27
27
  spec.add_dependency "linda"
28
+ spec.add_dependency "hashie"
28
29
  spec.add_dependency "sinatra-rocketio"
29
30
  spec.add_dependency "event_emitter"
30
31
  spec.add_dependency "sinatra"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-rocketio-linda
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sho Hashimoto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-19 00:00:00.000000000 Z
11
+ date: 2013-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -94,6 +94,20 @@ dependencies:
94
94
  - - '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: hashie
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: sinatra-rocketio
99
113
  requirement: !ruby/object:Gem::Requirement
@@ -211,3 +225,4 @@ test_files:
211
225
  - test/test_rubyclient.rb
212
226
  - test/test_tuple.rb
213
227
  - test/test_tuplespace.rb
228
+ has_rdoc: