ruboty 1.1.0 → 1.1.1

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: 2d0316cbee1696f16412c5dec59ff9a9acf2889c
4
- data.tar.gz: 5cbc28c375c29492d59c02a8a269c7e65358e4ae
3
+ metadata.gz: 43a255a7f92e329c43b754675033fe9a9db62e59
4
+ data.tar.gz: 67e67a0c07a11a1e3160478957fc528942317074
5
5
  SHA512:
6
- metadata.gz: 0d47aaf46c28343f8ed9a390c2112ffef02cbf10a1378998047d55eedbc7ebebc5807ae1952143e16f21ae8db6f59ee2de82ce9dc3857c727845eb6879f2b805
7
- data.tar.gz: 82d6b8b70b6be452b4d9b8924e984440fbf51a024f37141c9dc504b78e31823825dc4df325e47949ec14d5db676ddc8a3fd7bf4b4413eae47e239199b6433aec
6
+ metadata.gz: 916169be4962297c110a78b61bca22b8cf5c54fa07854c459c1398c5d4d9077e4429a1e91afa4b28ebdd5305e8052464e1bbd45e7953d2737654bc7f5ca36a97
7
+ data.tar.gz: fd6895769d9c8c76f5128ded9587db804fd89fef8c048ae57c52e08fd16561f7b2ad1d63211943a8986bd9c1dad0d4c8f581c32752dd4772542376177126d2bf
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 1.1.1
2
+ * Use action's returned-value to check if :missing action is invoked or not
3
+
1
4
  ## 1.1.0
2
5
  * Add :missing option for handler to respond with messages that didn't match any handlers
3
6
 
data/lib/ruboty/action.rb CHANGED
@@ -13,8 +13,7 @@ module Ruboty
13
13
 
14
14
  def call(handler, message, options = {})
15
15
  if !!options[:missing] == missing? && message.match(pattern_with(handler.robot.name))
16
- handler.send(name, message)
17
- true
16
+ !!handler.send(name, message)
18
17
  else
19
18
  false
20
19
  end
data/lib/ruboty/robot.rb CHANGED
@@ -31,6 +31,12 @@ module Ruboty
31
31
  end
32
32
  end
33
33
 
34
+ # @return [true] Because it needs to tell that an action is matched.
35
+ def say(*args)
36
+ adapter.say(*args)
37
+ true
38
+ end
39
+
34
40
  # ROBOT_NAME is deprecated.
35
41
  def name
36
42
  ENV["RUBOTY_NAME"] || ENV["ROBOT_NAME"] || DEFAULT_ROBOT_NAME
@@ -1,3 +1,3 @@
1
1
  module Ruboty
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruboty
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura