volt 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/Readme.md +3 -0
  3. data/VERSION +1 -1
  4. data/docs/GUIDE.md +3 -3
  5. data/lib/volt.rb +0 -2
  6. data/lib/volt/cli.rb +14 -1
  7. data/lib/volt/cli/new_gem.rb +116 -0
  8. data/lib/volt/controllers/model_controller.rb +4 -0
  9. data/lib/volt/router/routes.rb +10 -7
  10. data/lib/volt/server.rb +36 -96
  11. data/lib/volt/server/channel_handler.rb +1 -1
  12. data/lib/volt/server/rack/component_files.rb +97 -0
  13. data/lib/volt/server/rack/component_paths.rb +70 -0
  14. data/lib/volt/server/rack/index_files.rb +38 -0
  15. data/lib/volt/server/rack/opal_files.rb +51 -0
  16. data/lib/volt/server/{source_map_server.rb → rack/source_map_server.rb} +0 -0
  17. data/lib/volt/templates/page.rb +3 -5
  18. data/{templates/app/.empty_directory → spec/app/main/assets/js/test1.js} +0 -0
  19. data/spec/app/main/config/dependencies.rb +1 -0
  20. data/{templates/app/home/css/.empty_directory → spec/app/shared/assets/js/test2.js} +0 -0
  21. data/spec/app/shared/config/dependencies.rb +1 -0
  22. data/spec/server/rack/component_files_spec.rb +23 -0
  23. data/spec/server/rack/component_paths_spec.rb +26 -0
  24. data/spec/store/mongo_spec.rb +5 -2
  25. data/templates/newgem/Gemfile.tt +4 -0
  26. data/templates/newgem/LICENSE.txt.tt +22 -0
  27. data/templates/newgem/README.md.tt +29 -0
  28. data/templates/newgem/Rakefile.tt +16 -0
  29. data/templates/newgem/VERSION +1 -0
  30. data/templates/{app/home/models → newgem/app/newgem/assets/css}/.empty_directory +0 -0
  31. data/templates/{public/css/ansi.css → newgem/app/newgem/assets/js/.empty_directory} +0 -0
  32. data/templates/newgem/bin/newgem.tt +3 -0
  33. data/templates/newgem/gitignore.tt +17 -0
  34. data/templates/newgem/lib/newgem.rb.tt +9 -0
  35. data/templates/{public/js/bootstrap.js → newgem/lib/newgem/.empty_directory} +0 -0
  36. data/templates/newgem/newgem.gemspec.tt +28 -0
  37. data/templates/newgem/rspec.tt +2 -0
  38. data/templates/newgem/spec/newgem_spec.rb.tt +11 -0
  39. data/templates/newgem/spec/spec_helper.rb.tt +2 -0
  40. data/templates/newgem/test/minitest_helper.rb.tt +4 -0
  41. data/templates/newgem/test/test_newgem.rb.tt +11 -0
  42. data/templates/{Gemfile.tt → project/Gemfile.tt} +4 -1
  43. data/templates/project/app/.empty_directory +0 -0
  44. data/templates/{app → project/app}/home/config/routes.rb +0 -0
  45. data/templates/{app → project/app}/home/controllers/index_controller.rb +0 -0
  46. data/templates/project/app/home/css/.empty_directory +0 -0
  47. data/templates/project/app/home/models/.empty_directory +0 -0
  48. data/templates/{app → project/app}/home/views/index/about.html +0 -0
  49. data/templates/{app → project/app}/home/views/index/home.html +0 -0
  50. data/templates/{app → project/app}/home/views/index/index.html +0 -0
  51. data/templates/{config.ru → project/config.ru} +1 -1
  52. data/templates/project/public/css/ansi.css +0 -0
  53. data/templates/{public → project/public}/css/bootstrap-theme.css +0 -0
  54. data/templates/{public → project/public}/css/bootstrap.css +0 -0
  55. data/templates/{public → project/public}/css/jumbotron.css +0 -0
  56. data/templates/{public → project/public}/fonts/glyphicons-halflings-regular.eot +0 -0
  57. data/templates/{public → project/public}/fonts/glyphicons-halflings-regular.svg +0 -0
  58. data/templates/{public → project/public}/fonts/glyphicons-halflings-regular.ttf +0 -0
  59. data/templates/{public → project/public}/fonts/glyphicons-halflings-regular.woff +0 -0
  60. data/templates/project/public/index.html +19 -0
  61. data/templates/project/public/js/bootstrap.js +0 -0
  62. data/templates/{public → project/public}/js/jquery-2.0.3.js +0 -0
  63. data/templates/{public → project/public}/js/sockjs-0.2.1.min.js +0 -0
  64. data/templates/{spec → project/spec}/spec_helper.rb +0 -0
  65. metadata +60 -27
  66. data/lib/volt/server/request_handler.rb +0 -16
  67. data/templates/public/index.html +0 -25
@@ -1,6 +1,9 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'voltframework'
3
+ gem 'volt'
4
+
5
+ # Twitter bootstrap
6
+ gem 'volt-bootstrap'
4
7
 
5
8
  # Needed at the moment
6
9
  gem 'opal', git: 'https://github.com/opal/opal.git'
File without changes
File without changes
@@ -1,4 +1,4 @@
1
1
  # Run via rack server
2
2
  require 'bundler/setup'
3
3
  require 'volt/server'
4
- run Server.app
4
+ run Server.new.app
File without changes
@@ -0,0 +1,19 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <script src="/js/jquery-2.0.3.js"></script>
6
+ <script src="/js/sockjs-0.2.1.min.js"></script>
7
+ <% javascript_files.each do |javascript_file| %>
8
+ <script src="<%= javascript_file %>"></script>
9
+ <% end %>
10
+
11
+ <% css_files.each do |css_file| %>
12
+ <link href="<%= css_file %>" media="all" rel="stylesheet" type="text/css" />
13
+ <% end %>
14
+
15
+ </head>
16
+ <body>
17
+
18
+ </body>
19
+ </html>
File without changes
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: volt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Stout
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-10 00:00:00.000000000 Z
11
+ date: 2014-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -271,6 +271,7 @@ files:
271
271
  - lib/volt.rb
272
272
  - lib/volt/benchmark/benchmark.rb
273
273
  - lib/volt/cli.rb
274
+ - lib/volt/cli/new_gem.rb
274
275
  - lib/volt/console.rb
275
276
  - lib/volt/controllers/model_controller.rb
276
277
  - lib/volt/extra_core/array.rb
@@ -304,9 +305,12 @@ files:
304
305
  - lib/volt/server/channel_handler.rb
305
306
  - lib/volt/server/component_handler.rb
306
307
  - lib/volt/server/if_binding_setup.rb
307
- - lib/volt/server/request_handler.rb
308
+ - lib/volt/server/rack/component_files.rb
309
+ - lib/volt/server/rack/component_paths.rb
310
+ - lib/volt/server/rack/index_files.rb
311
+ - lib/volt/server/rack/opal_files.rb
312
+ - lib/volt/server/rack/source_map_server.rb
308
313
  - lib/volt/server/scope.rb
309
- - lib/volt/server/source_map_server.rb
310
314
  - lib/volt/server/template_parser.rb
311
315
  - lib/volt/store/mongo.rb
312
316
  - lib/volt/templates/attribute_binding.rb
@@ -332,6 +336,10 @@ files:
332
336
  - lib/volt/templates/targets/dom_target.rb
333
337
  - lib/volt/templates/template_binding.rb
334
338
  - lib/volt/templates/template_renderer.rb
339
+ - spec/app/main/assets/js/test1.js
340
+ - spec/app/main/config/dependencies.rb
341
+ - spec/app/shared/assets/js/test2.js
342
+ - spec/app/shared/config/dependencies.rb
335
343
  - spec/models/event_chain_spec.rb
336
344
  - spec/models/model_spec.rb
337
345
  - spec/models/old_model_spec.rb
@@ -340,35 +348,54 @@ files:
340
348
  - spec/models/reactive_value_spec.rb
341
349
  - spec/models/string_extensions_spec.rb
342
350
  - spec/router/routes_spec.rb
351
+ - spec/server/rack/component_files_spec.rb
352
+ - spec/server/rack/component_paths_spec.rb
343
353
  - spec/server/template_parser_spec.rb
344
354
  - spec/spec_helper.rb
345
355
  - spec/store/mongo_spec.rb
346
356
  - spec/templates/targets/binding_document/component_node_spec.rb
347
357
  - spec/templates/template_binding_spec.rb
348
358
  - templates/.gitignore
