superbot-local 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.rubocop.relaxed.yml +165 -0
- data/.rubocop.yml +64 -0
- data/.travis.yml +7 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +118 -0
- data/LICENSE.txt +21 -0
- data/README.md +31 -0
- data/Rakefile +8 -0
- data/bin/console +15 -0
- data/bin/release +23 -0
- data/bin/setup +8 -0
- data/exe/superbot-local +14 -0
- data/lib/superbot/local/cli/local/run_command.rb +20 -0
- data/lib/superbot/local/cli/local/version_command.rb +13 -0
- data/lib/superbot/local/cli/local_command.rb +20 -0
- data/lib/superbot/local/cli/root_command.rb +11 -0
- data/lib/superbot/local/cli.rb +3 -0
- data/lib/superbot/local/version.rb +7 -0
- data/lib/superbot/local.rb +9 -0
- data/mytest/main.rb +1 -0
- data/superbot-local.gemspec +43 -0
- metadata +172 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a1eb71f723f32d03f2483cfdb3453bd5c53a8ca4b936fb27277a888e399d5884
|
4
|
+
data.tar.gz: c6c6466b86b145c7c5f3f284eef92587ac072dab4c2476cd3e0848fe40dff184
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 33b5fe1c59582ccae49629342e896f57fee2b3a1718bc5e29686ded214a2c5a45a2d5ef71012f601fb1a157b114bc7bf990cb62bc9f184324801bcb921041a32
|
7
|
+
data.tar.gz: 9f40d402316ae350fe1222eaa291ccec3a331f43f84cb9293636d1a436227112f34a5888a75b5610cf899eb5eceb6baf06ea2ebd7c2ddad182bb950bad96f2e9
|
data/.gitignore
ADDED
data/.rspec
ADDED
@@ -0,0 +1,165 @@
|
|
1
|
+
# Relaxed.Ruby.Style
|
2
|
+
## Version 2.2
|
3
|
+
|
4
|
+
Style/Alias:
|
5
|
+
Enabled: false
|
6
|
+
StyleGuide: http://relaxed.ruby.style/#stylealias
|
7
|
+
|
8
|
+
Style/AsciiComments:
|
9
|
+
Enabled: false
|
10
|
+
StyleGuide: http://relaxed.ruby.style/#styleasciicomments
|
11
|
+
|
12
|
+
Style/BeginBlock:
|
13
|
+
Enabled: false
|
14
|
+
StyleGuide: http://relaxed.ruby.style/#stylebeginblock
|
15
|
+
|
16
|
+
Style/BlockDelimiters:
|
17
|
+
Enabled: false
|
18
|
+
StyleGuide: http://relaxed.ruby.style/#styleblockdelimiters
|
19
|
+
|
20
|
+
Style/CommentAnnotation:
|
21
|
+
Enabled: false
|
22
|
+
StyleGuide: http://relaxed.ruby.style/#stylecommentannotation
|
23
|
+
|
24
|
+
Style/Documentation:
|
25
|
+
Enabled: false
|
26
|
+
StyleGuide: http://relaxed.ruby.style/#styledocumentation
|
27
|
+
|
28
|
+
Layout/DotPosition:
|
29
|
+
Enabled: false
|
30
|
+
StyleGuide: http://relaxed.ruby.style/#layoutdotposition
|
31
|
+
|
32
|
+
Style/DoubleNegation:
|
33
|
+
Enabled: false
|
34
|
+
StyleGuide: http://relaxed.ruby.style/#styledoublenegation
|
35
|
+
|
36
|
+
Style/EndBlock:
|
37
|
+
Enabled: false
|
38
|
+
StyleGuide: http://relaxed.ruby.style/#styleendblock
|
39
|
+
|
40
|
+
Style/FormatString:
|
41
|
+
Enabled: false
|
42
|
+
StyleGuide: http://relaxed.ruby.style/#styleformatstring
|
43
|
+
|
44
|
+
Style/IfUnlessModifier:
|
45
|
+
Enabled: false
|
46
|
+
StyleGuide: http://relaxed.ruby.style/#styleifunlessmodifier
|
47
|
+
|
48
|
+
Style/Lambda:
|
49
|
+
Enabled: false
|
50
|
+
StyleGuide: http://relaxed.ruby.style/#stylelambda
|
51
|
+
|
52
|
+
Style/ModuleFunction:
|
53
|
+
Enabled: false
|
54
|
+
StyleGuide: http://relaxed.ruby.style/#stylemodulefunction
|
55
|
+
|
56
|
+
Style/MultilineBlockChain:
|
57
|
+
Enabled: false
|
58
|
+
StyleGuide: http://relaxed.ruby.style/#stylemultilineblockchain
|
59
|
+
|
60
|
+
Style/NegatedIf:
|
61
|
+
Enabled: false
|
62
|
+
StyleGuide: http://relaxed.ruby.style/#stylenegatedif
|
63
|
+
|
64
|
+
Style/NegatedWhile:
|
65
|
+
Enabled: false
|
66
|
+
StyleGuide: http://relaxed.ruby.style/#stylenegatedwhile
|
67
|
+
|
68
|
+
Style/ParallelAssignment:
|
69
|
+
Enabled: false
|
70
|
+
StyleGuide: http://relaxed.ruby.style/#styleparallelassignment
|
71
|
+
|
72
|
+
Style/PercentLiteralDelimiters:
|
73
|
+
Enabled: false
|
74
|
+
StyleGuide: http://relaxed.ruby.style/#stylepercentliteraldelimiters
|
75
|
+
|
76
|
+
Style/PerlBackrefs:
|
77
|
+
Enabled: false
|
78
|
+
StyleGuide: http://relaxed.ruby.style/#styleperlbackrefs
|
79
|
+
|
80
|
+
Style/Semicolon:
|
81
|
+
Enabled: false
|
82
|
+
StyleGuide: http://relaxed.ruby.style/#stylesemicolon
|
83
|
+
|
84
|
+
Style/SignalException:
|
85
|
+
Enabled: false
|
86
|
+
StyleGuide: http://relaxed.ruby.style/#stylesignalexception
|
87
|
+
|
88
|
+
Style/SingleLineBlockParams:
|
89
|
+
Enabled: false
|
90
|
+
StyleGuide: http://relaxed.ruby.style/#stylesinglelineblockparams
|
91
|
+
|
92
|
+
Style/SingleLineMethods:
|
93
|
+
Enabled: false
|
94
|
+
StyleGuide: http://relaxed.ruby.style/#stylesinglelinemethods
|
95
|
+
|
96
|
+
Layout/SpaceBeforeBlockBraces:
|
97
|
+
Enabled: false
|
98
|
+
StyleGuide: http://relaxed.ruby.style/#layoutspacebeforeblockbraces
|
99
|
+
|
100
|
+
Layout/SpaceInsideParens:
|
101
|
+
Enabled: false
|
102
|
+
StyleGuide: http://relaxed.ruby.style/#layoutspaceinsideparens
|
103
|
+
|
104
|
+
Style/SpecialGlobalVars:
|
105
|
+
Enabled: false
|
106
|
+
StyleGuide: http://relaxed.ruby.style/#stylespecialglobalvars
|
107
|
+
|
108
|
+
Style/StringLiterals:
|
109
|
+
Enabled: false
|
110
|
+
StyleGuide: http://relaxed.ruby.style/#stylestringliterals
|
111
|
+
|
112
|
+
# Style/TrailingCommaInArguments:
|
113
|
+
# Enabled: false
|
114
|
+
# StyleGuide: http://relaxed.ruby.style/#styletrailingcommainarguments
|
115
|
+
#
|
116
|
+
# Style/TrailingCommaInArrayLiteral:
|
117
|
+
# Enabled: false
|
118
|
+
# StyleGuide: http://relaxed.ruby.style/#styletrailingcommainarrayliteral
|
119
|
+
#
|
120
|
+
# Style/TrailingCommaInHashLiteral:
|
121
|
+
# Enabled: false
|
122
|
+
# StyleGuide: http://relaxed.ruby.style/#styletrailingcommainhashliteral
|
123
|
+
|
124
|
+
Style/WhileUntilModifier:
|
125
|
+
Enabled: false
|
126
|
+
StyleGuide: http://relaxed.ruby.style/#stylewhileuntilmodifier
|
127
|
+
|
128
|
+
Style/WordArray:
|
129
|
+
Enabled: false
|
130
|
+
StyleGuide: http://relaxed.ruby.style/#stylewordarray
|
131
|
+
|
132
|
+
Lint/AmbiguousRegexpLiteral:
|
133
|
+
Enabled: false
|
134
|
+
StyleGuide: http://relaxed.ruby.style/#lintambiguousregexpliteral
|
135
|
+
|
136
|
+
Lint/AssignmentInCondition:
|
137
|
+
Enabled: false
|
138
|
+
StyleGuide: http://relaxed.ruby.style/#lintassignmentincondition
|
139
|
+
|
140
|
+
Metrics/AbcSize:
|
141
|
+
Enabled: false
|
142
|
+
|
143
|
+
Metrics/BlockNesting:
|
144
|
+
Enabled: false
|
145
|
+
|
146
|
+
Metrics/ClassLength:
|
147
|
+
Enabled: false
|
148
|
+
|
149
|
+
Metrics/ModuleLength:
|
150
|
+
Enabled: false
|
151
|
+
|
152
|
+
Metrics/CyclomaticComplexity:
|
153
|
+
Enabled: false
|
154
|
+
|
155
|
+
Metrics/LineLength:
|
156
|
+
Enabled: false
|
157
|
+
|
158
|
+
Metrics/MethodLength:
|
159
|
+
Enabled: false
|
160
|
+
|
161
|
+
Metrics/ParameterLists:
|
162
|
+
Enabled: false
|
163
|
+
|
164
|
+
Metrics/PerceivedComplexity:
|
165
|
+
Enabled: false
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
inherit_from: .rubocop.relaxed.yml
|
2
|
+
|
3
|
+
AllCops:
|
4
|
+
Exclude:
|
5
|
+
- __test/**
|
6
|
+
- spec/**/*
|
7
|
+
- Gemfile
|
8
|
+
- "*.gemspec"
|
9
|
+
- bundler/**/*
|
10
|
+
- vendor/bundle/**/* # travis with --deployment
|
11
|
+
TargetRubyVersion: 2.4
|
12
|
+
|
13
|
+
Style/PercentLiteralDelimiters:
|
14
|
+
PreferredDelimiters:
|
15
|
+
default: ()
|
16
|
+
'%i': '()'
|
17
|
+
'%I': '()'
|
18
|
+
'%r': '{}'
|
19
|
+
'%w': '()'
|
20
|
+
'%W': '()'
|
21
|
+
|
22
|
+
Style/FormatString:
|
23
|
+
EnforcedStyle: percent
|
24
|
+
|
25
|
+
Style/FrozenStringLiteralComment:
|
26
|
+
EnforcedStyle: always
|
27
|
+
|
28
|
+
Style/WordArray:
|
29
|
+
Enabled: true
|
30
|
+
MinSize: 3
|
31
|
+
|
32
|
+
Style/SymbolArray:
|
33
|
+
Enabled: true
|
34
|
+
MinSize: 3
|
35
|
+
|
36
|
+
Gemspec/OrderedDependencies:
|
37
|
+
Enabled: false
|
38
|
+
|
39
|
+
Style/PerlBackrefs:
|
40
|
+
Enabled: true
|
41
|
+
|
42
|
+
Layout/SpaceInsideParens:
|
43
|
+
Enabled: true
|
44
|
+
|
45
|
+
Style/SpecialGlobalVars:
|
46
|
+
Enabled: true
|
47
|
+
|
48
|
+
Style/Alias:
|
49
|
+
Enabled: true
|
50
|
+
|
51
|
+
Style/BeginBlock:
|
52
|
+
Enabled: true
|
53
|
+
|
54
|
+
Naming/UncommunicativeMethodParamName:
|
55
|
+
AllowedNames:
|
56
|
+
- cn
|
57
|
+
|
58
|
+
# new in 0.56, seems to give false-positivies
|
59
|
+
# https://github.com/bbatsov/rubocop/issues/5887
|
60
|
+
Lint/SplatKeywordArguments:
|
61
|
+
Enabled: false
|
62
|
+
|
63
|
+
Metrics/BlockLength:
|
64
|
+
Enabled: false
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,118 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
superbot-local (0.1.0)
|
5
|
+
superbot
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
addressable (2.5.2)
|
11
|
+
public_suffix (>= 2.0.2, < 4.0)
|
12
|
+
archive-zip (0.11.0)
|
13
|
+
io-like (~> 0.3.0)
|
14
|
+
ast (2.4.0)
|
15
|
+
capybara (3.6.0)
|
16
|
+
addressable
|
17
|
+
mini_mime (>= 0.1.3)
|
18
|
+
nokogiri (~> 1.8)
|
19
|
+
rack (>= 1.6.0)
|
20
|
+
rack-test (>= 0.6.3)
|
21
|
+
xpath (~> 3.1)
|
22
|
+
childprocess (0.9.0)
|
23
|
+
ffi (~> 1.0, >= 1.0.11)
|
24
|
+
chromedriver-helper (1.2.0)
|
25
|
+
archive-zip (~> 0.10)
|
26
|
+
nokogiri (~> 1.8)
|
27
|
+
cjsonci (0.1.0)
|
28
|
+
clamp (1.2.1)
|
29
|
+
diff-lcs (1.3)
|
30
|
+
ffi (1.9.25)
|
31
|
+
io-like (0.3.0)
|
32
|
+
jaro_winkler (1.5.1)
|
33
|
+
kommando (0.1.2)
|
34
|
+
launchy (2.4.3)
|
35
|
+
addressable (~> 2.3)
|
36
|
+
mini_mime (1.0.1)
|
37
|
+
mini_portile2 (2.3.0)
|
38
|
+
mustermann (1.0.3)
|
39
|
+
nokogiri (1.8.4)
|
40
|
+
mini_portile2 (~> 2.3.0)
|
41
|
+
parallel (1.12.1)
|
42
|
+
parser (2.5.1.2)
|
43
|
+
ast (~> 2.4.0)
|
44
|
+
powerpack (0.1.2)
|
45
|
+
public_suffix (3.0.3)
|
46
|
+
rack (2.0.5)
|
47
|
+
rack-protection (2.0.3)
|
48
|
+
rack
|
49
|
+
rack-test (1.1.0)
|
50
|
+
rack (>= 1.0, < 3)
|
51
|
+
rainbow (3.0.0)
|
52
|
+
rake (10.5.0)
|
53
|
+
rspec (3.8.0)
|
54
|
+
rspec-core (~> 3.8.0)
|
55
|
+
rspec-expectations (~> 3.8.0)
|
56
|
+
rspec-mocks (~> 3.8.0)
|
57
|
+
rspec-core (3.8.0)
|
58
|
+
rspec-support (~> 3.8.0)
|
59
|
+
rspec-expectations (3.8.1)
|
60
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
61
|
+
rspec-support (~> 3.8.0)
|
62
|
+
rspec-mocks (3.8.0)
|
63
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
64
|
+
rspec-support (~> 3.8.0)
|
65
|
+
rspec-support (3.8.0)
|
66
|
+
rubocop (0.59.2)
|
67
|
+
jaro_winkler (~> 1.5.1)
|
68
|
+
parallel (~> 1.10)
|
69
|
+
parser (>= 2.5, != 2.5.1.1)
|
70
|
+
powerpack (~> 0.1)
|
71
|
+
rainbow (>= 2.2.2, < 4.0)
|
72
|
+
ruby-progressbar (~> 1.7)
|
73
|
+
unicode-display_width (~> 1.0, >= 1.0.1)
|
74
|
+
ruby-progressbar (1.10.0)
|
75
|
+
rubyzip (1.2.2)
|
76
|
+
selenium-webdriver (3.14.0)
|
77
|
+
childprocess (~> 0.5)
|
78
|
+
rubyzip (~> 1.2)
|
79
|
+
sinatra (2.0.3)
|
80
|
+
mustermann (~> 1.0)
|
81
|
+
rack (~> 2.0)
|
82
|
+
rack-protection (= 2.0.3)
|
83
|
+
tilt (~> 2.0)
|
84
|
+
sinatra-silent (0.0.1)
|
85
|
+
superbot (0.1.1)
|
86
|
+
clamp (= 1.2.1)
|
87
|
+
launchy (= 2.4.3)
|
88
|
+
sinatra (= 2.0.3)
|
89
|
+
sinatra-silent (= 0.0.1)
|
90
|
+
superbot-capybara
|
91
|
+
zaru (= 0.2.0)
|
92
|
+
superbot-capybara (360.0.0)
|
93
|
+
capybara (= 3.6.0)
|
94
|
+
cjsonci (= 0.1.0)
|
95
|
+
superbot-selenium-webdriver (= 314.2.5)
|
96
|
+
superbot-selenium-webdriver (314.2.5)
|
97
|
+
chromedriver-helper (= 1.2.0)
|
98
|
+
selenium-webdriver (= 3.14.0)
|
99
|
+
tilt (2.0.8)
|
100
|
+
unicode-display_width (1.4.0)
|
101
|
+
xpath (3.1.0)
|
102
|
+
nokogiri (~> 1.8)
|
103
|
+
zaru (0.2.0)
|
104
|
+
|
105
|
+
PLATFORMS
|
106
|
+
ruby
|
107
|
+
|
108
|
+
DEPENDENCIES
|
109
|
+
bundler (~> 1.16)
|
110
|
+
kommando (~> 0.1)
|
111
|
+
rake (~> 10.0)
|
112
|
+
rspec (~> 3.0)
|
113
|
+
rubocop (~> 0.53)
|
114
|
+
superbot-capybara
|
115
|
+
superbot-local!
|
116
|
+
|
117
|
+
BUNDLED WITH
|
118
|
+
1.16.4
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 DeeMak13
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# Superbot::Local
|
2
|
+
|
3
|
+
## Installation
|
4
|
+
|
5
|
+
Add this line to your application's Gemfile:
|
6
|
+
|
7
|
+
```ruby
|
8
|
+
gem 'superbot-local'
|
9
|
+
```
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install superbot-local
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
`superbot local run mytest`
|
22
|
+
|
23
|
+
## Development
|
24
|
+
|
25
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
26
|
+
|
27
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
28
|
+
|
29
|
+
## Contributing
|
30
|
+
|
31
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/superbot-local.
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "bundler/setup"
|
5
|
+
require "superbot/local"
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
11
|
+
# require "pry"
|
12
|
+
# Pry.start
|
13
|
+
|
14
|
+
require "irb"
|
15
|
+
IRB.start(__FILE__)
|
data/bin/release
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
#!/usr/bin/env sh
|
2
|
+
|
3
|
+
set -e
|
4
|
+
|
5
|
+
VERSION=$(exe/superbot-local version)
|
6
|
+
GEM_FILE="superbot-local-$VERSION.gem"
|
7
|
+
|
8
|
+
gem uninstall -a -x superbot-local
|
9
|
+
|
10
|
+
[ -e "$GEM_FILE" ] && rm "$GEM_FILE"
|
11
|
+
|
12
|
+
gem build superbot-local
|
13
|
+
gem install superbot-local-$VERSION.gem
|
14
|
+
VERSION_INSTALLED=$(superbot-local version)
|
15
|
+
|
16
|
+
if [ "$VERSION" != "$VERSION_INSTALLED" ]; then
|
17
|
+
echo "!version"
|
18
|
+
exit 1
|
19
|
+
fi
|
20
|
+
|
21
|
+
superbot-local
|
22
|
+
|
23
|
+
echo "ok"
|
data/bin/setup
ADDED
data/exe/superbot-local
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
# add lib to libpath (only needed when running from the sources)
|
5
|
+
require 'pathname'
|
6
|
+
lib_path = File.expand_path('../../lib', Pathname.new(__FILE__).realpath)
|
7
|
+
$LOAD_PATH.unshift lib_path unless $LOAD_PATH.include?(lib_path)
|
8
|
+
|
9
|
+
STDOUT.sync = true
|
10
|
+
|
11
|
+
require 'superbot'
|
12
|
+
require 'superbot/local'
|
13
|
+
|
14
|
+
Superbot::CLI::LocalCommand.run
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Superbot
|
4
|
+
module CLI
|
5
|
+
module Local
|
6
|
+
class RunCommand < Clamp::Command
|
7
|
+
include Superbot::Validations
|
8
|
+
|
9
|
+
parameter "PATH", "project directory" do |path|
|
10
|
+
validates_project_path path
|
11
|
+
end
|
12
|
+
|
13
|
+
def execute
|
14
|
+
script = File.read(File.join(path, 'main.rb'))
|
15
|
+
Superbot::Capybara::Runner.run(script)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'local/version_command'
|
4
|
+
require_relative 'local/run_command'
|
5
|
+
|
6
|
+
module Superbot
|
7
|
+
module CLI
|
8
|
+
class LocalCommand < Clamp::Command
|
9
|
+
subcommand ['run'], "Run tests from local directory", Local::RunCommand
|
10
|
+
subcommand ['version'], "Superbot local version", Local::VersionCommand
|
11
|
+
|
12
|
+
def self.run
|
13
|
+
super
|
14
|
+
rescue StandardError => exc
|
15
|
+
warn exc.message
|
16
|
+
warn exc.backtrace.join("\n")
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/mytest/main.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
visit "http://example.com"
|
@@ -0,0 +1,43 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "superbot/local/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "superbot-local"
|
8
|
+
spec.version = Superbot::Local::VERSION
|
9
|
+
spec.authors = ["Superbots"]
|
10
|
+
spec.email = [""]
|
11
|
+
|
12
|
+
spec.summary = %q{Superbot local gem extention}
|
13
|
+
spec.description = %q{Run your superbot test scripts locally}
|
14
|
+
spec.homepage = "https://github.com/superbothq/superbot-local"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
|
+
# if spec.respond_to?(:metadata)
|
20
|
+
# spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
|
21
|
+
# else
|
22
|
+
# raise "RubyGems 2.0 or newer is required to protect against " \
|
23
|
+
# "public gem pushes."
|
24
|
+
# end
|
25
|
+
|
26
|
+
# Specify which files should be added to the gem when it is released.
|
27
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
28
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
29
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
30
|
+
end
|
31
|
+
spec.bindir = "exe"
|
32
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
33
|
+
spec.require_paths = ["lib"]
|
34
|
+
|
35
|
+
spec.add_runtime_dependency "superbot", "~> 0.1.2"
|
36
|
+
spec.add_runtime_dependency "superbot-capybara", "~> 360.0", ">= 360.0.0"
|
37
|
+
|
38
|
+
spec.add_development_dependency "kommando", "~> 0.1"
|
39
|
+
spec.add_development_dependency "bundler", "~> 1.16"
|
40
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
41
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
42
|
+
spec.add_development_dependency "rubocop", "~> 0.53"
|
43
|
+
end
|
metadata
ADDED
@@ -0,0 +1,172 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: superbot-local
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Superbots
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-10-15 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: superbot
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.1.2
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.1.2
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: superbot-capybara
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '360.0'
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 360.0.0
|
37
|
+
type: :runtime
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - "~>"
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '360.0'
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 360.0.0
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: kommando
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0.1'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0.1'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: bundler
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - "~>"
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '1.16'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '1.16'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: rake
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '10.0'
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '10.0'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: rspec
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '3.0'
|
96
|
+
type: :development
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '3.0'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: rubocop
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - "~>"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0.53'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "~>"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0.53'
|
117
|
+
description: Run your superbot test scripts locally
|
118
|
+
email:
|
119
|
+
- ''
|
120
|
+
executables:
|
121
|
+
- superbot-local
|
122
|
+
extensions: []
|
123
|
+
extra_rdoc_files: []
|
124
|
+
files:
|
125
|
+
- ".gitignore"
|
126
|
+
- ".rspec"
|
127
|
+
- ".rubocop.relaxed.yml"
|
128
|
+
- ".rubocop.yml"
|
129
|
+
- ".travis.yml"
|
130
|
+
- Gemfile
|
131
|
+
- Gemfile.lock
|
132
|
+
- LICENSE.txt
|
133
|
+
- README.md
|
134
|
+
- Rakefile
|
135
|
+
- bin/console
|
136
|
+
- bin/release
|
137
|
+
- bin/setup
|
138
|
+
- exe/superbot-local
|
139
|
+
- lib/superbot/local.rb
|
140
|
+
- lib/superbot/local/cli.rb
|
141
|
+
- lib/superbot/local/cli/local/run_command.rb
|
142
|
+
- lib/superbot/local/cli/local/version_command.rb
|
143
|
+
- lib/superbot/local/cli/local_command.rb
|
144
|
+
- lib/superbot/local/cli/root_command.rb
|
145
|
+
- lib/superbot/local/version.rb
|
146
|
+
- mytest/main.rb
|
147
|
+
- superbot-local.gemspec
|
148
|
+
homepage: https://github.com/superbothq/superbot-local
|
149
|
+
licenses:
|
150
|
+
- MIT
|
151
|
+
metadata: {}
|
152
|
+
post_install_message:
|
153
|
+
rdoc_options: []
|
154
|
+
require_paths:
|
155
|
+
- lib
|
156
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
157
|
+
requirements:
|
158
|
+
- - ">="
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: '0'
|
161
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - ">="
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '0'
|
166
|
+
requirements: []
|
167
|
+
rubyforge_project:
|
168
|
+
rubygems_version: 2.7.6
|
169
|
+
signing_key:
|
170
|
+
specification_version: 4
|
171
|
+
summary: Superbot local gem extention
|
172
|
+
test_files: []
|