webtask 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/webtask +8 -1
- data/lib/webtask/application.rb +2 -0
- data/lib/webtask/cli.rb +30 -0
- data/lib/webtask/rake_application.rb +1 -1
- data/lib/webtask/version.rb +1 -1
- data/webtask.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3423555698859c5fccb589b93a1c9ac7b91744ef
|
4
|
+
data.tar.gz: 5da981fba76595d0d7026e049e13bf653718e984
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 212ade0002edf412b29f240764f113d26ccdc43600deef8b029711f84a6d27c8e70123af20cc5c2fa191543aa549d38456f94160857ee1c8f95c158dff75b7b0
|
7
|
+
data.tar.gz: 27ba545c1a7290b8e77d3fbb6d23c5eb9e80823de27171307b83c15a5c61d96a9b6a8fdaca052771fc917024d9f11515cf02793a6fb0769b4c3c9d8455cfea79
|
data/exe/webtask
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
require "
|
3
|
+
require "clap"
|
4
|
+
require "webtask/cli"
|
5
|
+
|
6
|
+
Clap.run ARGV,
|
7
|
+
"-b" => lambda { |bind| Webtask::CLI.instance.bind = bind },
|
8
|
+
"-p" => lambda { |port| Webtask::CLI.instance.port = Integer(port) },
|
9
|
+
"-h" => lambda { Webtask::CLI.instance.show_help }
|
4
10
|
|
11
|
+
require "webtask"
|
5
12
|
Webtask::Application.run!
|
data/lib/webtask/application.rb
CHANGED
data/lib/webtask/cli.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'singleton'
|
2
|
+
|
3
|
+
module Webtask
|
4
|
+
class CLI
|
5
|
+
include Singleton
|
6
|
+
|
7
|
+
DEFAULT_PORT = 4567.freeze
|
8
|
+
DEFAULT_BIND = "127.0.0.1".freeze
|
9
|
+
|
10
|
+
attr_accessor :port
|
11
|
+
attr_accessor :bind
|
12
|
+
|
13
|
+
def initialize
|
14
|
+
@port = DEFAULT_PORT
|
15
|
+
@bind = DEFAULT_BIND
|
16
|
+
end
|
17
|
+
|
18
|
+
def show_help
|
19
|
+
puts <<~HELP_TEXT
|
20
|
+
webtask – A web GUI for your Rake tasks
|
21
|
+
|
22
|
+
Options:
|
23
|
+
|
24
|
+
-b bind to a different address (default: #{DEFAULT_BIND})
|
25
|
+
-p bind to a different port (default: #{DEFAULT_PORT})
|
26
|
+
HELP_TEXT
|
27
|
+
exit
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
data/lib/webtask/version.rb
CHANGED
data/webtask.gemspec
CHANGED
@@ -24,6 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_dependency "thin", "~> 1.7.0"
|
25
25
|
spec.add_dependency "haml", "~> 4.0.7"
|
26
26
|
spec.add_dependency "markdown", "~> 1.2.0"
|
27
|
+
spec.add_dependency "clap", "~> 1.0.0"
|
27
28
|
|
28
29
|
spec.add_development_dependency "bundler", "~> 1.12"
|
29
30
|
spec.add_development_dependency "rspec", "~> 3.0"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webtask
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yakshed / Dirk Breuer
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 1.2.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: clap
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 1.0.0
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 1.0.0
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: bundler
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -180,7 +194,6 @@ files:
|
|
180
194
|
- CODE_OF_CONDUCT.md
|
181
195
|
- CONTRIBUTING.md
|
182
196
|
- Gemfile
|
183
|
-
- Gemfile.lock
|
184
197
|
- LICENSE
|
185
198
|
- README.md
|
186
199
|
- Rakefile
|
@@ -191,6 +204,7 @@ files:
|
|
191
204
|
- exe/webtask
|
192
205
|
- lib/webtask.rb
|
193
206
|
- lib/webtask/application.rb
|
207
|
+
- lib/webtask/cli.rb
|
194
208
|
- lib/webtask/public/javascripts/application.js
|
195
209
|
- lib/webtask/public/stylesheets/application.css
|
196
210
|
- lib/webtask/public/stylesheets/application.css.map
|