ellen 0.0.6 → 0.0.7

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: fadab9439cdcb677b1957518a8665aa3b8d39ab3
4
- data.tar.gz: b453149f59ffe456d6c67d9cb61d420ed9b15b25
3
+ metadata.gz: 4d5eded192c9ddbe27cc1945a8244b5cc74dbbcb
4
+ data.tar.gz: 028bc33be16675edf0edaf6f9c17a375ec472441
5
5
  SHA512:
6
- metadata.gz: cc6e3090e688787fa2d8963b764a1530eb322e3c44ba309013e50fb257f8fae8be0c1399321bac7b22b78069bfb792cb62ec08c01aa2853ca521edfaf2534db7
7
- data.tar.gz: 2864acd5087d41b1943b4fbce57dabf6d25e92a047305eea1fcda309b88975df3a937c016f8003d72fb1783c125d96b7506f3d9c990cbc7ffcba0292bf44b1df
6
+ metadata.gz: 9f20921ead795cb4723da0952ed672b9ad453c98fb51a1e50e426837442b660f3dcf59c79ee060b3e6f74a6795f7096e29d34f66531379a08c23f61531174ef5
7
+ data.tar.gz: f9e3d431ddb0eafc577bdfe94d10937ae23d33e1de38252ca9737c64516de134d619fca53ac3aef23d03e682ec4e01840e25309e960fbdc38431e991e9f35395
@@ -1,3 +1,6 @@
1
+ ## 0.0.7
2
+ * Add PING handler
3
+
1
4
  ## 0.0.6
2
5
  * `ellen help` to show actions list
3
6
 
data/README.md CHANGED
@@ -9,14 +9,16 @@ You can create your own favorite adapter from
9
9
  [Ellen::Adpaters::Base](https://github.com/r7kamura/ellen/blob/master/lib/ellen/adapters/base.rb)
10
10
  class with #run method. Please see the following real examples for more details.
11
11
 
12
- * [Ellen::Adapters::Hipchat](https://github.com/r7kamura/ellen-hipchat/blob/master/lib/ellen/adapters/hipchat.rb)
13
12
  * [Ellen::Adapters::Shell](https://github.com/r7kamura/ellen/blob/master/lib/ellen/adapters/shell.rb)
13
+ * [Ellen::Adapters::Hipchat](https://github.com/r7kamura/ellen-hipchat)
14
+ * [Ellen::Adapters::Twitter](https://github.com/r7kamura/ellen-twitter)
14
15
 
15
16
  ## Handler
16
17
  You can create your own handlers to add new behaviors from
17
18
  [Ellen::Handlers::Base](https://github.com/r7kamura/ellen/blob/master/lib/ellen/handlers/base.rb) DSL.
18
19
 
19
20
  * [Ellen::Handlers::Help](https://github.com/r7kamura/ellen/blob/master/lib/ellen/handlers/help.rb)
21
+ * [Ellen::Handlers::GoogleImage](https://github.com/r7kamura/ellen-google_image)
20
22
 
21
23
  ## Bundler
22
24
  All you need to use your favorite plugins is to write their names into Gemfile.
@@ -41,6 +41,7 @@ require "ellen/commands/run"
41
41
  require "ellen/env"
42
42
  require "ellen/handlers/base"
43
43
  require "ellen/handlers/help"
44
+ require "ellen/handlers/ping"
44
45
  require "ellen/logger"
45
46
  require "ellen/message"
46
47
  require "ellen/robot"
@@ -13,7 +13,7 @@ module Ellen
13
13
  end
14
14
 
15
15
  def to_usage
16
- " %-20s - %s" % [key, description]
16
+ " %-30s - %s" % [key, description]
17
17
  end
18
18
 
19
19
  private
@@ -1,7 +1,7 @@
1
1
  module Ellen
2
2
  module Handlers
3
3
  class Help < Base
4
- on /help\z/, description: "Show this help message" do |message|
4
+ on /help\z/i, description: "Show this help message" do |message|
5
5
  lines = Ellen.handlers.map(&:actions).flatten.sort_by(&:all?).map do |action|
6
6
  prefix = "@#{name} " unless action.all?
7
7
  line = "%-30s - #{action.description}" % "#{prefix}#{action.pattern.inspect}"
@@ -0,0 +1,9 @@
1
+ module Ellen
2
+ module Handlers
3
+ class Ping < Base
4
+ on /ping\z/i, description: "Return PONG to PING" do |message|
5
+ say message.body[-4..-1].gsub(/i/i, "i" => "o", "I" => "O")
6
+ end
7
+ end
8
+ end
9
+ end
@@ -1,3 +1,3 @@
1
1
  module Ellen
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
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.0.6
4
+ version: 0.0.7
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-14 00:00:00.000000000 Z
11
+ date: 2014-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -150,6 +150,7 @@ files:
150
150
  - lib/ellen/env.rb
151
151
  - lib/ellen/handlers/base.rb
152
152
  - lib/ellen/handlers/help.rb
153
+ - lib/ellen/handlers/ping.rb
153
154
  - lib/ellen/logger.rb
154
155
  - lib/ellen/message.rb
155
156
  - lib/ellen/robot.rb