botspec 0.4.16 → 0.4.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Dockerfile +1 -1
- data/README.md +2 -1
- data/bin/botspec +6 -0
- data/botspec.gemspec +2 -5
- data/lib/botspec.rb +7 -1
- data/lib/botspec/version.rb +1 -1
- data/lib/cli.rb +29 -0
- metadata +7 -5
- data/lib/cli.thor +0 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12b873b1c9f840695e621ea2e6693232a4faff82
|
4
|
+
data.tar.gz: c5eccb7238797f7c8ebddeaf2025f3860c38de40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4ce427e436aeeec794f9ba86670a378fd6a6d9d4fe76ec82e74d4268a6271cd920d87d140edcdb7891cec672b95e2a13d0da0a207518e192cb5e0e843beac87
|
7
|
+
data.tar.gz: b1b21d18af52340d5aa1fdbdd3bd5dde8015a2bf12ec59635bb5f03f8896fe2b4886adc5438295b21c8e0a21343876ad7110ecd73ebc56436fb8396b8a0b7922
|
data/Dockerfile
CHANGED
data/README.md
CHANGED
@@ -39,7 +39,8 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
39
39
|
|
40
40
|
## Running a command
|
41
41
|
To install run
|
42
|
-
```
|
42
|
+
```
|
43
|
+
thor install lib/cli.thor --as botspec --force
|
43
44
|
```
|
44
45
|
Then you can run
|
45
46
|
|
data/bin/botspec
ADDED
data/botspec.gemspec
CHANGED
@@ -28,15 +28,12 @@ Gem::Specification.new do |gem|
|
|
28
28
|
gem.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
29
29
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
30
30
|
end
|
31
|
-
gem.bindir = "exe"
|
32
|
-
|
33
|
-
|
34
|
-
# gem.executables = gem.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
31
|
+
#gem.bindir = "exe"
|
32
|
+
gem.executables = %w(botspec)
|
35
33
|
gem.require_paths = ["lib"]
|
36
34
|
|
37
35
|
gem.add_runtime_dependency "rspec", "~> 3.0"
|
38
36
|
gem.add_runtime_dependency 'term-ansicolor', '~> 1.0'
|
39
|
-
#gem.add_runtime_dependency 'aws-sdk', "~> 3.0.1"
|
40
37
|
gem.add_runtime_dependency 'aws-sdk-lex', '~> 1'
|
41
38
|
gem.add_runtime_dependency 'aws-sdk-lexmodelbuildingservice', '~> 1'
|
42
39
|
gem.add_runtime_dependency 'thor', "~> 0.20.0"
|
data/lib/botspec.rb
CHANGED
data/lib/botspec/version.rb
CHANGED
data/lib/cli.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
|
2
|
+
require 'botspec/lex/lex_service.rb'
|
3
|
+
require 'botspec/version'
|
4
|
+
require 'thor'
|
5
|
+
require 'load_dialogs.rb'
|
6
|
+
require 'rspec/botspec_runner.rb'
|
7
|
+
|
8
|
+
module Botspec
|
9
|
+
class CLI < Thor
|
10
|
+
|
11
|
+
desc 'verify', "Verify a chat suite"
|
12
|
+
method_option :dialogs, aliases: "-f", desc: "Yaml file containing dialogs", :required => true
|
13
|
+
method_option :botname, aliases: "-n", desc: "The name of the Amazon Web Services Lex chatbot"
|
14
|
+
|
15
|
+
def verify()
|
16
|
+
dialogs = options[:dialogs]
|
17
|
+
|
18
|
+
if options[:botname]
|
19
|
+
bot_name = options[:botname]
|
20
|
+
elsif raise "No bot specified"
|
21
|
+
end
|
22
|
+
|
23
|
+
puts "running specs in #{dialogs} for bot #{bot_name}"
|
24
|
+
|
25
|
+
BotSpec::BotSpecRunner.run({dialogs_path: dialogs, botname: bot_name})
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: botspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elliott Murray
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -167,7 +167,8 @@ dependencies:
|
|
167
167
|
description: Acceptance tests for bots
|
168
168
|
email:
|
169
169
|
- elliottmurray@gmail.com
|
170
|
-
executables:
|
170
|
+
executables:
|
171
|
+
- botspec
|
171
172
|
extensions: []
|
172
173
|
extra_rdoc_files: []
|
173
174
|
files:
|
@@ -184,6 +185,7 @@ files:
|
|
184
185
|
- LICENSE.txt
|
185
186
|
- README.md
|
186
187
|
- Rakefile
|
188
|
+
- bin/botspec
|
187
189
|
- bin/console
|
188
190
|
- bin/setup
|
189
191
|
- botspec.gemspec
|
@@ -193,7 +195,7 @@ files:
|
|
193
195
|
- lib/botspec/tasks/verification_task.rb
|
194
196
|
- lib/botspec/version.rb
|
195
197
|
- lib/chatbot_helpers.rb
|
196
|
-
- lib/cli.
|
198
|
+
- lib/cli.rb
|
197
199
|
- lib/load_dialogs.rb
|
198
200
|
- lib/rspec/botspec_runner.rb
|
199
201
|
- script/minor.sh
|
data/lib/cli.thor
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
|
2
|
-
require 'botspec/lex/lex_service.rb'
|
3
|
-
require 'botspec/version'
|
4
|
-
require 'thor'
|
5
|
-
require 'load_dialogs.rb'
|
6
|
-
require 'rspec/botspec_runner.rb'
|
7
|
-
|
8
|
-
class CLI < Thor
|
9
|
-
|
10
|
-
desc 'verify', "Verify a chat suite"
|
11
|
-
method_option :dialogs, aliases: "-f", desc: "Yaml file containing dialogs", :required => true
|
12
|
-
method_option :botname, aliases: "-n", desc: "The name of the Amazon Web Services Lex chatbot"
|
13
|
-
|
14
|
-
def verify()
|
15
|
-
dialogs = options[:dialogs]
|
16
|
-
|
17
|
-
bot_name = 'ElliottOrderFlowers'
|
18
|
-
if options[:botname]
|
19
|
-
bot_name = options[:botname]
|
20
|
-
end
|
21
|
-
|
22
|
-
puts "running specs in #{dialogs} for bot #{bot_name}"
|
23
|
-
|
24
|
-
BotSpec::BotSpecRunner.run({dialogs_path: dialogs, botname: bot_name})
|
25
|
-
end
|
26
|
-
|
27
|
-
end
|