349
- - templates/Gemfile.tt
350
- - templates/app/.empty_directory
351
- - templates/app/home/config/routes.rb
352
- - templates/app/home/controllers/index_controller.rb
353
- - templates/app/home/css/.empty_directory
354
- - templates/app/home/models/.empty_directory
355
- - templates/app/home/views/index/about.html
356
- - templates/app/home/views/index/home.html
357
- - templates/app/home/views/index/index.html
358
- - templates/config.ru
359
- - templates/public/css/ansi.css
360
- - templates/public/css/bootstrap-theme.css
361
- - templates/public/css/bootstrap.css
362
- - templates/public/css/jumbotron.css
363
- - templates/public/fonts/glyphicons-halflings-regular.eot
364
- - templates/public/fonts/glyphicons-halflings-regular.svg
365
- - templates/public/fonts/glyphicons-halflings-regular.ttf
366
- - templates/public/fonts/glyphicons-halflings-regular.woff
367
- - templates/public/index.html
368
- - templates/public/js/bootstrap.js
369
- - templates/public/js/jquery-2.0.3.js
370
- - templates/public/js/sockjs-0.2.1.min.js
371
- - templates/spec/spec_helper.rb
359
+ - templates/newgem/Gemfile.tt
360
+ - templates/newgem/LICENSE.txt.tt
361
+ - templates/newgem/README.md.tt
362
+ - templates/newgem/Rakefile.tt
363
+ - templates/newgem/VERSION
364
+ - templates/newgem/app/newgem/assets/css/.empty_directory
365
+ - templates/newgem/app/newgem/assets/js/.empty_directory
366
+ - templates/newgem/bin/newgem.tt
367
+ - templates/newgem/gitignore.tt
368
+ - templates/newgem/lib/newgem.rb.tt
369
+ - templates/newgem/lib/newgem/.empty_directory
370
+ - templates/newgem/newgem.gemspec.tt
371
+ - templates/newgem/rspec.tt
372
+ - templates/newgem/spec/newgem_spec.rb.tt
373
+ - templates/newgem/spec/spec_helper.rb.tt
374
+ - templates/newgem/test/minitest_helper.rb.tt
375
+ - templates/newgem/test/test_newgem.rb.tt
376
+ - templates/project/Gemfile.tt
377
+ - templates/project/app/.empty_directory
378
+ - templates/project/app/home/config/routes.rb
379
+ - templates/project/app/home/controllers/index_controller.rb
380
+ - templates/project/app/home/css/.empty_directory
381
+ - templates/project/app/home/models/.empty_directory
382
+ - templates/project/app/home/views/index/about.html
383
+ - templates/project/app/home/views/index/home.html
384
+ - templates/project/app/home/views/index/index.html
385
+ - templates/project/config.ru
386
+ - templates/project/public/css/ansi.css
387
+ - templates/project/public/css/bootstrap-theme.css
388
+ - templates/project/public/css/bootstrap.css
389
+ - templates/project/public/css/jumbotron.css
390
+ - templates/project/public/fonts/glyphicons-halflings-regular.eot
391
+ - templates/project/public/fonts/glyphicons-halflings-regular.svg
392
+ - templates/project/public/fonts/glyphicons-halflings-regular.ttf
393
+ - templates/project/public/fonts/glyphicons-halflings-regular.woff
394
+ - templates/project/public/index.html
395
+ - templates/project/public/js/bootstrap.js
396
+ - templates/project/public/js/jquery-2.0.3.js
397
+ - templates/project/public/js/sockjs-0.2.1.min.js
398
+ - templates/project/spec/spec_helper.rb
372
399
  - volt.gemspec
373
400
  homepage: http://voltframework.com
374
401
  licenses:
@@ -396,6 +423,10 @@ specification_version: 4
396
423
  summary: A ruby web framework where your ruby runs on both server and client (via
397
424
  Opal)
398
425
  test_files:
426
+ - spec/app/main/assets/js/test1.js
427
+ - spec/app/main/config/dependencies.rb
428
+ - spec/app/shared/assets/js/test2.js
429
+ - spec/app/shared/config/dependencies.rb
399
430
  - spec/models/event_chain_spec.rb
400
431
  - spec/models/model_spec.rb
401
432
  - spec/models/old_model_spec.rb
@@ -404,6 +435,8 @@ test_files:
404
435
  - spec/models/reactive_value_spec.rb
405
436
  - spec/models/string_extensions_spec.rb
406
437
  - spec/router/routes_spec.rb
438
+ - spec/server/rack/component_files_spec.rb
439
+ - spec/server/rack/component_paths_spec.rb
407
440
  - spec/server/template_parser_spec.rb
408
441
  - spec/spec_helper.rb
409
442
  - spec/store/mongo_spec.rb
@@ -1,16 +0,0 @@
1
- require 'stringio'
2
-
3
- class RequestHandler
4
- def call(env)
5
- req = Rack::Request.new(env)
6
- # puts env.inspect
7
- # puts req.inspect
8
-
9
- puts req.path
10
- req.post?
11
- puts req.params["data"]
12
-
13
- # puts "ENV: #{env.inspect}"
14
- [200, {"Content-Type" => "text/html"}, StringIO.new("Hello Rack!")]
15
- end
16
- end
@@ -1,25 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="UTF-8" />
5
- <link href="/css/bootstrap.css" media="all" rel="stylesheet" type="text/css" />
6
- <link href="/css/bootstrap-theme.css" media="all" rel="stylesheet" type="text/css" />
7
- <link href="/css/jumbotron.css" media="all" rel="stylesheet" type="text/css" />
8
-
9
- <script src="/js/jquery-2.0.3.js"></script>
10
- <script src="/js/bootstrap.js"></script>
11
- <script src="/js/sockjs-0.2.1.min.js"></script>
12
- <% if SOURCE_MAPS %>
13
- <% @files.each do |file| %>
14
- <script src="/assets/<%= file %>?body=1"></script>
15
- <% end %>
16
- <% else %>
17
- <script src="/assets/volt/templates/page.js"></script>
18
- <% end %>
19
- <script src="/components/home.js"></script>
20
-
21
- </head>
22
- <body>
23
-
24
- </body>
25
- </html>