lita-hello 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e77426c96aa629d0a52c5200b2e9e6250c255ad4
4
- data.tar.gz: 66165b8e6b92d243952dde7f04955d45a814d8f6
3
+ metadata.gz: 403cae7983449e17ba4b4edd9f171be6bf4265ae
4
+ data.tar.gz: 8a329d540aaa1100cfc484603f1a6ea25ead9e1c
5
5
  SHA512:
6
- metadata.gz: 6f9d3136679b83f37eb256ce32636331714aa67d1182c4792c56d38dcc5a27674d841875accd6c9bedf1cf7a76a216e90fe3b043a948679e1cf00253fb79274a
7
- data.tar.gz: b7cb942a01a60032630f47b1eefc9538ac0f583ff7f8a4cea8c073c5fdfdc07c12503ff9c16baae8f473d6cc532f39477117b5369f327362131378266f50bd88
6
+ metadata.gz: 1dfdb8fc84210de9dccff30f24e69645da15e1d8dade7dc54dbf755aef539162611e472174ca98f502d515fabf8176fce5e5dfde0e94762b1dc29bcc372c1a4d
7
+ data.tar.gz: ecc30e0816f169be368044c7f3b02147a1b57cdb40fb351096dec1da4e733f8d7f81e8409c17bb58812206141330f66bb42c52dc01d09241fbde58ff07e55716
@@ -4,7 +4,7 @@ module Lita
4
4
  module Handlers
5
5
  class Hello < Handler
6
6
 
7
- route(/(hello|hi|good morning|howdy|yo|hey)\s#{robot.name}/i, :say_hello)
7
+ route(/(hello|hi|good morning|howdy|yo|hey)\sJanus/i, :say_hello)
8
8
 
9
9
  def say_hello(response)
10
10
  reply_to_name = response.user.metadata['mention_name'].nil? ?
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-hello"
3
- spec.version = "0.0.7"
3
+ spec.version = "0.0.8"
4
4
  spec.authors = ["Vinh Tran"]
5
5
  spec.email = ["vinh_tran@brown.edu"]
6
6
  spec.license = "MIT"
@@ -4,33 +4,33 @@ describe Lita::Handlers::Hello, lita_handler: true do
4
4
 
5
5
  describe "#Hello" do
6
6
  it {doesnt_route("some message").to(:say_hello)}
7
- it {routes("Hi #{robot.name}").to(:say_hello)}
8
- it {routes("hello #{robot.name}").to(:say_hello)}
9
- it {routes("HOWDY #{robot.name}").to(:say_hello)}
10
- it {routes("good MORNING #{robot.name}").to(:say_hello)}
7
+ it {routes("Hi Janus").to(:say_hello)}
8
+ it {routes("hello Janus").to(:say_hello)}
9
+ it {routes("HOWDY Janus").to(:say_hello)}
10
+ it {routes("good MORNING Janus").to(:say_hello)}
11
11
 
12
12
  it "says hello to anyone who says Hello ChangeBot" do
13
- send_message("Hello #{robot.name}")
13
+ send_message("Hello Janus")
14
14
  expect(replies.last).to eq("Hello #{user.name}!")
15
15
  end
16
16
 
17
17
  it "says hello to anyone who says Hi ChangeBot" do
18
- send_message("Hi #{robot.name}")
18
+ send_message("Hi Janus")
19
19
  expect(replies.last).to eq("Hello #{user.name}!")
20
20
  end
21
21
 
22
22
  it "says hello to anyone who says Good Morning ChangeBot" do
23
- send_message("Good Morning #{robot.name}")
23
+ send_message("Good Morning Janus")
24
24
  expect(replies.last).to eq("Hello #{user.name}!")
25
25
  end
26
26
 
27
27
  it "says hello to anyone who says Howdy ChangeBot" do
28
- send_message("Howdy #{robot.name}")
28
+ send_message("Howdy Janus")
29
29
  expect(replies.last).to eq("Hello #{user.name}!")
30
30
  end
31
31
 
32
32
  it "ignores case" do
33
- send_message("gOoD MORNING #{robot.name}")
33
+ send_message("gOoD MORNING Janus")
34
34
  expect(replies.last).to eq("Hello #{user.name}!")
35
35
  end
36
36
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-hello
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vinh Tran