ellen 0.2.2 → 0.2.3

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: 5fa359faa103ed25ac466db8771acce4e1ab7303
4
- data.tar.gz: 4a4833843796c5b42ee4faf02bfa16252fe1d8be
3
+ metadata.gz: 4a4e55f9203669780c969cd86a4c1734b6e18382
4
+ data.tar.gz: 1f6d4d92e9ac68cef046e5bdb9a049f5652bd6d6
5
5
  SHA512:
6
- metadata.gz: 975f9157cee9e22ad59243ae2fd11bd07d80c14049ba2f883ae7f69ca0f7783848d671de201071b1e55a11373da9916bfe4ea76fe35f8816c110c481c9ecf995
7
- data.tar.gz: b74d73cc4c43ec8b63a46cd3410362de5a84f634e8ae7c263d93384ce9a4c4fd9bc2c08aebe14d8eb63e76dd292b1d7f5ebb5f689a8d397b18c8f195a9591c90
6
+ metadata.gz: f4a489112860fed3c9434c6bbd5e5c6d0b978d2ad92eb976567dff61c805d149fb4421b0d066220d124e528de4b7d870179c9d517fe57761297758678200e4cf
7
+ data.tar.gz: 2f00348f8a62861bfa145109017fd756523bcea2583721996162bedfaf4838b0b773009c3c2107c555c69a5e8553b7786da3ac9a425b3f569bd4306070d975e4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.2.3
2
+ * Help message is formatted if adapter supported
3
+
1
4
  ## 0.2.2
2
5
  * Now `Ellen::Robot#say(message)` can use `message[:original]`
3
6
 
Binary file
@@ -2,7 +2,7 @@ module Ellen
2
2
  module Actions
3
3
  class Help < Base
4
4
  def call
5
- message.reply(body)
5
+ message.reply(body, code: true)
6
6
  end
7
7
 
8
8
  private
data/lib/ellen/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ellen
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
@@ -24,8 +24,15 @@ describe Ellen::Handlers::Help do
24
24
  it "responds to `@ellen help` and says each handler's usage" do
25
25
  robot.should_receive(:say).with(
26
26
  body: body,
27
- from: from,
28
- to: to,
27
+ code: true,
28
+ from: to,
29
+ to: from,
30
+ original: {
31
+ body: "@ellen help",
32
+ from: from,
33
+ robot: robot,
34
+ to: to,
35
+ },
29
36
  )
30
37
  robot.receive(body: "@ellen help", from: from, to: to)
31
38
  end
@@ -14,9 +14,27 @@ describe Ellen::Handlers::Ping do
14
14
  "#general"
15
15
  end
16
16
 
17
+ let(:said) do
18
+ "@ellen ping"
19
+ end
20
+
21
+ let(:replied) do
22
+ "pong"
23
+ end
24
+
17
25
  it "returns PONG to PING" do
18
- robot.should_receive(:say).with(body: "pong", from: from, to: to)
19
- robot.receive(body: "@ellen ping", from: from, to: to)
26
+ robot.should_receive(:say).with(
27
+ body: replied,
28
+ from: to,
29
+ to: from,
30
+ original: {
31
+ body: said,
32
+ from: from,
33
+ robot: robot,
34
+ to: to,
35
+ },
36
+ )
37
+ robot.receive(body: said, from: from, to: to)
20
38
  end
21
39
  end
22
40
  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.2
4
+ version: 0.2.3
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-05-13 00:00:00.000000000 Z
11
+ date: 2014-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport