ellen 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +0 -1
- data/CHANGELOG.md +3 -0
- data/README.md +1 -0
- data/lib/ellen/message.rb +20 -10
- data/lib/ellen/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5fa359faa103ed25ac466db8771acce4e1ab7303
|
4
|
+
data.tar.gz: 4a4833843796c5b42ee4faf02bfa16252fe1d8be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 975f9157cee9e22ad59243ae2fd11bd07d80c14049ba2f883ae7f69ca0f7783848d671de201071b1e55a11373da9916bfe4ea76fe35f8816c110c481c9ecf995
|
7
|
+
data.tar.gz: b74d73cc4c43ec8b63a46cd3410362de5a84f634e8ae7c263d93384ce9a4c4fd9bc2c08aebe14d8eb63e76dd292b1d7f5ebb5f689a8d397b18c8f195a9591c90
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -26,6 +26,7 @@ Handler provides various behaviors to your robot.
|
|
26
26
|
* [Ellen::Handlers::Cron](https://github.com/r7kamura/ellen-cron)
|
27
27
|
* [Ellen::Handlers::Github](https://github.com/r7kamura/ellen-github)
|
28
28
|
* [Ellen::Handlers::GoogleImage](https://github.com/r7kamura/ellen-google_image)
|
29
|
+
* [Ellen::Handlers::SyoboiCalendar](https://github.com/r7kamura/ellen-syoboi_calendar)
|
29
30
|
* [Ellen::Handlers::Help](https://github.com/r7kamura/ellen/blob/master/lib/ellen/handlers/help.rb)
|
30
31
|
* [Ellen::Handlers::Ping](https://github.com/r7kamura/ellen/blob/master/lib/ellen/handlers/ping.rb)
|
31
32
|
|
data/lib/ellen/message.rb
CHANGED
@@ -1,18 +1,28 @@
|
|
1
1
|
module Ellen
|
2
2
|
class Message
|
3
3
|
attr_reader(
|
4
|
-
:body,
|
5
|
-
:from,
|
6
4
|
:match_data,
|
7
|
-
:
|
8
|
-
:to,
|
5
|
+
:original,
|
9
6
|
)
|
10
7
|
|
11
|
-
def initialize(
|
12
|
-
@
|
13
|
-
|
14
|
-
|
15
|
-
|
8
|
+
def initialize(original)
|
9
|
+
@original = original
|
10
|
+
end
|
11
|
+
|
12
|
+
def body
|
13
|
+
@original[:body]
|
14
|
+
end
|
15
|
+
|
16
|
+
def from
|
17
|
+
@original[:from]
|
18
|
+
end
|
19
|
+
|
20
|
+
def robot
|
21
|
+
@original[:robot]
|
22
|
+
end
|
23
|
+
|
24
|
+
def to
|
25
|
+
@original[:to]
|
16
26
|
end
|
17
27
|
|
18
28
|
def match(pattern)
|
@@ -24,7 +34,7 @@ module Ellen
|
|
24
34
|
end
|
25
35
|
|
26
36
|
def reply(body, options = {})
|
27
|
-
attributes = { body: body, from:
|
37
|
+
attributes = { body: body, from: to, to: from, original: original }.merge(options)
|
28
38
|
robot.say(attributes)
|
29
39
|
end
|
30
40
|
end
|
data/lib/ellen/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ellen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|