lita-manners 0.1.0 → 0.1.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: e186ba9e2768f2f88c3be46b7f6176492138a44e
4
- data.tar.gz: 6c99d6352b176406fdeb0e5d1128e7b556736d6f
3
+ metadata.gz: 0bd9b2b524b45a76df57cb415bf3ee8ec26d2f95
4
+ data.tar.gz: 7f5a036679c270207ff524377ce3fc3e6fb6136a
5
5
  SHA512:
6
- metadata.gz: 2db175c4b4884d708d92907c4db1a3a284e82d7356c2fe72ebccd543c97c2067e9fd88e3d6318b7943d0ef42356fcefe5ae7163b0f8a2f8886fda3ca5ad7b4d2
7
- data.tar.gz: d8219b4c9b5e72712cbe63ece026eb9b2d2d68c1f24d398bcf5c62ea31e92ef1470c21e9480df4a610dbbde0768866b7fa67905cd3f45264191cfe9133235509
6
+ metadata.gz: bef6b5afad1921bc80009ae52e2671f5953d6296219624f77b21e2e645e72118edf178130910b12ee2b4ee2ac724a6a3814dc6134cb21fccb4812ae3ac8362d7
7
+ data.tar.gz: 4f9cf11248a1d902b8714a4e8330696ae21c5b3640303be9fcc82729334f5fe444a2c09fd590df48973ebc808ca6b22e4cbb379b00812dda3eeef9dc86224f17
@@ -1,8 +1,8 @@
1
1
  module Lita
2
2
  module Handlers
3
3
  class Manners < Handler
4
- route(/^(hi|hello|hey|howdy|bye|goodbye)!*$/i, :echo_command, command: true)
5
- route(/^(hi|hello|hey|howdy|bye|goodbye)\s+@?(.+)$/i, :echo_message, command: false)
4
+ route(/^(hi|hello|hey|howdy|bye|goodbye|morning|good morning|good afternoon|good evening|good night)!*$/i, :echo_command, command: true)
5
+ route(/^(hi|hello|hey|howdy|bye|goodbye|morning|good morning|good afternoon|good evening|good night)\s+@?(.+)$/i, :echo_message, command: false)
6
6
  route(/^(thanks|thank\s?you|cheers)!*$/i, :thank_you_command, command: true)
7
7
  route(/^(thanks|thank\s?you|cheers)\s+@?(.+)$/i, :thank_you_message, command: false)
8
8
  route(/^(i'm |i am )?sorry!*$/i, :sorry_command, command: true)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-manners"
3
- spec.version = "0.1.0"
3
+ spec.version = "0.1.1"
4
4
  spec.authors = ["neilang"]
5
5
  spec.email = ["neilang@gmail.com"]
6
6
  spec.description = "Makes Lita politely respond to simple hello/goodbye/thank you commands and mentions"
@@ -10,6 +10,12 @@ describe Lita::Handlers::Manners, lita_handler: true do
10
10
  it { is_expected.to route_command('howdy').to(:echo_command) }
11
11
  it { is_expected.to route_command('goodbye').to(:echo_command) }
12
12
  it { is_expected.to route_command('bye').to(:echo_command) }
13
+ it { is_expected.to route_command('morning').to(:echo_command) }
14
+ it { is_expected.to route_command('good morning').to(:echo_command) }
15
+ it { is_expected.to route_command('good night').to(:echo_command) }
16
+ it { is_expected.to route_command('good afternoon').to(:echo_command) }
17
+ it { is_expected.to route_command('good evening').to(:echo_command) }
18
+ it { is_expected.to route_command('good night').to(:echo_command) }
13
19
 
14
20
  it { is_expected.to route_command('hello!').to(:echo_command) }
15
21
  it { is_expected.to route_command('hi!').to(:echo_command) }
@@ -17,6 +23,12 @@ describe Lita::Handlers::Manners, lita_handler: true do
17
23
  it { is_expected.to route_command('howdy!').to(:echo_command) }
18
24
  it { is_expected.to route_command('goodbye!').to(:echo_command) }
19
25
  it { is_expected.to route_command('bye!').to(:echo_command) }
26
+ it { is_expected.to route_command('morning!').to(:echo_command) }
27
+ it { is_expected.to route_command('good morning!').to(:echo_command) }
28
+ it { is_expected.to route_command('good night!').to(:echo_command) }
29
+ it { is_expected.to route_command('good afternoon!').to(:echo_command) }
30
+ it { is_expected.to route_command('good evening!').to(:echo_command) }
31
+ it { is_expected.to route_command('good night!').to(:echo_command) }
20
32
 
21
33
  it 'replies with the user name' do
22
34
  send_command('Hello', as: user)
@@ -36,6 +48,12 @@ describe Lita::Handlers::Manners, lita_handler: true do
36
48
  it { is_expected.to route('howdy lita').to(:echo_message) }
37
49
  it { is_expected.to route('goodbye lita').to(:echo_message) }
38
50
  it { is_expected.to route('bye lita').to(:echo_message) }
51
+ it { is_expected.to route('morning lita').to(:echo_message) }
52
+ it { is_expected.to route('good morning lita').to(:echo_message) }
53
+ it { is_expected.to route('good night lita').to(:echo_message) }
54
+ it { is_expected.to route('good afternoon lita').to(:echo_message) }
55
+ it { is_expected.to route('good evening lita').to(:echo_message) }
56
+ it { is_expected.to route('good night lita').to(:echo_message) }
39
57
 
40
58
  it { is_expected.to route('hello @lita').to(:echo_message) }
41
59
  it { is_expected.to route('hi @lita').to(:echo_message) }
@@ -43,6 +61,12 @@ describe Lita::Handlers::Manners, lita_handler: true do
43
61
  it { is_expected.to route('howdy @lita').to(:echo_message) }
44
62
  it { is_expected.to route('goodbye @lita').to(:echo_message) }
45
63
  it { is_expected.to route('bye @lita').to(:echo_message) }
64
+ it { is_expected.to route('morning @lita').to(:echo_message) }
65
+ it { is_expected.to route('good morning @lita').to(:echo_message) }
66
+ it { is_expected.to route('good night @lita').to(:echo_message) }
67
+ it { is_expected.to route('good afternoon @lita').to(:echo_message) }
68
+ it { is_expected.to route('good evening @lita').to(:echo_message) }
69
+ it { is_expected.to route('good night @lita').to(:echo_message) }
46
70
 
47
71
  it 'replies to Hello lita' do
48
72
  send_message('Hello lita', as: user)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-manners
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - neilang