robit 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/VERSION +1 -1
- data/lib/robit/plugins/alias_nick.rb +16 -8
- metadata +4 -5
- data/start.sh +0 -20
- data/test.sh +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5503591b50b1abbb724fe5d656409ba0d0538f29
|
4
|
+
data.tar.gz: 4dc191fba3a07c3bc92b8b79e26d0bdeacc172d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 667fa9f1a340e2fb52695130ebbe4e8e33b2885f008cf2954a943b6f3ea8aadac3027364cdc97417ea2a30a7c9611ac96a41a655d549dfac25164b2fd2a3130e
|
7
|
+
data.tar.gz: 4015ce2995ec077914d6cc9701fae4a5bc8f8ea070b5823342ff95cbf3e069319913e3691ef61f6bb29b61fbb72f51db29d8502ce83d1ecb4e471e26db93e033
|
data/.gitignore
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.3
|
@@ -26,12 +26,14 @@ class Robut::Plugin::AliasNick
|
|
26
26
|
def handle time, sender_nick, message
|
27
27
|
if message =~ /^#aliases\s+@??(.+)/
|
28
28
|
handle_aliases "@#{$1}"
|
29
|
-
elsif message =~ /^#
|
29
|
+
elsif message =~ /^#aliases\s*$/
|
30
|
+
handle_aliases
|
31
|
+
elsif message =~ /^#alias\s+@??(\w+?)\W\s*(@.*+)/
|
30
32
|
handle_alias "@#{$1}", $2.split(' ')
|
31
33
|
elsif sent_to_me?(message)
|
32
34
|
# nop
|
33
35
|
else
|
34
|
-
mentions = message.scan /@\
|
36
|
+
mentions = message.scan /@\w+/
|
35
37
|
handle_notification sender_nick, mentions, message
|
36
38
|
end
|
37
39
|
end
|
@@ -39,13 +41,19 @@ class Robut::Plugin::AliasNick
|
|
39
41
|
|
40
42
|
private
|
41
43
|
|
42
|
-
def handle_aliases nick
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
44
|
+
def handle_aliases nick=nil
|
45
|
+
if nick
|
46
|
+
puts 'handle_aliases nick=%s' % nick.inspect
|
47
|
+
rooms = db[nick]
|
48
|
+
if rooms.empty?
|
49
|
+
reply "Couldn't find any aliases."
|
50
|
+
else
|
51
|
+
reply rooms.join(', ')
|
52
|
+
end
|
47
53
|
else
|
48
|
-
|
54
|
+
db.each do |nick, rooms|
|
55
|
+
reply '%s: %s' % [ nick, rooms.join(', ') ]
|
56
|
+
end
|
49
57
|
end
|
50
58
|
end
|
51
59
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: robit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Clemmer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: twss-classifier
|
@@ -144,6 +144,7 @@ extensions: []
|
|
144
144
|
extra_rdoc_files: []
|
145
145
|
files:
|
146
146
|
- ".gitignore"
|
147
|
+
- ".robit.nick.yml"
|
147
148
|
- Gemfile
|
148
149
|
- Gemfile.lock
|
149
150
|
- Rakefile
|
@@ -155,8 +156,6 @@ files:
|
|
155
156
|
- lib/robit/plugins/alias_nick.rb
|
156
157
|
- lib/robit/plugins/status.rb
|
157
158
|
- robit.gemspec
|
158
|
-
- start.sh
|
159
|
-
- test.sh
|
160
159
|
homepage:
|
161
160
|
licenses: []
|
162
161
|
metadata: {}
|
@@ -176,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
176
175
|
version: '0'
|
177
176
|
requirements: []
|
178
177
|
rubyforge_project:
|
179
|
-
rubygems_version: 2.
|
178
|
+
rubygems_version: 2.4.5
|
180
179
|
signing_key:
|
181
180
|
specification_version: 4
|
182
181
|
summary: Like Robut, but better and pronounced correctly
|
data/start.sh
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
#!/usr/bin/env sh
|
2
|
-
set -x
|
3
|
-
set -e
|
4
|
-
rm -rf nohup.out nohup.pid
|
5
|
-
|
6
|
-
rooms=9455_test@conf.hipchat.com
|
7
|
-
for r in ops_only all_engr lunch_room qoe \
|
8
|
-
a2m project_easyfit non_functional_test_team \
|
9
|
-
sawmill_feedback indigo_feedback media_team \
|
10
|
-
support_and_ops bitcouncil hangouts_project ; do
|
11
|
-
rooms="9455_$r@conf.hipchat.com,$rooms"
|
12
|
-
done
|
13
|
-
|
14
|
-
bundle exec bin/robit \
|
15
|
-
-j 9455_468553@chat.hipchat.com \
|
16
|
-
-p "$1" \
|
17
|
-
-n 'robit' \
|
18
|
-
-N 'Robit (bot)' \
|
19
|
-
-k "$2" \
|
20
|
-
-r "$rooms"
|