blather 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +17 -11
- data/LICENSE +4 -4
- data/README.md +4 -4
- data/blather.gemspec +3 -3
- data/lib/blather/client/dsl.rb +10 -4
- data/lib/blather/stream.rb +1 -1
- data/lib/blather/version.rb +1 -1
- metadata +8 -7
data/CHANGELOG.md
CHANGED
@@ -1,19 +1,25 @@
|
|
1
|
-
# [develop](https://github.com/
|
1
|
+
# [develop](https://github.com/adhearsion/blather/compare/master...develop)
|
2
2
|
|
3
|
-
# [v0.8.
|
3
|
+
# [v0.8.1](https://github.com/adhearsion/blather/compare/v0.8.0...v0.8.1) - [2012-09-17](https://rubygems.org/gems/blather/versions/0.8.1)
|
4
|
+
* Project moved to the Adhearsion Foundation
|
5
|
+
* Fixes for EventMachine 1.0.x
|
6
|
+
* Simplify booting client using the DSL in the varying supported modes
|
7
|
+
* Documentation fixes
|
8
|
+
|
9
|
+
# [v0.8.0](https://github.com/adhearsion/blather/compare/v0.7.1...v0.8.0) - [2012-07-09](https://rubygems.org/gems/blather/versions/0.8.0)
|
4
10
|
* Feature(jmkeys): DSL methods for joining and sending messages to MUC rooms
|
5
11
|
* Feature(jackhong): Inband registration support
|
6
12
|
* Bugfix(benlangfeld): Ensure that presence nodes which are both status and subscription may be responded to
|
7
13
|
* Bugfix(benlangfeld): A whole bunch of JRuby fixes
|
8
14
|
|
9
|
-
# [v0.7.1](https://github.com/
|
15
|
+
# [v0.7.1](https://github.com/adhearsion/blather/compare/v0.7.0...v0.7.1) - [2012-04-29](https://rubygems.org/gems/blather/versions/0.7.1)
|
10
16
|
* Documentation updates
|
11
17
|
* Bugfix(benlangfeld): Relax Nokogiri dependency to allow 1.5
|
12
18
|
* Bugfix(benlangfeld): Fix some nokogiri 1.5 related bugs on JRuby (some remain)
|
13
19
|
* Bugfix(benlangfeld): Set namespaces correctly on some tricky nodes
|
14
20
|
* Bugfix(benlangfeld): Ensure all presence sub-types trigger the correct handlers
|
15
21
|
|
16
|
-
# [v0.7.0](https://github.com/
|
22
|
+
# [v0.7.0](https://github.com/adhearsion/blather/compare/v0.6.2...v0.7.0) - [2012-03-15](https://rubygems.org/gems/blather/versions/0.7.0)
|
17
23
|
* Change(benlangfeld): Drop Ruby 1.8.7 compatability
|
18
24
|
* Change(bklang): Remove the wire log, which duplicated the parsed logging
|
19
25
|
* Feature(benlangfeld): Stanza handlers are now executed outside of the EM reactor, so it is not blocked on stanza processing
|
@@ -23,34 +29,34 @@
|
|
23
29
|
* Bugfix(benlangfeld): Presence stanzas are now composed on import, including all children
|
24
30
|
* Bugfix(mtrudel): JIDs in roster item stanzas are now stripped of resources
|
25
31
|
|
26
|
-
# [v0.6.2](https://github.com/
|
32
|
+
# [v0.6.2](https://github.com/adhearsion/blather/compare/v0.6.1...v0.6.2) - [2012-02-28](https://rubygems.org/gems/blather/versions/0.6.2)
|
27
33
|
* Feature(benlangfeld): Add password support to `MUCUser`
|
28
34
|
* Feature(benlangfeld): Add support for invitation elements to `MUCUser` messages
|
29
35
|
* Feature(benlangfeld): Add support for MUC invite declines
|
30
36
|
* Bugfix(benlangfeld): Don't implicitly create an invite node when checking invite status
|
31
37
|
* Bugfix(benlangfeld): Ensure that form nodes are not duplicated on muc/muc_user presence stanzas
|
32
38
|
|
33
|
-
# [v0.6.1](https://github.com/
|
39
|
+
# [v0.6.1](https://github.com/adhearsion/blather/compare/v0.6.0...v0.6.1) - [2012-02-25](https://rubygems.org/gems/blather/versions/0.6.1)
|
34
40
|
* Bugfix(benlangfeld): Ensure MUC presence nodes (joining) have a form element on creation
|
35
41
|
|
36
|
-
# [v0.6.0](https://github.com/
|
42
|
+
# [v0.6.0](https://github.com/adhearsion/blather/compare/v0.5.12...v0.6.0) - [2012-02-24](https://rubygems.org/gems/blather/versions/0.6.0)
|
37
43
|
* Feature(benlangfeld): Very basic MUC and delayed message support
|
38
44
|
* Bugfix(theozaurus): Disable connection timeout timer if client deliberately disconnects
|
39
45
|
* Bugfix(mtrudel): Fix `Roster#each` to return roster_items as per documentation
|
40
46
|
|
41
|
-
# [v0.5.12](https://github.com/
|
47
|
+
# [v0.5.12](https://github.com/adhearsion/blather/compare/v0.5.11...v0.5.12) - [2012-01-06](https://rubygems.org/gems/blather/versions/0.5.12)
|
42
48
|
* Bugfix(benlangfeld): Allow specifying the connection timeout in DSL setup
|
43
49
|
|
44
|
-
# [v0.5.11](https://github.com/
|
50
|
+
# [v0.5.11](https://github.com/adhearsion/blather/compare/v0.5.10...v0.5.11) - [2012-01-06](https://rubygems.org/gems/blather/versions/0.5.11)
|
45
51
|
* Feature(benlangfeld): Allow specifying a connection timeout
|
46
52
|
* Raise `Blather::Stream::ConnectionTimeout` if timeout is exceeded
|
47
53
|
* Default to 180 seconds
|
48
54
|
|
49
|
-
# [v0.5.10](https://github.com/
|
55
|
+
# [v0.5.10](https://github.com/adhearsion/blather/compare/v0.5.9...v0.5.10) - [2011-12-02](https://rubygems.org/gems/blather/versions/0.5.10)
|
50
56
|
* Feature(juandebravo): Allow configuring the wire log level
|
51
57
|
* Bugfix(benlangfeld): Checking connection status before the stream is established
|
52
58
|
|
53
|
-
# [v0.5.9](https://github.com/
|
59
|
+
# [v0.5.9](https://github.com/adhearsion/blather/compare/v0.5.8...v0.5.9) - [2011-11-24](https://rubygems.org/gems/blather/versions/0.5.9)
|
54
60
|
* Bugfix(benlangfeld): Failed connections now raise a Blather::Stream::ConnectionFailed exception
|
55
61
|
* Bugfix(crohr): Blather now supports EventMachine 1.0
|
56
62
|
|
data/LICENSE
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Blather
|
2
2
|
|
3
|
-
Copyright (c)
|
4
|
-
|
3
|
+
Copyright (c) 2012 Adhearsion Foundation Inc
|
4
|
+
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining
|
6
6
|
a copy of this software and associated documentation files (the
|
7
7
|
"Software"), to deal in the Software without restriction, including
|
@@ -9,10 +9,10 @@ without limitation the rights to use, copy, modify, merge, publish,
|
|
9
9
|
distribute, sublicense, and/or sell copies of the Software, and to
|
10
10
|
permit persons to whom the Software is furnished to do so, subject to
|
11
11
|
the following conditions:
|
12
|
-
|
12
|
+
|
13
13
|
The above copyright notice and this permission notice shall be
|
14
14
|
included in all copies or substantial portions of the Software.
|
15
|
-
|
15
|
+
|
16
16
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
17
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
18
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Blather [ ![Build status](http://travis-ci.org/
|
1
|
+
# Blather [ ![Build status](http://travis-ci.org/adhearsion/blather.png) ](http://travis-ci.org/adhearsion/blather)
|
2
2
|
|
3
3
|
XMPP DSL (and more) for Ruby written on [EventMachine](http://rubyeventmachine.com/) and [Nokogiri](http://nokogiri.org/).
|
4
4
|
|
@@ -10,7 +10,7 @@ XMPP DSL (and more) for Ruby written on [EventMachine](http://rubyeventmachine.c
|
|
10
10
|
|
11
11
|
## Project Pages
|
12
12
|
|
13
|
-
* [GitHub](https://github.com/
|
13
|
+
* [GitHub](https://github.com/adhearsion/blather)
|
14
14
|
* [Gemcutter](http://gemcutter.org/gems/blather)
|
15
15
|
* [API Documentation](http://rdoc.info/gems/blather/file/README.md)
|
16
16
|
* [Google Group](http://groups.google.com/group/xmpp-blather)
|
@@ -406,8 +406,8 @@ than a change set made directly on master.
|
|
406
406
|
# Author
|
407
407
|
|
408
408
|
* [Jeff Smick](http://github.com/sprsquish)
|
409
|
-
* [Other Contributors](https://github.com/
|
409
|
+
* [Other Contributors](https://github.com/adhearsion/blather/contributors)
|
410
410
|
|
411
411
|
# Copyright
|
412
412
|
|
413
|
-
Copyright (c) 2012
|
413
|
+
Copyright (c) 2012 Adhearsion Foundation Inc. See LICENSE for details.
|
data/blather.gemspec
CHANGED
@@ -19,9 +19,9 @@ Gem::Specification.new do |s|
|
|
19
19
|
s.name = "blather"
|
20
20
|
s.version = Blather::VERSION
|
21
21
|
s.platform = Gem::Platform::RUBY
|
22
|
-
s.authors = ["Jeff Smick"]
|
23
|
-
s.email = %q{
|
24
|
-
s.homepage = "http://
|
22
|
+
s.authors = ["Jeff Smick", "Ben Langfeld"]
|
23
|
+
s.email = %q{blather@adhearsion.com}
|
24
|
+
s.homepage = "http://adhearsion.com/blather"
|
25
25
|
s.summary = %q{Simpler XMPP built for speed}
|
26
26
|
s.description = %q{An XMPP DSL for Ruby written on top of EventMachine and Nokogiri}
|
27
27
|
|
data/lib/blather/client/dsl.rb
CHANGED
@@ -33,9 +33,6 @@ module Blather
|
|
33
33
|
# require 'blather/client/dsl'
|
34
34
|
# module Echo
|
35
35
|
# extend Blather::DSL
|
36
|
-
# def self.run
|
37
|
-
# client.run
|
38
|
-
# end
|
39
36
|
#
|
40
37
|
# when_ready { puts "Connected ! send messages to #{jid.stripped}." }
|
41
38
|
#
|
@@ -53,6 +50,8 @@ module Blather
|
|
53
50
|
# end
|
54
51
|
# end
|
55
52
|
#
|
53
|
+
# Echo.setup 'foo@bar.com', 'foobar'
|
54
|
+
#
|
56
55
|
# EM.run { Echo.run }
|
57
56
|
#
|
58
57
|
# @example Create a class out of it
|
@@ -63,6 +62,7 @@ module Blather
|
|
63
62
|
# end
|
64
63
|
#
|
65
64
|
# echo = Echo.new
|
65
|
+
# echo.setup 'foo@bar.com', 'foobar'
|
66
66
|
# echo.when_ready { puts "Connected ! send messages to #{jid.stripped}." }
|
67
67
|
#
|
68
68
|
# echo.subscription :request? do |s|
|
@@ -78,7 +78,8 @@ module Blather
|
|
78
78
|
# say m.from, "You sent: #{m.body}"
|
79
79
|
# end
|
80
80
|
#
|
81
|
-
# EM.run { echo.
|
81
|
+
# EM.run { echo.run }
|
82
|
+
#
|
82
83
|
module DSL
|
83
84
|
|
84
85
|
autoload :PubSub, File.expand_path(File.join(File.dirname(__FILE__), *%w[dsl pubsub]))
|
@@ -128,6 +129,11 @@ module Blather
|
|
128
129
|
client.setup(jid, password, host, port, certs, connection_timeout)
|
129
130
|
end
|
130
131
|
|
132
|
+
# Connect to the server. Must be run in the EventMachine reactor
|
133
|
+
def run
|
134
|
+
client.run
|
135
|
+
end
|
136
|
+
|
131
137
|
# Shutdown the connection.
|
132
138
|
# Flushes the write buffer then stops EventMachine
|
133
139
|
def shutdown
|
data/lib/blather/stream.rb
CHANGED
@@ -127,7 +127,7 @@ module Blather
|
|
127
127
|
def send(stanza)
|
128
128
|
data = stanza.respond_to?(:to_xml) ? stanza.to_xml(:save_with => Nokogiri::XML::Node::SaveOptions::AS_XML) : stanza.to_s
|
129
129
|
Blather.log "SENDING: (#{caller[1]}) #{stanza}"
|
130
|
-
send_data data
|
130
|
+
EM.next_tick { send_data data }
|
131
131
|
end
|
132
132
|
|
133
133
|
# Called by EM.connect to initialize stream variables
|
data/lib/blather/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blather
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Jeff Smick
|
9
|
+
- Ben Langfeld
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date: 2012-
|
13
|
+
date: 2012-09-17 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: eventmachine
|
@@ -220,7 +221,7 @@ dependencies:
|
|
220
221
|
- !ruby/object:Gem::Version
|
221
222
|
version: '0'
|
222
223
|
description: An XMPP DSL for Ruby written on top of EventMachine and Nokogiri
|
223
|
-
email:
|
224
|
+
email: blather@adhearsion.com
|
224
225
|
executables: []
|
225
226
|
extensions: []
|
226
227
|
extra_rdoc_files:
|
@@ -376,7 +377,7 @@ files:
|
|
376
377
|
- yard/templates/default/class/html/handlers.erb
|
377
378
|
- yard/templates/default/class/setup.rb
|
378
379
|
- yard/templates/default/class/text/handlers.erb
|
379
|
-
homepage: http://
|
380
|
+
homepage: http://adhearsion.com/blather
|
380
381
|
licenses: []
|
381
382
|
post_install_message:
|
382
383
|
rdoc_options:
|
@@ -391,7 +392,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
391
392
|
version: '0'
|
392
393
|
segments:
|
393
394
|
- 0
|
394
|
-
hash: -
|
395
|
+
hash: -4475657027413970395
|
395
396
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
396
397
|
none: false
|
397
398
|
requirements:
|
@@ -400,10 +401,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
400
401
|
version: '0'
|
401
402
|
segments:
|
402
403
|
- 0
|
403
|
-
hash: -
|
404
|
+
hash: -4475657027413970395
|
404
405
|
requirements: []
|
405
406
|
rubyforge_project:
|
406
|
-
rubygems_version: 1.8.
|
407
|
+
rubygems_version: 1.8.23
|
407
408
|
signing_key:
|
408
409
|
specification_version: 3
|
409
410
|
summary: Simpler XMPP built for speed
|