volt 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/volt/cli.rb +8 -1
- data/lib/volt/cli/new_gem.rb +1 -1
- data/lib/volt/server.rb +10 -0
- data/lib/volt/server/banner.txt +15 -0
- data/templates/newgem/app/newgem/controllers/index_controller.rb.tt +9 -0
- data/templates/newgem/app/newgem/views/index/index.html +3 -0
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7825e0742c7dfcbf661838142dd044755f389139
|
4
|
+
data.tar.gz: 0b7d7e5d4e47be6b026107fd22a2a42bde71c641
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 738567c05368bc8ea0af5a3714e209d186dcc4dd20d9dcdf1010757774ab2012b63f831aed4b799870e2dc6e2f029d7b91981493793125f4ab642a5a4b80011b
|
7
|
+
data.tar.gz: 143faae855b9a024db294b456f41dde0a61e49dec06f460d3231d33711ab1a64d1a2b97012921fc2078765a565754ab6bc9da1c805ee3d0800a4f8b29cb1a32b
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.4.
|
1
|
+
0.4.2
|
data/lib/volt/cli.rb
CHANGED
@@ -19,6 +19,7 @@ class CLI < Thor
|
|
19
19
|
end
|
20
20
|
|
21
21
|
desc "server", "run the server on the project in the current directory"
|
22
|
+
method_option :port, :type => :string, :aliases => '-p', :banner => 'specify which port the server should run on'
|
22
23
|
def server
|
23
24
|
require 'thin'
|
24
25
|
require 'fileutils'
|
@@ -31,7 +32,13 @@ class CLI < Thor
|
|
31
32
|
end
|
32
33
|
|
33
34
|
ENV['SERVER'] = 'true'
|
34
|
-
|
35
|
+
args = ['start', '--threaded', '--max-persistent-conns', '100', "--max-conns", "300"]
|
36
|
+
|
37
|
+
if options[:port]
|
38
|
+
args += ['-p', options[:port].to_s]
|
39
|
+
end
|
40
|
+
|
41
|
+
Thin::Runner.new(args).run!
|
35
42
|
|
36
43
|
# require 'volt/server'
|
37
44
|
#
|
data/lib/volt/cli/new_gem.rb
CHANGED
@@ -44,7 +44,7 @@ class NewGem
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def copy_files
|
47
|
-
@thor.directory("newgem/app/newgem", File.join("#{@target}", "app/#{@component_name}"))
|
47
|
+
@thor.directory("newgem/app/newgem", File.join("#{@target}", "app/#{@component_name}"), @opts)
|
48
48
|
copy("newgem/Gemfile.tt", "Gemfile")
|
49
49
|
copy("newgem/Rakefile.tt", "Rakefile")
|
50
50
|
copy("newgem/README.md.tt", "README.md")
|
data/lib/volt/server.rb
CHANGED
@@ -47,6 +47,12 @@ class Server
|
|
47
47
|
@component_paths = ComponentPaths.new
|
48
48
|
|
49
49
|
setup_change_listener
|
50
|
+
|
51
|
+
display_welcome
|
52
|
+
end
|
53
|
+
|
54
|
+
def display_welcome
|
55
|
+
puts File.read(File.join(File.dirname(__FILE__), "server/banner.txt"))
|
50
56
|
end
|
51
57
|
|
52
58
|
def setup_change_listener
|
@@ -60,6 +66,10 @@ class Server
|
|
60
66
|
|
61
67
|
def app
|
62
68
|
@app = Rack::Builder.new
|
69
|
+
|
70
|
+
# Should only be used in production
|
71
|
+
# @app.use Rack::Deflater
|
72
|
+
|
63
73
|
# @app.use Rack::Chunked
|
64
74
|
@app.use Rack::ContentLength
|
65
75
|
|
@@ -0,0 +1,15 @@
|
|
1
|
+
,--, ,----,
|
2
|
+
,----.. ,---.'| ,/ .`|
|
3
|
+
/ / \ | | : ,` .' :
|
4
|
+
,---. / . : : : | ; ; /
|
5
|
+
/__./| . / ;. \| ' : .'___,/ ,'
|
6
|
+
,---.; ; |. ; / ` ;; ; ' | : |
|
7
|
+
/___/ \ | |; | ; \ ; |' | |__ ; |.'; ;
|
8
|
+
\ ; \ ' || : | ; | '| | :.'|`----' | |
|
9
|
+
\ \ \: |. | ' ' ' :' : ; ' : ;
|
10
|
+
; \ ' .' ; \; / || | ./ | | '
|
11
|
+
\ \ ' \ \ ', / ; : ; ' : |
|
12
|
+
\ ` ; ; : / | ,/ ; |.'
|
13
|
+
: \ | \ \ .' '---' '---'
|
14
|
+
'---" `---`
|
15
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: volt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Stout
|
@@ -367,6 +367,7 @@ files:
|
|
367
367
|
- lib/volt/reactive/string_extensions.rb
|
368
368
|
- lib/volt/router/routes.rb
|
369
369
|
- lib/volt/server.rb
|
370
|
+
- lib/volt/server/banner.txt
|
370
371
|
- lib/volt/server/binding_setup.rb
|
371
372
|
- lib/volt/server/channel_handler.rb
|
372
373
|
- lib/volt/server/channel_handler_stub.rb
|
@@ -415,6 +416,8 @@ files:
|
|
415
416
|
- templates/newgem/VERSION
|
416
417
|
- templates/newgem/app/newgem/assets/css/.empty_directory
|
417
418
|
- templates/newgem/app/newgem/assets/js/.empty_directory
|
419
|
+
- templates/newgem/app/newgem/controllers/index_controller.rb.tt
|
420
|
+
- templates/newgem/app/newgem/views/index/index.html
|
418
421
|
- templates/newgem/bin/newgem.tt
|
419
422
|
- templates/newgem/gitignore.tt
|
420
423
|
- templates/newgem/lib/newgem.rb.tt
|