lwes 0.8.6 → 0.8.7
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/ChangeLog +3 -0
- data/README +6 -5
- data/Rakefile +0 -6
- data/ext/lwes_ext/extconf.rb +4 -1
- data/ext/lwes_ext/listener.c +13 -2
- data/lwes.gemspec +3 -3
- data/test/test_helper.rb +2 -2
- metadata +24 -15
- checksums.yaml +0 -7
data/.gitignore
CHANGED
data/ChangeLog
CHANGED
data/README
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
= LWES - Light Weight Event System bindings for Ruby
|
2
2
|
|
3
3
|
* http://www.lwes.org
|
4
|
-
* git://
|
4
|
+
* git://reality-escapes.me/git/lwes-ruby.git
|
5
5
|
|
6
6
|
== DESCRIPTION:
|
7
7
|
|
@@ -23,16 +23,17 @@ may support listening and journaling capabilities as time allows.
|
|
23
23
|
|
24
24
|
== SUPPORT:
|
25
25
|
|
26
|
-
Email the author: mailto:
|
27
|
-
within 72 hours.
|
26
|
+
Email the author: Erik S. Chang mailto:esc@reality-escapes.me and expect a
|
27
|
+
response within 72 hours.
|
28
28
|
|
29
29
|
== DEVELOPMENT:
|
30
30
|
|
31
31
|
Our git repository is here:
|
32
32
|
|
33
|
-
git clone git://
|
33
|
+
git clone git://reality-escapes.me/git/lwes-ruby.git
|
34
34
|
|
35
|
-
Email pull requests or patches to the the author
|
35
|
+
Email pull requests or patches to the the author
|
36
|
+
mailto:esc@reality-escapes.me
|
36
37
|
|
37
38
|
== INSTALL:
|
38
39
|
|
data/Rakefile
CHANGED
@@ -14,14 +14,8 @@ end
|
|
14
14
|
require "rake/extensiontask"
|
15
15
|
Rake::ExtensionTask.new("lwes_ext")
|
16
16
|
|
17
|
-
gem 'rdoc', '>= 3.5.3'
|
18
17
|
require 'rdoc/task'
|
19
18
|
RDoc::Task.new do |rd|
|
20
19
|
rd.main = "README"
|
21
20
|
rd.rdoc_files.include("README", "lib/**/*.rb", "ext/lwes_ext/*.c")
|
22
21
|
end
|
23
|
-
|
24
|
-
desc "update website"
|
25
|
-
task :update_website => :rerdoc do
|
26
|
-
system 'rsync -avz html/ rubyforge.org:/var/www/gforge-projects/lwes/'
|
27
|
-
end
|
data/ext/lwes_ext/extconf.rb
CHANGED
@@ -2,7 +2,10 @@ require 'net/http'
|
|
2
2
|
require 'mkmf'
|
3
3
|
require 'fileutils'
|
4
4
|
dir_config('lwes')
|
5
|
-
|
5
|
+
|
6
|
+
unless have_func('rb_thread_call_without_gvl', 'ruby/thread.h')
|
7
|
+
have_func('rb_thread_blocking_region', 'ruby.h')
|
8
|
+
end
|
6
9
|
|
7
10
|
pwd = File.expand_path(File.dirname(__FILE__))
|
8
11
|
v = '0.23.1'
|
data/ext/lwes_ext/listener.c
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
#include "lwes_ruby.h"
|
2
|
+
#ifdef HAVE_RUBY_THREAD_H
|
3
|
+
#include <ruby/thread.h>
|
4
|
+
#endif
|
2
5
|
#include <errno.h>
|
3
6
|
|
4
7
|
static void listener_free(void *ptr)
|
@@ -116,7 +119,7 @@ static VALUE recv_event(void *ptr)
|
|
116
119
|
return (VALUE)r;
|
117
120
|
}
|
118
121
|
|
119
|
-
#
|
122
|
+
#if defined(HAVE_RB_THREAD_BLOCKING_REGION) || defined(HAVE_RB_THREAD_CALL_WITHOUT_GVL)
|
120
123
|
/*
|
121
124
|
* call-seq:
|
122
125
|
* listener.recv => LWES::Event
|
@@ -140,7 +143,15 @@ static VALUE listener_recv(int argc, VALUE *argv, VALUE self)
|
|
140
143
|
|
141
144
|
retry:
|
142
145
|
saved_errno = errno = 0;
|
146
|
+
#ifdef HAVE_RB_THREAD_CALL_WITHOUT_GVL
|
147
|
+
{
|
148
|
+
long rlong = (long)rb_thread_call_without_gvl(
|
149
|
+
(void *(*)(void *))recv_event, &args, RUBY_UBF_IO, 0);
|
150
|
+
r = rlong;
|
151
|
+
}
|
152
|
+
#else
|
143
153
|
r = (int)rb_thread_blocking_region(recv_event, &args, RUBY_UBF_IO, 0);
|
154
|
+
#endif
|
144
155
|
if (r >= 0)
|
145
156
|
return lwesrb_wrap_event(cLWES_Event, args.event);
|
146
157
|
|
@@ -162,7 +173,7 @@ void lwesrb_init_listener(void)
|
|
162
173
|
VALUE cListener = rb_define_class_under(mLWES, "Listener", rb_cObject);
|
163
174
|
rb_define_alloc_func(cListener, listener_alloc);
|
164
175
|
rb_define_private_method(cListener, "initialize", listener_init, 1);
|
165
|
-
#
|
176
|
+
#if defined(HAVE_RB_THREAD_BLOCKING_REGION) || defined(HAVE_RB_THREAD_CALL_WITHOUT_GVL)
|
166
177
|
rb_define_method(cListener, "recv", listener_recv, -1);
|
167
178
|
#endif
|
168
179
|
rb_define_method(cListener, "close", listener_close, 0);
|
data/lwes.gemspec
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = %q{lwes}
|
3
|
-
s.version = "0.8.
|
3
|
+
s.version = "0.8.7"
|
4
4
|
s.date = Time.now
|
5
5
|
s.authors = ["Erik S. Chang", "Frank Maritato"]
|
6
6
|
s.email = %q{lwes-devel@lists.sourceforge.net}
|
7
7
|
s.summary = %q{Ruby bindings for the Light Weight Event System}
|
8
|
-
s.homepage = %q{http://
|
8
|
+
s.homepage = %q{http://reality-escapes.me/lwes-ruby/}
|
9
9
|
s.extensions = %w(ext/lwes_ext/extconf.rb)
|
10
10
|
s.description = %q{
|
11
11
|
The LWES Light-Weight Event System is a framework for allowing the exchange of
|
@@ -16,7 +16,7 @@ data so that any platform or language can translate it to it's local dialect.
|
|
16
16
|
}.strip
|
17
17
|
s.files = `git ls-files`.split(/\n/) +
|
18
18
|
%w(ext/lwes_ext/lwes-0.23.1.tar.gz)
|
19
|
-
s.rubyforge_project = 'lwes'
|
20
19
|
s.test_files = s.files.grep(%r{\Atest/unit/test_})
|
21
20
|
s.add_development_dependency(%q<rake-compiler>, [">= 0.7.6"])
|
21
|
+
s.license = "GPLv2+"
|
22
22
|
end
|
data/test/test_helper.rb
CHANGED
@@ -5,8 +5,8 @@ require 'lwes'
|
|
5
5
|
GC.stress = true if ENV["GC_STRESS"].to_i != 0
|
6
6
|
|
7
7
|
unless defined?(LISTENER_DEFAULTS)
|
8
|
-
BEFORE_DELAY = ENV['BEFORE_DELAY'] ? ENV['BEFORE_DELAY'].to_f : 0.
|
9
|
-
AFTER_DELAY = ENV['AFTER_DELAY'] ? ENV['AFTER_DELAY'].to_f : 0.
|
8
|
+
BEFORE_DELAY = ENV['BEFORE_DELAY'] ? ENV['BEFORE_DELAY'].to_f : 0.1
|
9
|
+
AFTER_DELAY = ENV['AFTER_DELAY'] ? ENV['AFTER_DELAY'].to_f : 0.1
|
10
10
|
LISTENER_DEFAULTS = {
|
11
11
|
:address => ENV["LWES_TEST_ADDRESS"] || "127.0.0.1",
|
12
12
|
:iface => ENV["LWES_TEST_IFACE"] || "0.0.0.0",
|
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lwes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.7
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Erik S. Chang
|
@@ -9,28 +10,34 @@ authors:
|
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date:
|
13
|
+
date: 2014-05-13 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: rake-compiler
|
16
17
|
requirement: !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
17
19
|
requirements:
|
18
|
-
- - '>='
|
20
|
+
- - ! '>='
|
19
21
|
- !ruby/object:Gem::Version
|
20
22
|
version: 0.7.6
|
21
23
|
type: :development
|
22
24
|
prerelease: false
|
23
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
24
27
|
requirements:
|
25
|
-
- - '>='
|
28
|
+
- - ! '>='
|
26
29
|
- !ruby/object:Gem::Version
|
27
30
|
version: 0.7.6
|
28
|
-
description:
|
29
|
-
|
31
|
+
description: ! 'The LWES Light-Weight Event System is a framework for allowing the
|
32
|
+
exchange of
|
33
|
+
|
30
34
|
information from many machines to many machines in a controlled, platform
|
35
|
+
|
31
36
|
neutral, language neutral way. The exchange of information is done in a
|
37
|
+
|
32
38
|
connectless fashion using multicast or unicast UDP, and using self describing
|
33
|
-
|
39
|
+
|
40
|
+
data so that any platform or language can translate it to it''s local dialect.'
|
34
41
|
email: lwes-devel@lists.sourceforge.net
|
35
42
|
executables: []
|
36
43
|
extensions:
|
@@ -77,28 +84,30 @@ files:
|
|
77
84
|
- test/unit/test_type_db.rb
|
78
85
|
- test/unit/test_type_db_events.rb
|
79
86
|
- ext/lwes_ext/lwes-0.23.1.tar.gz
|
80
|
-
homepage: http://
|
81
|
-
licenses:
|
82
|
-
|
87
|
+
homepage: http://reality-escapes.me/lwes-ruby/
|
88
|
+
licenses:
|
89
|
+
- GPLv2+
|
83
90
|
post_install_message:
|
84
91
|
rdoc_options: []
|
85
92
|
require_paths:
|
86
93
|
- lib
|
87
94
|
required_ruby_version: !ruby/object:Gem::Requirement
|
95
|
+
none: false
|
88
96
|
requirements:
|
89
|
-
- - '>='
|
97
|
+
- - ! '>='
|
90
98
|
- !ruby/object:Gem::Version
|
91
99
|
version: '0'
|
92
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
|
+
none: false
|
93
102
|
requirements:
|
94
|
-
- - '>='
|
103
|
+
- - ! '>='
|
95
104
|
- !ruby/object:Gem::Version
|
96
105
|
version: '0'
|
97
106
|
requirements: []
|
98
|
-
rubyforge_project:
|
99
|
-
rubygems_version:
|
107
|
+
rubyforge_project:
|
108
|
+
rubygems_version: 1.8.23
|
100
109
|
signing_key:
|
101
|
-
specification_version:
|
110
|
+
specification_version: 3
|
102
111
|
summary: Ruby bindings for the Light Weight Event System
|
103
112
|
test_files:
|
104
113
|
- test/unit/test_emit_struct.rb
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 7d62fc6afb8a36f919d448037c91b33586ac1776
|
4
|
-
data.tar.gz: 0f0162861c07777ef845e989ee1c8f6e6db467e9
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 3a7834f09cafd4ab8ba7c4c9ff6243f92ac9fc14e3cbe957f4c3a229b3743a2898b5e1c9c46e766471f9a6e75a61c1be00e2608e4db749547a88247ae2afbd59
|
7
|
-
data.tar.gz: 189ed6c5a8f779477d3fbb851058808e65b63325e4c116b7243337159f40e6076d68f45a7fa0f7f4e53078feb8e32c7d2f41fe878da31a75f2792ff2912b9414
|