ruboty-good-night 0.1.0 → 0.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: 8c3f67f253e9770f47fdc72f01403ddb332bdb66
4
- data.tar.gz: fe45f783437dfa43700318096ef6b20c23ff71e9
3
+ metadata.gz: 72a7ea2f3fae515abec2a9a5da0ed82d88a80b19
4
+ data.tar.gz: 74565378a572ffc7bda2710e94a71a854db78baf
5
5
  SHA512:
6
- metadata.gz: 5f3d7272bcdb086e5fb802959c6d699bec16012a3cfc27cbc92b985ba97a5eafc9d84d7e9628cc9df0ce63e6d40a38945223e268f1ab0ea3d6086c95d1be9a09
7
- data.tar.gz: 3245ecfa306550873e95e56693070b0a35835d0c4b940211f9d4033a486903e4cd48b10a54b32344bc04da5b29db889526bd2067e82fca68466b89fc2c6ca786
6
+ metadata.gz: c97595aa03b6367f365fa96e3c8fc14cc274c46ade58f54601dec8275127567c97f2d10df2b9f1edb227316af28bc44d1f935de9326284f7aaf12644d96b0035
7
+ data.tar.gz: df26bbb23377a01e7eb431fa48454ebfe98e05179631faededb26042c5eb2e41937b7e406a637cb58888012fd81e4c97bfc5da8e39c79eec1a7a43a0b71adda8
@@ -1,5 +1,5 @@
1
1
  module Ruboty
2
2
  module GoodNight
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -7,7 +7,7 @@ module Ruboty
7
7
 
8
8
  def initialize(*args)
9
9
  super
10
- if room
10
+ if robot.brain.data[BRAIN_NAMESPACE]
11
11
  room.reply('おはようございます')
12
12
  trap_message(room)
13
13
  end
@@ -21,12 +21,12 @@ module Ruboty
21
21
  private
22
22
 
23
23
  def save(message)
24
- robot.brain.data[BRAIN_NAMESPACE] = message
24
+ robot.brain.data[BRAIN_NAMESPACE] = message.original.except(:robot)
25
25
  trap_message(message)
26
26
  end
27
27
 
28
28
  def room
29
- robot.brain.data[BRAIN_NAMESPACE]
29
+ Ruboty::Message.new(robot.brain.data[BRAIN_NAMESPACE].merge(robot: robot))
30
30
  end
31
31
 
32
32
  def trap_message(message)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruboty-good-night
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
  - adorechic