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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d4e6123d91124a8535f3f22faaa795a3fd568988
4
- data.tar.gz: 088c3ff7fb4ea5d2c8d847111aafe413df710764
3
+ metadata.gz: 7825e0742c7dfcbf661838142dd044755f389139
4
+ data.tar.gz: 0b7d7e5d4e47be6b026107fd22a2a42bde71c641
5
5
  SHA512:
6
- metadata.gz: 48debc3dc906b16a0774be28c7feef8e3ba2730608dc3e901399423877105489a9b1401cb68f6028eb3f9ef05c8d21711412c88b0d1730d951403b1ba773d6b5
7
- data.tar.gz: d61897a965dc4edd12737867c8fd95e96672ac300a39d82ff683f5d5d470e5ebf1c369f9635639c21fca43209c02b164769d66d4187e6eeab7df6c049ec0b71e
6
+ metadata.gz: 738567c05368bc8ea0af5a3714e209d186dcc4dd20d9dcdf1010757774ab2012b63f831aed4b799870e2dc6e2f029d7b91981493793125f4ab642a5a4b80011b
7
+ data.tar.gz: 143faae855b9a024db294b456f41dde0a61e49dec06f460d3231d33711ab1a64d1a2b97012921fc2078765a565754ab6bc9da1c805ee3d0800a4f8b29cb1a32b
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.1
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
- Thin::Runner.new(['start', '--threaded', '--max-persistent-conns', '100', "--max-conns", "300"]).run!
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
  #
@@ -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
+
@@ -0,0 +1,9 @@
1
+ module <%=config[:name].gsub(/^volt[-]/, '').gsub('-', '_').split("_").map {|s| s.capitalize }.join("") %>
2
+ class IndexController
3
+ attr_accessor :data
4
+
5
+ def initialize(data)
6
+ @data = data
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,3 @@
1
+ <:body>
2
+ -- component --
3
+ </:body>
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.1
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