webcommand 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +10 -8
- data/README.md +6 -6
- data/examples/config.yml +1 -1
- data/lib/webcommand/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 966fe48b707cfc244edd173ace278cc573cc7b9fd6a1dc34ec86686ce758adca
|
4
|
+
data.tar.gz: 65e7fe1b5e0495cce65cc3167143e92a4938d89f6f6bbe547daae22471243f2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c198e703d829edb48dadb41418ecb994f69980e00329eb1cd024235c54dcec8a23f9797eaeaf03c1098ff112ee9c5086abb3cd2b0214301bbd3dcfdab45875de
|
7
|
+
data.tar.gz: 6b9f2275c83f98a2defff19522833c60d0808ac86e1ea7108e17b17f730288bcb0733f55a0567d6e06efd49617a4337bf85ab33f5d3a1a53e511a32ac0a0ae37
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
webcommand (0.1.
|
4
|
+
webcommand (0.1.2)
|
5
5
|
mustache (~> 1.0)
|
6
6
|
puma (~> 4.2.1)
|
7
7
|
rack-contrib (~> 2.1.0)
|
@@ -32,8 +32,9 @@ GEM
|
|
32
32
|
memoizable (0.4.2)
|
33
33
|
thread_safe (~> 0.3, >= 0.3.1)
|
34
34
|
method_source (0.9.2)
|
35
|
-
mustache (1.1.
|
36
|
-
mustermann (1.
|
35
|
+
mustache (1.1.1)
|
36
|
+
mustermann (1.1.1)
|
37
|
+
ruby2_keywords (~> 0.0.1)
|
37
38
|
nio4r (2.5.2)
|
38
39
|
parser (2.6.5.0)
|
39
40
|
ast (~> 2.4.0)
|
@@ -50,10 +51,10 @@ GEM
|
|
50
51
|
method_source (~> 0.9.0)
|
51
52
|
puma (4.2.1)
|
52
53
|
nio4r (~> 2.0)
|
53
|
-
rack (2.0.
|
54
|
+
rack (2.0.8)
|
54
55
|
rack-contrib (2.1.0)
|
55
56
|
rack (~> 2.0)
|
56
|
-
rack-protection (2.0.
|
57
|
+
rack-protection (2.0.8.1)
|
57
58
|
rack
|
58
59
|
rack-test (1.1.0)
|
59
60
|
rack (>= 1.0, < 3)
|
@@ -77,20 +78,21 @@ GEM
|
|
77
78
|
rspec (>= 2.13, < 4)
|
78
79
|
unparser
|
79
80
|
rspec-support (3.9.0)
|
81
|
+
ruby2_keywords (0.0.2)
|
80
82
|
simplecov (0.17.1)
|
81
83
|
docile (~> 1.1)
|
82
84
|
json (>= 1.8, < 3)
|
83
85
|
simplecov-html (~> 0.10.0)
|
84
86
|
simplecov-html (0.10.2)
|
85
|
-
sinatra (2.0.
|
87
|
+
sinatra (2.0.8.1)
|
86
88
|
mustermann (~> 1.0)
|
87
89
|
rack (~> 2.0)
|
88
|
-
rack-protection (= 2.0.
|
90
|
+
rack-protection (= 2.0.8.1)
|
89
91
|
tilt (~> 2.0)
|
90
92
|
thor (0.20.3)
|
91
93
|
thread_safe (0.3.6)
|
92
94
|
tilt (2.0.10)
|
93
|
-
tty-color (0.5.
|
95
|
+
tty-color (0.5.1)
|
94
96
|
tty-command (0.9.0)
|
95
97
|
pastel (~> 0.7.0)
|
96
98
|
unparser (0.4.5)
|
data/README.md
CHANGED
@@ -30,14 +30,14 @@ Create a config file specifying the commands you want to expose with the permitt
|
|
30
30
|
# my_config.yml
|
31
31
|
commands:
|
32
32
|
hello_world:
|
33
|
-
# Parameter without validations
|
34
|
-
command: 'echo "Hello {{world}}"'
|
33
|
+
# Parameter without validations
|
34
|
+
command: 'echo "Hello {{world}}"'
|
35
35
|
hehe:
|
36
|
-
command: 'echo "{{name}}, are you {{state}}"'
|
36
|
+
command: 'echo "{{name}}, are you {{state}}?"'
|
37
37
|
params:
|
38
38
|
# Validation can be configured with any REGEXP
|
39
39
|
name: '^[a-zA-Z]+$'
|
40
|
-
state: '^\S+$'
|
40
|
+
state: '^\S+$'
|
41
41
|
```
|
42
42
|
|
43
43
|
Run the webserver with the cli (*OBS: See the `webcommand help server
|
@@ -49,10 +49,10 @@ After that you can execute your commands throught the web api:
|
|
49
49
|
|
50
50
|
```sh
|
51
51
|
curl -X POST http://localhost:3000/executions \
|
52
|
-
-d '{"command": "hehe", "params": { "name": "Annie", "state": "
|
52
|
+
-d '{"command": "hehe", "params": { "name": "Annie", "state": "Ok"} }' \
|
53
53
|
-H "Content-Type: application/json"
|
54
54
|
|
55
|
-
#=> {"stdout":"Annie, are you
|
55
|
+
#=> {"stdout":"Annie, are you Ok?\n","stderr":"","exit_status":0}%
|
56
56
|
```
|
57
57
|
|
58
58
|
### With Rails
|
data/examples/config.yml
CHANGED
data/lib/webcommand/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webcommand
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carlos Atkinson Ferreira Filho
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|