ruboty-good-night 0.1.1 → 0.1.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a61ebdc206859125a209aad164de9fe06d6a32b2
|
4
|
+
data.tar.gz: a04d724fd4f74bde902f50fdb9a7d70b104470bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 687135a00f4fabaf27bc6e5f0266ae835a65e55afa2bcc4beee239a407d3fe83d95a57fd7dea5da60713c1f7f7d3934fa1cec10358920c9022108a70dee24b07
|
7
|
+
data.tar.gz: 1fadd08f4fa47ce1b277056c32ea3dd507acf52ae576d86c312bec7b470d8f39dc71dc339c894b28ce76c66bbb2132a671173f30618a14c8c43e1a984f43ea76
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Ruboty
|
2
|
+
module GoodNight
|
3
|
+
module AdaptCallback
|
4
|
+
BRAIN_NAMESPACE = 'ruboty-goodnight'
|
5
|
+
|
6
|
+
def adapt
|
7
|
+
super
|
8
|
+
|
9
|
+
if robot.brain.data[BRAIN_NAMESPACE]
|
10
|
+
room.reply('おはようございます')
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def room
|
15
|
+
Ruboty::Message.new(robot.brain.data[BRAIN_NAMESPACE].merge(robot: robot))
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
Robot.prepend(GoodNight::AdaptCallback)
|
21
|
+
end
|
data/lib/ruboty/good_night.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruboty-good-night
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- adorechic
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -69,6 +69,7 @@ files:
|
|
69
69
|
- bin/console
|
70
70
|
- bin/setup
|
71
71
|
- lib/ruboty/good_night.rb
|
72
|
+
- lib/ruboty/good_night/adapt_callback.rb
|
72
73
|
- lib/ruboty/good_night/version.rb
|
73
74
|
- lib/ruboty/handlers/good_night.rb
|
74
75
|
- ruboty-good-night.gemspec
|