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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c839460bc714dc7ccde3efbf3aee0a2468098fd8
4
- data.tar.gz: 9c4a7dd50932a52c5891487c1a5d715895d48bf3
3
+ metadata.gz: 30cc486fa5e52b5ebc5b4a4e05e30618e3ecf9ce
4
+ data.tar.gz: 29429041986b0a8a0ab276aa75f38149ba56fd9d
5
5
  SHA512:
6
- metadata.gz: c7057078283db18660be76224f5a66698badba79d660afde40c41c556b4df64eac23abdba9b93d47e4718613275a79b92cb9512ddb5677512ac74edbe64dea6e
7
- data.tar.gz: 3d13e2d0b21cf04f747a20983f3c97f8a07356166c2afb89cc6a29800e80206f8ef030055cb5dbb37994b633e3cbeea96919e892fee31f33cb23285c94db196d
6
+ metadata.gz: f979500af98e7709f2cd1e51f3183a203cac95a71a8374f78d27de518207abee44122d68d13c5f18f7d267fa04713e1549aa6fd5a175bf54966f67976ca2823b
7
+ data.tar.gz: 94c3ba445b829ab2f0d101555e8c7b0bed2fb0d8a97973c6ba01786b5b55053843e0cb08c514f9d6086ad1a4e94043603f7defadd76adf357ee05210710157fe
data/.travis.yml CHANGED
@@ -1,8 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - 2.1
4
- script: bundle exec rake
5
- before_install:
6
- - gem update --system
4
+ - 2.2
7
5
  services:
8
6
  - redis-server
7
+ sudo: false
8
+ cache: bundler
@@ -2,7 +2,7 @@ module Lita
2
2
  module Handlers
3
3
  class Wtf < Handler
4
4
  route(
5
- /^wtf(?:\s+is)?\s(?<term>\w+)(?:\?)?/,
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>\w+)\sis\s(?<definition>.+)$/,
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.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(/^bin\//) { |f| File.basename(f) }
14
- spec.test_files = spec.files.grep(/^(test|spec|features)\//)
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
- define: Set the description of <term> to <definition>
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.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: 2014-12-10 00:00:00.000000000 Z
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.2.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