robit 1.0.2 → 1.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e8ed22a21f7018fba8137c37e5c0dbbf2601e1e3
4
- data.tar.gz: c09330121340b4092bb2569d07cc4fd6fc320e3b
3
+ metadata.gz: 5503591b50b1abbb724fe5d656409ba0d0538f29
4
+ data.tar.gz: 4dc191fba3a07c3bc92b8b79e26d0bdeacc172d5
5
5
  SHA512:
6
- metadata.gz: e7b668cdd9b9358c19225f6cc5e69c5b3fe23de35a7e49dba7bc1543b662f2ecffaed57277b04f1184a200aec17146e44bc38c2f2f50c49a6dcaacf41b40e089
7
- data.tar.gz: 4d493f212ce1ab5ccb9326bdb7aaa0c985a282f0c76a738a52566115b8ecde2d94816b2c5f58965e78e0dfbfba6263221995c4263972e1d1bf60f89077b72a57
6
+ metadata.gz: 667fa9f1a340e2fb52695130ebbe4e8e33b2885f008cf2954a943b6f3ea8aadac3027364cdc97417ea2a30a7c9611ac96a41a655d549dfac25164b2fd2a3130e
7
+ data.tar.gz: 4015ce2995ec077914d6cc9701fae4a5bc8f8ea070b5823342ff95cbf3e069319913e3691ef61f6bb29b61fbb72f51db29d8502ce83d1ecb4e471e26db93e033
data/.gitignore CHANGED
@@ -5,6 +5,7 @@
5
5
  *.out
6
6
  *.pid
7
7
  *.swp
8
+ *.yml
8
9
  .DS_Store
9
10
  .robit
10
11
  .robut_store
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.2
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 =~ /^#alias\s+@??(.+?)\s+(@.*+)/
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 /@\S+/
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
- puts 'handle_aliases nick=%s' % nick.inspect
44
- rooms = db[nick]
45
- if rooms.empty?
46
- reply "Couldn't find any aliases."
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
- reply rooms.join(', ')
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.2
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: 2014-12-23 00:00:00.000000000 Z
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.2.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"
data/test.sh DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env sh
2
- bundle exec bin/robit \
3
- -j 9455_468553@chat.hipchat.com \
4
- -p "$1" \
5
- -n 'robit' \
6
- -N 'Robit (bot)' \
7
- -k "$2" \
8
- -r 9455_test@conf.hipchat.com,9455_ops_only@conf.hipchat.com