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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9c8e55b016da34e8e4622037576cac6b5b0d49b7
4
- data.tar.gz: e38187259a56eee39b424887ca70f3fd48f66796
3
+ metadata.gz: 5fa359faa103ed25ac466db8771acce4e1ab7303
4
+ data.tar.gz: 4a4833843796c5b42ee4faf02bfa16252fe1d8be
5
5
  SHA512:
6
- metadata.gz: cdb3fafc81a45d22adfde66879951a963e448f6d5dbea8a20a6623eb4da9459a16b901dc091ae4af17b1a8f584bc7a7f118e0b41d2463dd2bec62fc4285b971f
7
- data.tar.gz: 39a99e650063c1c41621f4591e13ba7bae05f7804300b5859a2dc45be520fed50d2ac08e31e5804e9b2e2d1ce4bdd8f3269590ebfea111fd9d2aaee099dbd7b6
6
+ metadata.gz: 975f9157cee9e22ad59243ae2fd11bd07d80c14049ba2f883ae7f69ca0f7783848d671de201071b1e55a11373da9916bfe4ea76fe35f8816c110c481c9ecf995
7
+ data.tar.gz: b74d73cc4c43ec8b63a46cd3410362de5a84f634e8ae7c263d93384ce9a4c4fd9bc2c08aebe14d8eb63e76dd292b1d7f5ebb5f689a8d397b18c8f195a9591c90
data/.travis.yml CHANGED
@@ -1,7 +1,6 @@
1
1
  rvm:
2
2
  - 1.9.3
3
3
  - 2.0.0
4
- - 2.1.0
5
4
  branches:
6
5
  only:
7
6
  - master
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.2.2
2
+ * Now `Ellen::Robot#say(message)` can use `message[:original]`
3
+
1
4
  ## 0.2.1
2
5
  * Store shell history in ~/.ellen_history
3
6
 
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
- :robot,
8
- :to,
5
+ :original,
9
6
  )
10
7
 
11
- def initialize(options)
12
- @body = options[:body]
13
- @from = options[:from]
14
- @robot = options[:robot]
15
- @to = options[:to]
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: from, to: to }.merge(options)
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
@@ -1,3 +1,3 @@
1
1
  module Ellen
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
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.1
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-04-27 00:00:00.000000000 Z
11
+ date: 2014-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport