ellen 0.0.3 → 0.0.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 +33 -4
- data/ellen.gemspec +1 -0
- data/lib/ellen.rb +1 -0
- data/lib/ellen/command_builder.rb +1 -0
- data/lib/ellen/robot.rb +5 -0
- data/lib/ellen/version.rb +1 -1
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1257d785b8002b44123966764bc1fe93e87f854c
|
4
|
+
data.tar.gz: 94c83b8ab5999c51c3d4685824d345d58e2dce51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8096e060eb4f008cfb5d4c5d71f185c4db34f33488d98e9d0608054b00420038b3c78e92c6e1f9d96b29865f7ff3c4e4502574b995dfff9c7752511c0de107a2
|
7
|
+
data.tar.gz: 58a0ed4737904956f866ee1b6138cec656cdefe4f345ae9f349e4c08ad200b8b1686e540a1c5dd757295b978c2341fadf27ab25b7894c54912b6daa53376cc0d
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -7,11 +7,40 @@ A chatterbot framework, inspired by Hubot.
|
|
7
7
|
## Usage
|
8
8
|
```sh
|
9
9
|
$ gem install ellen # Install `ellen` gem to your local machine
|
10
|
+
$ ellen --help # Show usage with --help
|
11
|
+
Usage: ellen [options]
|
12
|
+
-a, --adapter Take adapter name.
|
13
|
+
--dotenv Load .env before running.
|
14
|
+
-g, --generate Generate a new chatterbot with ./ellen/ directory if specified.
|
15
|
+
-l, --load Load a ruby file before running.
|
16
|
+
-h, --help Display this help message.
|
10
17
|
$ ellen --generate # Generate your new chatterbot with ./ellen/ directory
|
11
|
-
$ cd ellen #
|
12
|
-
$ vi Gemfile #
|
18
|
+
$ cd ellen # Change to ./ellen/
|
19
|
+
$ vi Gemfile # Add your favorite plugin gems
|
13
20
|
$ bundle exec ellen --adapter=shell # Run your chatterbot with specified adapter
|
14
21
|
```
|
15
22
|
|
16
|
-
##
|
17
|
-
|
23
|
+
## Adapter
|
24
|
+
You can create your own favorite adapter from
|
25
|
+
[Ellen::Adpaters::Base](https://github.com/r7kamura/ellen/blob/master/lib/ellen/adapters/base.rb)
|
26
|
+
class with #run method. Please see the following real examples for more details.
|
27
|
+
|
28
|
+
* [Ellen::Adapters::Hipchat](https://github.com/r7kamura/ellen-hipchat/blob/master/lib/ellen/adapters/hipchat.rb)
|
29
|
+
* [Ellen::Adapters::Shell](https://github.com/r7kamura/ellen/blob/master/lib/ellen/adapters/shell.rb)
|
30
|
+
|
31
|
+
## Handler
|
32
|
+
You can create your own handlers to add new behaviors from
|
33
|
+
[Ellen::Handlers::Base](https://github.com/r7kamura/ellen/blob/master/lib/ellen/handlers/base.rb) DSL.
|
34
|
+
|
35
|
+
* [Ellen::Handlers::Help](https://github.com/r7kamura/ellen/blob/master/lib/ellen/handlers/help.rb)
|
36
|
+
|
37
|
+
## Bundler
|
38
|
+
All you need to use your favorite plugins is to write their names into Gemfile.
|
39
|
+
Ellen will load them before running.
|
40
|
+
|
41
|
+
```ruby
|
42
|
+
# Gemfile
|
43
|
+
gem "ellen-foo"
|
44
|
+
gem "ellen-bar"
|
45
|
+
gem "ellen-baz"
|
46
|
+
```
|
data/ellen.gemspec
CHANGED
data/lib/ellen.rb
CHANGED
@@ -21,6 +21,7 @@ module Ellen
|
|
21
21
|
def options
|
22
22
|
Slop.parse!(arguments, help: true) do
|
23
23
|
on("a", "adapter=", "Take adapter name.")
|
24
|
+
on("dotenv", "Load .env before running.")
|
24
25
|
on("g", "generate", "Generate a new chatterbot with ./ellen/ directory if specified.")
|
25
26
|
on("l", "load=", "Load a ruby file before running.")
|
26
27
|
end.to_hash
|
data/lib/ellen/robot.rb
CHANGED
@@ -11,6 +11,7 @@ module Ellen
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def run
|
14
|
+
dotenv
|
14
15
|
bundle
|
15
16
|
setup
|
16
17
|
validate
|
@@ -39,6 +40,10 @@ module Ellen
|
|
39
40
|
Bundler.require
|
40
41
|
end
|
41
42
|
|
43
|
+
def dotenv
|
44
|
+
Dotenv.load if options[:dotenv]
|
45
|
+
end
|
46
|
+
|
42
47
|
def setup
|
43
48
|
load(options[:load]) if options[:load]
|
44
49
|
end
|
data/lib/ellen/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ellen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: dotenv
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: mem
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|