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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 23065c0d5aa1922fa1078f897e5b3620394c0c00e776c70bd012bca60cf8c74a
4
- data.tar.gz: 71255e0efa07c83f76256e7666ee4bde0b27b4a0a85a872ab4aa2acd95141a8f
3
+ metadata.gz: 966fe48b707cfc244edd173ace278cc573cc7b9fd6a1dc34ec86686ce758adca
4
+ data.tar.gz: 65e7fe1b5e0495cce65cc3167143e92a4938d89f6f6bbe547daae22471243f2a
5
5
  SHA512:
6
- metadata.gz: 63306cf95873e8d588f94fbe594aee3c52106d36ddd23b99f5fefea62c2bd9e4f6c233f3d59c6f1bfeafe1ecc6fba2dd29d985fdb938af064904a2db65479f61
7
- data.tar.gz: 5eb30af8d68eb2dca38400d028f9ac427fa8f12187433cb6dd2bd648ad89c467aea83b37cfef16899fa6ca7240cc2cf206d6ee68ba8547141573156edd22a1ab
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.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.0)
36
- mustermann (1.0.3)
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.7)
54
+ rack (2.0.8)
54
55
  rack-contrib (2.1.0)
55
56
  rack (~> 2.0)
56
- rack-protection (2.0.7)
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.7)
87
+ sinatra (2.0.8.1)
86
88
  mustermann (~> 1.0)
87
89
  rack (~> 2.0)
88
- rack-protection (= 2.0.7)
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.0)
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": "Okay"} }' \
52
+ -d '{"command": "hehe", "params": { "name": "Annie", "state": "Ok"} }' \
53
53
  -H "Content-Type: application/json"
54
54
 
55
- #=> {"stdout":"Annie, are you Okay\n","stderr":"","exit_status":0}%
55
+ #=> {"stdout":"Annie, are you Ok?\n","stderr":"","exit_status":0}%
56
56
  ```
57
57
 
58
58
  ### With Rails
data/examples/config.yml CHANGED
@@ -8,7 +8,7 @@ commands:
8
8
  filename: '^[a-z]+$' # Some Regexp
9
9
  contents: '^[a-zA-Z0-9]*$'
10
10
  hehe:
11
- command: 'echo "{{name}}, are you {{state}}"'
11
+ command: 'echo "{{name}}, are you {{state}}?"'
12
12
  params:
13
13
  name: '^[a-zA-Z]+$'
14
14
  state: '^\S+$'
@@ -1,3 +1,3 @@
1
1
  module Webcommand
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
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.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: 2019-10-30 00:00:00.000000000 Z
11
+ date: 2020-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra