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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ab098eaece3e80f7a0dde63574d1bbe7db3886f1
4
- data.tar.gz: e7858dc5423c286bcff632c64cecca6adec89e37
3
+ metadata.gz: 12b873b1c9f840695e621ea2e6693232a4faff82
4
+ data.tar.gz: c5eccb7238797f7c8ebddeaf2025f3860c38de40
5
5
  SHA512:
6
- metadata.gz: cd793042d7ef5acd4c622d207755b89353f67bc0dc53f16b2a9b71bcdee99b23923d4e7d67d9dfb386db22a88f9bd85ba1f2fc9a3f0e728d63174b2d14629c37
7
- data.tar.gz: a0c2d570e78f9fd487e9aa98cfa9e1da8a63b79d09bbee54f8e1ec6c66fe81151573eff3d3af91ff6f94888cc0e4734cdac93ced4b8ef2f7ad895e2e2498e81e
6
+ metadata.gz: a4ce427e436aeeec794f9ba86670a378fd6a6d9d4fe76ec82e74d4268a6271cd920d87d140edcdb7891cec672b95e2a13d0da0a207518e192cb5e0e843beac87
7
+ data.tar.gz: b1b21d18af52340d5aa1fdbdd3bd5dde8015a2bf12ec59635bb5f03f8896fe2b4886adc5438295b21c8e0a21343876ad7110ecd73ebc56436fb8396b8a0b7922
data/Dockerfile CHANGED
@@ -19,7 +19,7 @@ ENV SPEC_PATH=$SPEC_PATH
19
19
  RUN gem install bundler -v 2.0.2
20
20
 
21
21
  RUN bundle install --verbose
22
- RUN bundle exec thor install lib/cli.thor --as botspec --force
22
+ RUN bundle exec thor install lib/cli.rb --as botspec --force
23
23
 
24
24
  ENTRYPOINT ["sh"]
25
25
 
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
- ```thor install lib/cli.thor --as botspec --force
42
+ ```
43
+ thor install lib/cli.thor --as botspec --force
43
44
  ```
44
45
  Then you can run
45
46
 
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby -wU
2
+
3
+ require 'cli'
4
+
5
+ Botspec::CLI.start( ARGV )
6
+
@@ -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
- #gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
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"
@@ -1 +1,7 @@
1
- require 'botspec'
1
+ require 'cli'
2
+
3
+ module Botspec
4
+
5
+ end
6
+
7
+ Botspec::CLI.start( ARGV )
@@ -1,3 +1,3 @@
1
1
  module Botspec
2
- VERSION = "0.4.16"
2
+ VERSION = "0.4.17"
3
3
  end
@@ -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.16
4
+ version: 0.4.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elliott Murray
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-27 00:00:00.000000000 Z
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.thor
198
+ - lib/cli.rb
197
199
  - lib/load_dialogs.rb
198
200
  - lib/rspec/botspec_runner.rb
199
201
  - script/minor.sh
@@ -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