webcommand 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 +12 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/Gemfile +10 -0
- data/Gemfile.lock +116 -0
- data/LICENSE.txt +21 -0
- data/README.md +39 -0
- data/Rakefile +18 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/examples/config.yml +10 -0
- data/exe/webcommand +16 -0
- data/lib/webcommand/command.rb +54 -0
- data/lib/webcommand/commands.rb +19 -0
- data/lib/webcommand/config.rb +11 -0
- data/lib/webcommand/extensions/hash_extension.rb +18 -0
- data/lib/webcommand/server.rb +22 -0
- data/lib/webcommand/version.rb +3 -0
- data/lib/webcommand.rb +35 -0
- data/webcommand.gemspec +37 -0
- metadata +205 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3d90f6edaa78ce0fdf2f1d47b517da8fa6c7f343d19746ad944850deb4c5a873
|
4
|
+
data.tar.gz: 7544ff646622a5c166ede708b64f73df051f5d1a6797f8a540202e973fae305b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1ce19810d533d0e8e3bb3777a0f5a13cdedd708876ff4addd185f318d9bddd4a7d6fd727f25a269e7efe5ce87e50828686822d45e29854f2459b103255c7adda
|
7
|
+
data.tar.gz: 9eab9ebd5dc881afd3431d9c43ccb909197d616010db4199e47e34ae5b414a32a10bd3c3c89e208a0962b49cf7f4d780de0b340bd10dd25f07214ab021ad5287
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,116 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
webcommand (0.1.0)
|
5
|
+
mustache (~> 1.0)
|
6
|
+
rack-contrib (~> 2.1.0)
|
7
|
+
sinatra (~> 2.0.7)
|
8
|
+
thor (~> 0.20.3)
|
9
|
+
tty-command (~> 0.9.0)
|
10
|
+
|
11
|
+
GEM
|
12
|
+
remote: https://rubygems.org/
|
13
|
+
specs:
|
14
|
+
abstract_type (0.0.7)
|
15
|
+
adamantium (0.2.0)
|
16
|
+
ice_nine (~> 0.11.0)
|
17
|
+
memoizable (~> 0.4.0)
|
18
|
+
ast (2.4.0)
|
19
|
+
binding_ninja (0.2.3)
|
20
|
+
byebug (11.0.1)
|
21
|
+
coderay (1.1.2)
|
22
|
+
concord (0.1.5)
|
23
|
+
adamantium (~> 0.2.0)
|
24
|
+
equalizer (~> 0.0.9)
|
25
|
+
diff-lcs (1.3)
|
26
|
+
docile (1.3.2)
|
27
|
+
equalizer (0.0.11)
|
28
|
+
equatable (0.6.1)
|
29
|
+
ice_nine (0.11.2)
|
30
|
+
json (2.2.0)
|
31
|
+
memoizable (0.4.2)
|
32
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
33
|
+
method_source (0.9.2)
|
34
|
+
mustache (1.1.0)
|
35
|
+
mustermann (1.0.3)
|
36
|
+
parser (2.6.5.0)
|
37
|
+
ast (~> 2.4.0)
|
38
|
+
pastel (0.7.3)
|
39
|
+
equatable (~> 0.6)
|
40
|
+
tty-color (~> 0.5)
|
41
|
+
proc_to_ast (0.1.0)
|
42
|
+
coderay
|
43
|
+
parser
|
44
|
+
unparser
|
45
|
+
procto (0.0.3)
|
46
|
+
pry (0.12.2)
|
47
|
+
coderay (~> 1.1.0)
|
48
|
+
method_source (~> 0.9.0)
|
49
|
+
rack (2.0.7)
|
50
|
+
rack-contrib (2.1.0)
|
51
|
+
rack (~> 2.0)
|
52
|
+
rack-protection (2.0.7)
|
53
|
+
rack
|
54
|
+
rack-test (1.1.0)
|
55
|
+
rack (>= 1.0, < 3)
|
56
|
+
rake (10.5.0)
|
57
|
+
rspec (3.9.0)
|
58
|
+
rspec-core (~> 3.9.0)
|
59
|
+
rspec-expectations (~> 3.9.0)
|
60
|
+
rspec-mocks (~> 3.9.0)
|
61
|
+
rspec-core (3.9.0)
|
62
|
+
rspec-support (~> 3.9.0)
|
63
|
+
rspec-expectations (3.9.0)
|
64
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
65
|
+
rspec-support (~> 3.9.0)
|
66
|
+
rspec-mocks (3.9.0)
|
67
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
68
|
+
rspec-support (~> 3.9.0)
|
69
|
+
rspec-parameterized (0.4.2)
|
70
|
+
binding_ninja (>= 0.2.3)
|
71
|
+
parser
|
72
|
+
proc_to_ast
|
73
|
+
rspec (>= 2.13, < 4)
|
74
|
+
unparser
|
75
|
+
rspec-support (3.9.0)
|
76
|
+
simplecov (0.17.1)
|
77
|
+
docile (~> 1.1)
|
78
|
+
json (>= 1.8, < 3)
|
79
|
+
simplecov-html (~> 0.10.0)
|
80
|
+
simplecov-html (0.10.2)
|
81
|
+
sinatra (2.0.7)
|
82
|
+
mustermann (~> 1.0)
|
83
|
+
rack (~> 2.0)
|
84
|
+
rack-protection (= 2.0.7)
|
85
|
+
tilt (~> 2.0)
|
86
|
+
thor (0.20.3)
|
87
|
+
thread_safe (0.3.6)
|
88
|
+
tilt (2.0.10)
|
89
|
+
tty-color (0.5.0)
|
90
|
+
tty-command (0.9.0)
|
91
|
+
pastel (~> 0.7.0)
|
92
|
+
unparser (0.4.5)
|
93
|
+
abstract_type (~> 0.0.7)
|
94
|
+
adamantium (~> 0.2.0)
|
95
|
+
concord (~> 0.1.5)
|
96
|
+
diff-lcs (~> 1.3)
|
97
|
+
equalizer (~> 0.0.9)
|
98
|
+
parser (~> 2.6.3)
|
99
|
+
procto (~> 0.0.2)
|
100
|
+
|
101
|
+
PLATFORMS
|
102
|
+
ruby
|
103
|
+
|
104
|
+
DEPENDENCIES
|
105
|
+
bundler (~> 2.0)
|
106
|
+
byebug
|
107
|
+
pry
|
108
|
+
rack-test
|
109
|
+
rake (~> 10.0)
|
110
|
+
rspec (~> 3.0)
|
111
|
+
rspec-parameterized
|
112
|
+
simplecov
|
113
|
+
webcommand!
|
114
|
+
|
115
|
+
BUNDLED WITH
|
116
|
+
2.0.2
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 TODO: Write your name
|
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,39 @@
|
|
1
|
+
# Webcommand
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/webcommand`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'webcommand'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install webcommand
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
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.
|
30
|
+
|
31
|
+
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).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/webcommand.
|
36
|
+
|
37
|
+
## License
|
38
|
+
|
39
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
require "rspec/core/rake_task"
|
3
|
+
|
4
|
+
RSpec::Core::RakeTask.new(:spec)
|
5
|
+
|
6
|
+
task default: :spec
|
7
|
+
|
8
|
+
task :environment do
|
9
|
+
require_relative 'lib/webcommand'
|
10
|
+
end
|
11
|
+
|
12
|
+
task server: :environment do
|
13
|
+
Webcommand::Server.start!
|
14
|
+
end
|
15
|
+
|
16
|
+
task :console do
|
17
|
+
exec 'pry -r ./lib/webcommand.rb'
|
18
|
+
end
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "webcommand"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/examples/config.yml
ADDED
data/exe/webcommand
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'thor'
|
4
|
+
require_relative '../lib/webcommand'
|
5
|
+
|
6
|
+
module Webcommand
|
7
|
+
class CLI < Thor
|
8
|
+
desc "server", "Start the Webcommand server"
|
9
|
+
option :port
|
10
|
+
def server
|
11
|
+
::WebCommand::Server.start!
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
Webcommand::CLI.start(ARGV)
|
@@ -0,0 +1,54 @@
|
|
1
|
+
module Webcommand
|
2
|
+
class Command
|
3
|
+
DEFAULT_PARAM_SCHEMA_REGEX = /.*/
|
4
|
+
PARAMS_DEFAULT_SCHEMA = {}.tap do |hash|
|
5
|
+
hash.default_proc = proc { DEFAULT_PARAM_SCHEMA_REGEX }
|
6
|
+
end
|
7
|
+
|
8
|
+
WrongParamsSize = Class.new(StandardError)
|
9
|
+
InvalidParams = Class.new(StandardError)
|
10
|
+
|
11
|
+
def initialize(template_command, params_schema: nil, executor: TTY::Command)
|
12
|
+
@template_command = template_command
|
13
|
+
@params_schema = params_schema || PARAMS_DEFAULT_SCHEMA
|
14
|
+
@executor = executor
|
15
|
+
end
|
16
|
+
|
17
|
+
def call(**params)
|
18
|
+
raise WrongParamsSize, params if wrong_params_size?(params)
|
19
|
+
raise InvalidParams, params unless valid_params?(params)
|
20
|
+
|
21
|
+
template_render = make_template_renderer(params)
|
22
|
+
command = template_render.render(@template_command)
|
23
|
+
#TODO: Extract executor to a new class returning a customized execution result
|
24
|
+
@executor.new.run!(command)
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
def wrong_params_size?(params)
|
30
|
+
@params_schema.keys.size != 0 && params.keys.size != @params_schema.keys.size
|
31
|
+
end
|
32
|
+
|
33
|
+
def valid_params?(params)
|
34
|
+
return false unless params.keys == template_command_keys
|
35
|
+
return true if @params_schema == PARAMS_DEFAULT_SCHEMA
|
36
|
+
|
37
|
+
params.keys.reduce(true) do |result, key|
|
38
|
+
result && @params_schema[key].match?(params[key])
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def template_command_keys
|
43
|
+
@template_command.scan(/{{(.*?)}}/).flatten.map(&:to_sym)
|
44
|
+
end
|
45
|
+
|
46
|
+
def make_template_renderer(params)
|
47
|
+
Mustache.new.tap do |template|
|
48
|
+
params.each do |key, value|
|
49
|
+
template[key] = value
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Webcommand
|
2
|
+
class Commands
|
3
|
+
CommandNotRegistered = Class.new(StandardError)
|
4
|
+
|
5
|
+
def initialize(commands_config)
|
6
|
+
@commands = commands_config.map do |key, command_config|
|
7
|
+
params_schema = command_config[:params]&.map { |key, value| [key, Regexp.new(value)] }.to_h
|
8
|
+
|
9
|
+
[key, Command.new(command_config[:command], params_schema: params_schema)]
|
10
|
+
end.to_h
|
11
|
+
|
12
|
+
@commands.default_proc = ->(_,key) { raise CommandNotRegistered, "Command #{key} not found" }
|
13
|
+
end
|
14
|
+
|
15
|
+
def [](command_key)
|
16
|
+
@commands[command_key]
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Webcommand
|
2
|
+
module Extensions
|
3
|
+
module HashExtension
|
4
|
+
refine Hash do
|
5
|
+
def symbolize_keys
|
6
|
+
self.map { |k,v| [k.to_sym,v] }.to_h
|
7
|
+
end
|
8
|
+
|
9
|
+
def deep_symbolize_keys
|
10
|
+
self.map do |k, v|
|
11
|
+
new_value = v.is_a?(Hash) ? v.deep_symbolize_keys : v
|
12
|
+
[k.to_sym, new_value]
|
13
|
+
end.to_h
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Webcommand
|
2
|
+
class Server < Sinatra::Application
|
3
|
+
use Rack::PostBodyContentTypeParser
|
4
|
+
before do
|
5
|
+
content_type 'application/json'
|
6
|
+
end
|
7
|
+
|
8
|
+
using Webcommand::Extensions::HashExtension
|
9
|
+
|
10
|
+
post '/executions' do
|
11
|
+
command_name = params[:command].to_sym
|
12
|
+
command_params = params[:params]&.symbolize_keys || {}
|
13
|
+
command = Webcommand.commands[command_name]
|
14
|
+
execution = command.call(**command_params)
|
15
|
+
|
16
|
+
# TODO: Create a Serializer after creating a new Execution Result object
|
17
|
+
{ stdout: execution.out.to_s, stderr: execution.err.to_s, exit_status: execution.status }.to_json
|
18
|
+
rescue Command::WrongParamsSize, Command::InvalidParams, Commands::CommandNotRegistered => ex
|
19
|
+
halt 422, { error: ex.class.name.split('::').last }.to_json
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/webcommand.rb
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'sinatra/base'
|
2
|
+
require 'mustache'
|
3
|
+
require 'json'
|
4
|
+
require 'rack/contrib'
|
5
|
+
require 'yaml'
|
6
|
+
require 'tty-command'
|
7
|
+
|
8
|
+
require_relative 'webcommand/version'
|
9
|
+
require_relative 'webcommand/extensions/hash_extension'
|
10
|
+
require_relative 'webcommand/command'
|
11
|
+
require_relative 'webcommand/server'
|
12
|
+
require_relative 'webcommand/config'
|
13
|
+
require_relative 'webcommand/commands'
|
14
|
+
|
15
|
+
module Webcommand
|
16
|
+
def self.config
|
17
|
+
@config ||= Config.new(load_configuration)
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.commands
|
21
|
+
@commands ||= Commands.new(config[:commands])
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.root_path
|
25
|
+
Pathname.new File.expand_path(File.dirname(__FILE__) + '/..')
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.load_configuration
|
29
|
+
# TODO: Validate Configuration
|
30
|
+
config_path = ENV['WEBCOMMAND_CONFIGURATION']
|
31
|
+
YAML.load_file(config_path)
|
32
|
+
end
|
33
|
+
|
34
|
+
private_class_method :load_configuration
|
35
|
+
end
|
data/webcommand.gemspec
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
lib = File.expand_path("lib", __dir__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require "webcommand/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "webcommand"
|
7
|
+
spec.version = Webcommand::VERSION
|
8
|
+
spec.authors = ["Carlos Atkinson Ferreira Filho"]
|
9
|
+
spec.email = ["carlos.atks@gmail.com"]
|
10
|
+
|
11
|
+
spec.summary = %q{Runs commands from a webpage}
|
12
|
+
spec.homepage = "https://github.com/catks/webcommand"
|
13
|
+
spec.license = "MIT"
|
14
|
+
|
15
|
+
spec.metadata["source_code_uri"] = "https://github.com/catks/webcommand"
|
16
|
+
#spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
|
17
|
+
|
18
|
+
# Specify which files should be added to the gem when it is released.
|
19
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
20
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
21
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
22
|
+
end
|
23
|
+
spec.bindir = "exe"
|
24
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
|
+
spec.require_paths = ["lib"]
|
26
|
+
|
27
|
+
spec.add_dependency "sinatra", "~> 2.0.7"
|
28
|
+
spec.add_dependency "thor", "~> 0.20.3"
|
29
|
+
spec.add_dependency "mustache", "~> 1.0"
|
30
|
+
spec.add_dependency "rack-contrib", "~> 2.1.0"
|
31
|
+
spec.add_dependency "tty-command", "~> 0.9.0"
|
32
|
+
spec.add_development_dependency "byebug"
|
33
|
+
spec.add_development_dependency "pry"
|
34
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
35
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
36
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
37
|
+
end
|
metadata
ADDED
@@ -0,0 +1,205 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: webcommand
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Carlos Atkinson Ferreira Filho
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-10-25 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: sinatra
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.0.7
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.0.7
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: thor
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.20.3
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.20.3
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: mustache
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rack-contrib
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.1.0
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 2.1.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: tty-command
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.9.0
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.9.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: byebug
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pry
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: bundler
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '2.0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '2.0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rake
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '10.0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '10.0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: rspec
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '3.0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '3.0'
|
153
|
+
description:
|
154
|
+
email:
|
155
|
+
- carlos.atks@gmail.com
|
156
|
+
executables:
|
157
|
+
- webcommand
|
158
|
+
extensions: []
|
159
|
+
extra_rdoc_files: []
|
160
|
+
files:
|
161
|
+
- ".gitignore"
|
162
|
+
- ".rspec"
|
163
|
+
- ".travis.yml"
|
164
|
+
- Gemfile
|
165
|
+
- Gemfile.lock
|
166
|
+
- LICENSE.txt
|
167
|
+
- README.md
|
168
|
+
- Rakefile
|
169
|
+
- bin/console
|
170
|
+
- bin/setup
|
171
|
+
- examples/config.yml
|
172
|
+
- exe/webcommand
|
173
|
+
- lib/webcommand.rb
|
174
|
+
- lib/webcommand/command.rb
|
175
|
+
- lib/webcommand/commands.rb
|
176
|
+
- lib/webcommand/config.rb
|
177
|
+
- lib/webcommand/extensions/hash_extension.rb
|
178
|
+
- lib/webcommand/server.rb
|
179
|
+
- lib/webcommand/version.rb
|
180
|
+
- webcommand.gemspec
|
181
|
+
homepage: https://github.com/catks/webcommand
|
182
|
+
licenses:
|
183
|
+
- MIT
|
184
|
+
metadata:
|
185
|
+
source_code_uri: https://github.com/catks/webcommand
|
186
|
+
post_install_message:
|
187
|
+
rdoc_options: []
|
188
|
+
require_paths:
|
189
|
+
- lib
|
190
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
196
|
+
requirements:
|
197
|
+
- - ">="
|
198
|
+
- !ruby/object:Gem::Version
|
199
|
+
version: '0'
|
200
|
+
requirements: []
|
201
|
+
rubygems_version: 3.0.3
|
202
|
+
signing_key:
|
203
|
+
specification_version: 4
|
204
|
+
summary: Runs commands from a webpage
|
205
|
+
test_files: []
|