ruboty 1.1.3 → 1.1.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/lib/ruboty.rb +1 -0
- data/lib/ruboty/command_builder.rb +14 -6
- data/lib/ruboty/commands/help.rb +10 -0
- data/lib/ruboty/version.rb +1 -1
- data/ruboty.gemspec +1 -2
- metadata +6 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa15654d16ccd04937bfe8b9bf7fb83a690e7a39
|
4
|
+
data.tar.gz: d24a8b185b355c529113bb5c5161debd6138686b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db0cb0d37fcd362d5980c5ca050aacc9e74f6505849b2d4afb328ef0fb9cafdaaf5590ed5dcd28316a410c156522173e9094daef037788eaea0effb50d4dec22
|
7
|
+
data.tar.gz: a99bab4ff80aa6a6a3be9d50ba5baa86c034fe9aeaa61f548c6f093d2e648923d7b0d0b76cfa317e2f55ceda0b515c6b415be9166f5223cd0e6421bff6ad8a17
|
data/CHANGELOG.md
CHANGED
data/lib/ruboty.rb
CHANGED
@@ -47,6 +47,7 @@ require "ruboty/brains/memory"
|
|
47
47
|
require "ruboty/command_builder"
|
48
48
|
require "ruboty/commands/base"
|
49
49
|
require "ruboty/commands/generate"
|
50
|
+
require "ruboty/commands/help"
|
50
51
|
require "ruboty/commands/run"
|
51
52
|
require "ruboty/handlers/base"
|
52
53
|
require "ruboty/handlers/help"
|
@@ -15,15 +15,23 @@ module Ruboty
|
|
15
15
|
private
|
16
16
|
|
17
17
|
def command_class
|
18
|
-
|
18
|
+
case
|
19
|
+
when options[:generate]
|
20
|
+
Commands::Generate
|
21
|
+
when options[:help]
|
22
|
+
Commands::Help
|
23
|
+
else
|
24
|
+
Commands::Run
|
25
|
+
end
|
19
26
|
end
|
20
27
|
|
21
28
|
def options
|
22
|
-
Slop.parse
|
23
|
-
on("dotenv", "Load .env before running.")
|
24
|
-
on("g", "generate", "Generate a new chatterbot with ./ruboty/ directory if specified.")
|
25
|
-
on("
|
26
|
-
|
29
|
+
Slop.parse(arguments) do |options|
|
30
|
+
options.on("--dotenv", "Load .env before running.")
|
31
|
+
options.on("-g", "--generate", "Generate a new chatterbot with ./ruboty/ directory if specified.")
|
32
|
+
options.on("-h", "--help", "Display this help message.")
|
33
|
+
options.on("-l", "--load=", "Load a ruby file before running.")
|
34
|
+
end
|
27
35
|
end
|
28
36
|
memoize :options
|
29
37
|
end
|
data/lib/ruboty/version.rb
CHANGED
data/ruboty.gemspec
CHANGED
@@ -20,9 +20,8 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.add_dependency "bundler"
|
21
21
|
spec.add_dependency "dotenv"
|
22
22
|
spec.add_dependency "mem"
|
23
|
-
spec.add_dependency "slop"
|
23
|
+
spec.add_dependency "slop"
|
24
24
|
spec.add_development_dependency "codeclimate-test-reporter", ">= 0.3.0"
|
25
|
-
spec.add_development_dependency "pry"
|
26
25
|
spec.add_development_dependency "rake"
|
27
26
|
spec.add_development_dependency "rspec", "2.14.1"
|
28
27
|
spec.add_development_dependency "simplecov"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruboty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
@@ -70,16 +70,16 @@ dependencies:
|
|
70
70
|
name: slop
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '0'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: codeclimate-test-reporter
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,20 +94,6 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 0.3.0
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: pry
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
97
|
- !ruby/object:Gem::Dependency
|
112
98
|
name: rake
|
113
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -180,6 +166,7 @@ files:
|
|
180
166
|
- lib/ruboty/command_builder.rb
|
181
167
|
- lib/ruboty/commands/base.rb
|
182
168
|
- lib/ruboty/commands/generate.rb
|
169
|
+
- lib/ruboty/commands/help.rb
|
183
170
|
- lib/ruboty/commands/run.rb
|
184
171
|
- lib/ruboty/env.rb
|
185
172
|
- lib/ruboty/env/missing_required_key_error.rb
|