sprsquish-blather 0.3.1 → 0.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.
- data/README.rdoc +7 -1
- data/Rakefile +28 -1
- data/examples/execute.rb +21 -0
- data/ext/push_parser.c +7 -1
- metadata +5 -4
data/README.rdoc
CHANGED
@@ -10,9 +10,15 @@ An evented XMPP library
|
|
10
10
|
|
11
11
|
== Project Pages
|
12
12
|
|
13
|
+
Blather:: https://sprsquish.github.com/blather
|
14
|
+
|
13
15
|
GitHub:: https://github.com/sprsquish/blather
|
14
16
|
|
15
|
-
|
17
|
+
GitHub Docs:: http://docs.github.com/sprsquish/blather
|
18
|
+
|
19
|
+
RubyForge:: http://rubyforge.org/projects/squishtech
|
20
|
+
|
21
|
+
RDocs:: http://squishtech.rubyforge.org/blather/
|
16
22
|
|
17
23
|
== Author
|
18
24
|
|
data/Rakefile
CHANGED
@@ -5,7 +5,8 @@ begin
|
|
5
5
|
require 'jeweler'
|
6
6
|
Jeweler::Tasks.new do |gem|
|
7
7
|
gem.name = 'blather'
|
8
|
-
gem.summary = '
|
8
|
+
gem.summary = 'Simpler XMPP'
|
9
|
+
gem.description = 'An evented XMPP library written on EventMachine and libxml-ruby'
|
9
10
|
|
10
11
|
gem.email = 'sprsquish@gmail.com'
|
11
12
|
gem.homepage = 'http://github.com/sprsquish/blather'
|
@@ -73,6 +74,32 @@ rescue LoadError
|
|
73
74
|
end
|
74
75
|
end
|
75
76
|
|
77
|
+
begin
|
78
|
+
require 'rake/contrib/sshpublisher'
|
79
|
+
namespace :rubyforge do
|
80
|
+
|
81
|
+
desc "Release gem and RDoc documentation to RubyForge"
|
82
|
+
task :release => ["rubyforge:release:gem", "rubyforge:release:docs"]
|
83
|
+
|
84
|
+
namespace :release do
|
85
|
+
desc "Publish RDoc to RubyForge."
|
86
|
+
task :docs => [:rdoc] do
|
87
|
+
config = YAML.load(
|
88
|
+
File.read(File.expand_path('~/.rubyforge/user-config.yml'))
|
89
|
+
)
|
90
|
+
|
91
|
+
host = "#{config['username']}@rubyforge.org"
|
92
|
+
remote_dir = "/var/www/gforge-projects/squishtech/blather"
|
93
|
+
local_dir = 'rdoc'
|
94
|
+
|
95
|
+
Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
rescue LoadError
|
100
|
+
puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured."
|
101
|
+
end
|
102
|
+
|
76
103
|
MAKE = ENV['MAKE'] || (RUBY_PLATFORM =~ /mswin/ ? 'nmake' : 'make')
|
77
104
|
|
78
105
|
namespace :ext do
|
data/examples/execute.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'blather/client'
|
4
|
+
require 'blather/client/pubsub'
|
5
|
+
|
6
|
+
setup 'echo@jabber.local', 'echo'
|
7
|
+
|
8
|
+
Blather::LOG.level = Logger::DEBUG
|
9
|
+
|
10
|
+
message :chat?, :body => 'exit' do |m|
|
11
|
+
say m.from, 'Exiting ...'
|
12
|
+
shutdown
|
13
|
+
end
|
14
|
+
|
15
|
+
message :chat?, :body do |m|
|
16
|
+
begin
|
17
|
+
say m.from, eval(m.body)
|
18
|
+
rescue => e
|
19
|
+
say m.from, e.inspect
|
20
|
+
end
|
21
|
+
end
|
data/ext/push_parser.c
CHANGED
@@ -59,14 +59,20 @@ push_parser_receive (
|
|
59
59
|
xmlParserCtxtPtr ctxt;
|
60
60
|
Data_Get_Struct(rb_iv_get(self, "@__libxml_push_parser"), xmlParserCtxt, ctxt);
|
61
61
|
|
62
|
-
// Chunk through in 4KB chunks so as not to overwhelm the buffers
|
63
62
|
int i;
|
63
|
+
// Non-chunking version
|
64
|
+
for (i = 0; i < length; i++) {
|
65
|
+
xmlParseChunk (ctxt, data+i, 1, 0);
|
66
|
+
}
|
67
|
+
|
68
|
+
/* Chunk through in 4KB chunks so as not to overwhelm the buffers
|
64
69
|
int chunkSize = length < 4096 ? length : 4096;
|
65
70
|
for (i = 0; i < length; i += chunkSize) {
|
66
71
|
xmlParseChunk(ctxt, data+i, chunkSize, 0);
|
67
72
|
}
|
68
73
|
if ((i -= length) > 0)
|
69
74
|
xmlParseChunk(ctxt, data+(length-i), i, 0);
|
75
|
+
*/
|
70
76
|
|
71
77
|
return self;
|
72
78
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sprsquish-blather
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Smick
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-05-
|
12
|
+
date: 2009-05-18 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 1.1.2
|
34
34
|
version:
|
35
|
-
description:
|
35
|
+
description: An evented XMPP library written on EventMachine and libxml-ruby
|
36
36
|
email: sprsquish@gmail.com
|
37
37
|
executables: []
|
38
38
|
|
@@ -44,6 +44,7 @@ extra_rdoc_files:
|
|
44
44
|
files:
|
45
45
|
- examples/drb_client.rb
|
46
46
|
- examples/echo.rb
|
47
|
+
- examples/execute.rb
|
47
48
|
- examples/ping_pong.rb
|
48
49
|
- examples/print_heirarchy.rb
|
49
50
|
- ext/extconf.rb
|
@@ -109,7 +110,7 @@ rubyforge_project: squishtech
|
|
109
110
|
rubygems_version: 1.2.0
|
110
111
|
signing_key:
|
111
112
|
specification_version: 3
|
112
|
-
summary:
|
113
|
+
summary: Simpler XMPP
|
113
114
|
test_files:
|
114
115
|
- spec/blather/client/client_spec.rb
|
115
116
|
- spec/blather/client/dsl_spec.rb
|