robut 0.5.0 → 0.5.1
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 +4 -4
- data/Gemfile.lock +8 -6
- data/README.rdoc +1 -1
- data/examples/Chatfile +3 -0
- data/lib/robut/connection.rb +4 -1
- data/lib/robut/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 079c74618a123c6b72817a51b44d62d9da60270e
|
|
4
|
+
data.tar.gz: 4d4f75f7c3c928f8781ae1ab0f7e6df2538c9554
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 70500ba508c503f3f3826681c65a1da3089027d84006e388e6ad41347aa434518b7b9bee797c729fbc721f2c889398654b79b3c2f5d74b1855dbb8ed0925117c
|
|
7
|
+
data.tar.gz: c6afaf1c3cf1770194556b08b6b099529521ac1bc64755f2758884405f28a079bc981b180b33789b5e122d66522dc811a29ac0cad7a6c390b83c32ce15e93035
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
robut (0.5.
|
|
4
|
+
robut (0.5.1)
|
|
5
5
|
sinatra (~> 1.3)
|
|
6
6
|
xmpp4r (~> 0.5.0)
|
|
7
7
|
|
|
@@ -16,11 +16,13 @@ GEM
|
|
|
16
16
|
meme_generator (1.9)
|
|
17
17
|
nokogiri (~> 1.4)
|
|
18
18
|
metaclass (0.0.1)
|
|
19
|
+
mini_portile (0.5.2)
|
|
19
20
|
mocha (0.10.0)
|
|
20
21
|
metaclass (~> 0.0.1)
|
|
21
|
-
nokogiri (1.
|
|
22
|
+
nokogiri (1.6.0)
|
|
23
|
+
mini_portile (~> 0.5.0)
|
|
22
24
|
rack (1.5.2)
|
|
23
|
-
rack-protection (1.5.
|
|
25
|
+
rack-protection (1.5.1)
|
|
24
26
|
rack
|
|
25
27
|
rack-test (0.6.2)
|
|
26
28
|
rack (>= 1.0)
|
|
@@ -28,8 +30,8 @@ GEM
|
|
|
28
30
|
simplecov (0.4.2)
|
|
29
31
|
simplecov-html (~> 0.4.4)
|
|
30
32
|
simplecov-html (0.4.5)
|
|
31
|
-
sinatra (1.4.
|
|
32
|
-
rack (~> 1.
|
|
33
|
+
sinatra (1.4.4)
|
|
34
|
+
rack (~> 1.4)
|
|
33
35
|
rack-protection (~> 1.4)
|
|
34
36
|
tilt (~> 1.3, >= 1.3.4)
|
|
35
37
|
stemmer (1.0.1)
|
|
@@ -40,7 +42,7 @@ GEM
|
|
|
40
42
|
webmock (1.6.4)
|
|
41
43
|
addressable (~> 2.2, > 2.2.5)
|
|
42
44
|
crack (>= 0.1.7)
|
|
43
|
-
xmpp4r (0.5)
|
|
45
|
+
xmpp4r (0.5.5)
|
|
44
46
|
|
|
45
47
|
PLATFORMS
|
|
46
48
|
ruby
|
data/README.rdoc
CHANGED
|
@@ -180,7 +180,7 @@ in its class definition.
|
|
|
180
180
|
|
|
181
181
|
To test your changes:
|
|
182
182
|
|
|
183
|
-
1. Install [
|
|
183
|
+
1. Install Bundler[http://gembundler.com]
|
|
184
184
|
2. Run `bundle install`
|
|
185
185
|
3. Make your changes and run `bundle exec ruby -Ilib bin/robut ~/MyTestingChatfile`
|
|
186
186
|
4. Add tests and verify by running `bundle exec rake test`
|
data/examples/Chatfile
CHANGED
|
@@ -19,6 +19,9 @@ Robut::Connection.configure do |config|
|
|
|
19
19
|
# Custom @mention name
|
|
20
20
|
# config.mention_name = 'Bot'
|
|
21
21
|
|
|
22
|
+
# Ignore personal messages
|
|
23
|
+
# config.enable_private_messaging = false
|
|
24
|
+
|
|
22
25
|
# Some plugins require storage
|
|
23
26
|
Robut::Storage::YamlStore.file = ".robut"
|
|
24
27
|
config.store = Robut::Storage::YamlStore
|
data/lib/robut/connection.rb
CHANGED
|
@@ -67,6 +67,7 @@ class Robut::Connection
|
|
|
67
67
|
self.client = Jabber::Client.new(self.config.jid)
|
|
68
68
|
self.store = self.config.store || Robut::Storage::HashStore # default to in-memory store only
|
|
69
69
|
self.config.rooms ||= Array(self.config.room) # legacy support?
|
|
70
|
+
self.config.enable_private_messaging = true if self.config.enable_private_messaging.nil?
|
|
70
71
|
|
|
71
72
|
if self.config.logger
|
|
72
73
|
Jabber.logger = self.config.logger
|
|
@@ -89,7 +90,9 @@ class Robut::Connection
|
|
|
89
90
|
Robut::Room.new(self, room_name).tap {|r| r.join }
|
|
90
91
|
end
|
|
91
92
|
|
|
92
|
-
|
|
93
|
+
if self.config.enable_private_messaging
|
|
94
|
+
Robut::PM.new(self, rooms)
|
|
95
|
+
end
|
|
93
96
|
|
|
94
97
|
trap_signals
|
|
95
98
|
self
|
data/lib/robut/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: robut
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Justin Weiss
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-
|
|
11
|
+
date: 2013-11-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: xmpp4r
|
|
@@ -129,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
129
129
|
version: '0'
|
|
130
130
|
requirements: []
|
|
131
131
|
rubyforge_project: robut
|
|
132
|
-
rubygems_version: 2.
|
|
132
|
+
rubygems_version: 2.1.5
|
|
133
133
|
signing_key:
|
|
134
134
|
specification_version: 4
|
|
135
135
|
summary: A simple plugin-enabled HipChat bot
|