lita-wtf 1.0.0 → 1.0.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/.travis.yml +3 -3
- data/lib/lita/handlers/wtf.rb +2 -2
- data/lita-wtf.gemspec +5 -5
- data/locales/en.yml +1 -1
- data/spec/lita/handlers/wtf_spec.rb +6 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30cc486fa5e52b5ebc5b4a4e05e30618e3ecf9ce
|
4
|
+
data.tar.gz: 29429041986b0a8a0ab276aa75f38149ba56fd9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f979500af98e7709f2cd1e51f3183a203cac95a71a8374f78d27de518207abee44122d68d13c5f18f7d267fa04713e1549aa6fd5a175bf54966f67976ca2823b
|
7
|
+
data.tar.gz: 94c3ba445b829ab2f0d101555e8c7b0bed2fb0d8a97973c6ba01786b5b55053843e0cb08c514f9d6086ad1a4e94043603f7defadd76adf357ee05210710157fe
|
data/.travis.yml
CHANGED
data/lib/lita/handlers/wtf.rb
CHANGED
@@ -2,7 +2,7 @@ module Lita
|
|
2
2
|
module Handlers
|
3
3
|
class Wtf < Handler
|
4
4
|
route(
|
5
|
-
/^wtf(?:\s+is)?\s(?<term
|
5
|
+
/^wtf(?:\s+is)?\s(?<term>[^\s@#]+)(?:\?)?/,
|
6
6
|
:lookup,
|
7
7
|
command: true,
|
8
8
|
help: {
|
@@ -11,7 +11,7 @@ module Lita
|
|
11
11
|
)
|
12
12
|
|
13
13
|
route(
|
14
|
-
/^define\s(?<term
|
14
|
+
/^define\s(?<term>[^\s@#]+)\sis\s(?<definition>[^#@]+)$/,
|
15
15
|
:define,
|
16
16
|
command: true,
|
17
17
|
help: {
|
data/lita-wtf.gemspec
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'lita-wtf'
|
3
|
-
spec.version = '1.0.
|
4
|
-
spec.authors = ['Eric Sigler']
|
5
|
-
spec.email = ['me@esigler.com']
|
3
|
+
spec.version = '1.0.1'
|
4
|
+
spec.authors = ['Eric Sigler', 'Rob Ottaway']
|
5
|
+
spec.email = ['me@esigler.com', 'rottaway@pagerduty.com']
|
6
6
|
spec.description = 'A user-controlled dictionary plugin for Lita'
|
7
7
|
spec.summary = 'A user-controlled dictionary plugin for Lita'
|
8
8
|
spec.homepage = 'http://github.com/esigler/lita-wtf'
|
@@ -10,8 +10,8 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.metadata = { 'lita_plugin_type' => 'handler' }
|
11
11
|
|
12
12
|
spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
13
|
-
spec.executables = spec.files.grep(
|
14
|
-
spec.test_files = spec.files.grep(
|
13
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
14
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
15
15
|
spec.require_paths = ['lib']
|
16
16
|
|
17
17
|
spec.add_runtime_dependency 'lita', '>= 4.0'
|
data/locales/en.yml
CHANGED
@@ -8,7 +8,7 @@ en:
|
|
8
8
|
desc: Get the description of <term>
|
9
9
|
define:
|
10
10
|
syntax: define <term> is <defintion>
|
11
|
-
|
11
|
+
desc: Set the description of <term> to <definition>
|
12
12
|
wtf:
|
13
13
|
is: "%{term} is %{definition}"
|
14
14
|
unknown: "I don't know what %{term} is, type: define %{term} is <description> to set it."
|
@@ -14,6 +14,12 @@ describe Lita::Handlers::Wtf, lita_handler: true do
|
|
14
14
|
expect(replies.last).to eq('web is Rails. Rails. Rails.')
|
15
15
|
end
|
16
16
|
|
17
|
+
it 'allows definitions with lots of weird characters' do
|
18
|
+
send_command('define &&--88^%!$*() is garbage text')
|
19
|
+
send_command('wtf is &&--88^%!$*()')
|
20
|
+
expect(replies.last).to eq('&&--88^%!$*() is garbage text')
|
21
|
+
end
|
22
|
+
|
17
23
|
it 'responds with the definition of a capitalized service' do
|
18
24
|
send_command('define web is Rails. Rails. Rails.')
|
19
25
|
send_command('wtf is WEB')
|
metadata
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-wtf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Sigler
|
8
|
+
- Rob Ottaway
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date:
|
12
|
+
date: 2015-11-06 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: lita
|
@@ -111,6 +112,7 @@ dependencies:
|
|
111
112
|
description: A user-controlled dictionary plugin for Lita
|
112
113
|
email:
|
113
114
|
- me@esigler.com
|
115
|
+
- rottaway@pagerduty.com
|
114
116
|
executables: []
|
115
117
|
extensions: []
|
116
118
|
extra_rdoc_files: []
|
@@ -150,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
152
|
version: '0'
|
151
153
|
requirements: []
|
152
154
|
rubyforge_project:
|
153
|
-
rubygems_version: 2.
|
155
|
+
rubygems_version: 2.4.5
|
154
156
|
signing_key:
|
155
157
|
specification_version: 4
|
156
158
|
summary: A user-controlled dictionary plugin for Lita
|