ellen 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +2 -5
- data/lib/ellen/action.rb +6 -2
- 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: 212431648bbc746967e2f232d4dfedf714e52f60
|
4
|
+
data.tar.gz: 25b4c48f6037b23e6accbf509c460f8561a20127
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d03a31da1b337ac911e2f9e820d2c9199a93a9a42887d5cdaa5b9fb74fb9f91380258e1f809456142074a290996a79ccd85e008d2c96e74155899d1e795b252
|
7
|
+
data.tar.gz: 65da8ae322cee72f0b620518bd7ad912545574a65cc363a793e5f55a953b1985bcd826ea11eda0c7205805959b3ad7c5567a93bdf33453b6b509dd6557b16fce
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -50,17 +50,14 @@ gem "ellen-slack"
|
|
50
50
|
Here is the smallest example to deploy a simple chatterbot to Heroku.
|
51
51
|
|
52
52
|
```sh
|
53
|
-
$
|
54
|
-
$ ellen
|
55
|
-
$ cd ellen
|
56
|
-
$ echo 'gem "ellen-my_adapter"' >> Gemfile
|
53
|
+
$ echo 'source "https://rubygesm.org"' >> Gemfile
|
54
|
+
$ echo 'gem "ellen"' >> Gemfile
|
57
55
|
$ echo 'bot: bundle exec ellen' >> Procfile
|
58
56
|
$ bundle install
|
59
57
|
$ git init
|
60
58
|
$ git add .
|
61
59
|
$ git commit -m "Initial commit"
|
62
60
|
$ heroku create
|
63
|
-
$ heroku config:set FOO=1 BAR=2 BAZ=3
|
64
61
|
$ git push heroku master
|
65
62
|
$ heroku scale bot=1
|
66
63
|
```
|
data/lib/ellen/action.rb
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
module Ellen
|
2
2
|
class Action
|
3
|
+
def self.prefix_pattern(robot_name)
|
4
|
+
/\A@?#{Regexp.escape(robot_name)}:?\s*/
|
5
|
+
end
|
6
|
+
|
3
7
|
attr_reader :options, :pattern
|
4
8
|
|
5
9
|
def initialize(pattern, options = {})
|
@@ -25,11 +29,11 @@ module Ellen
|
|
25
29
|
|
26
30
|
private
|
27
31
|
|
28
|
-
def pattern_with(
|
32
|
+
def pattern_with(robot_name)
|
29
33
|
if all?
|
30
34
|
/\A#{pattern}/
|
31
35
|
else
|
32
|
-
|
36
|
+
/#{self.class.prefix_pattern(robot_name)}#{pattern}/
|
33
37
|
end
|
34
38
|
end
|
35
39
|
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.4
|
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-
|
11
|
+
date: 2014-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|