volt 0.8.27.beta6 → 0.8.27.beta7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -3
  3. data/VERSION +1 -1
  4. data/app/volt/models/user.rb +1 -1
  5. data/app/volt/tasks/query_tasks.rb +2 -2
  6. data/app/volt/tasks/store_tasks.rb +14 -4
  7. data/app/volt/tasks/user_tasks.rb +1 -1
  8. data/lib/volt/controllers/http_controller.rb +60 -0
  9. data/lib/volt/controllers/model_controller.rb +5 -1
  10. data/lib/volt/extra_core/string.rb +6 -0
  11. data/lib/volt/models/array_model.rb +6 -2
  12. data/lib/volt/models/associations.rb +1 -1
  13. data/lib/volt/models/buffer.rb +14 -3
  14. data/lib/volt/models/model.rb +28 -60
  15. data/lib/volt/models/permissions.rb +4 -4
  16. data/lib/volt/reactive/computation.rb +15 -15
  17. data/lib/volt/reactive/reactive_array.rb +1 -0
  18. data/lib/volt/router/routes.rb +67 -27
  19. data/lib/volt/server.rb +37 -6
  20. data/lib/volt/server/component_templates.rb +2 -2
  21. data/lib/volt/server/rack/http_request.rb +50 -0
  22. data/lib/volt/server/rack/http_resource.rb +41 -0
  23. data/lib/volt/server/rack/http_response_header.rb +33 -0
  24. data/lib/volt/server/rack/http_response_renderer.rb +41 -0
  25. data/lib/volt/spec/setup.rb +4 -2
  26. data/lib/volt/tasks/dispatcher.rb +7 -7
  27. data/lib/volt/tasks/task_handler.rb +1 -1
  28. data/lib/volt/volt/users.rb +12 -6
  29. data/spec/apps/kitchen_sink/app/main/config/routes.rb +18 -10
  30. data/spec/apps/kitchen_sink/app/main/controllers/main_controller.rb +2 -2
  31. data/spec/apps/kitchen_sink/app/main/controllers/server/simple_http_controller.rb +15 -0
  32. data/spec/apps/kitchen_sink/app/main/controllers/upload_controller.rb +22 -0
  33. data/spec/apps/kitchen_sink/app/main/views/main/yield.html +2 -2
  34. data/spec/apps/kitchen_sink/app/main/views/upload/index.html +15 -0
  35. data/spec/controllers/http_controller_spec.rb +130 -0
  36. data/spec/extra_core/string_transformation_test_cases.rb +8 -0
  37. data/spec/extra_core/string_transformations_spec.rb +12 -0
  38. data/spec/integration/http_endpoints_spec.rb +29 -0
  39. data/spec/integration/user_spec.rb +42 -42
  40. data/spec/models/associations_spec.rb +4 -4
  41. data/spec/models/buffer_spec.rb +15 -0
  42. data/spec/models/model_spec.rb +70 -25
  43. data/spec/models/model_state_spec.rb +1 -1
  44. data/spec/models/permissions_spec.rb +64 -2
  45. data/spec/models/persistors/params_spec.rb +8 -8
  46. data/spec/models/persistors/store_spec.rb +1 -1
  47. data/spec/models/user_validation_spec.rb +1 -1
  48. data/spec/router/routes_spec.rb +111 -43
  49. data/spec/server/rack/http_request_spec.rb +50 -0
  50. data/spec/server/rack/http_resource_spec.rb +59 -0
  51. data/spec/server/rack/http_response_header_spec.rb +34 -0
  52. data/spec/server/rack/http_response_renderer_spec.rb +33 -0
  53. data/spec/tasks/dispatcher_spec.rb +2 -2
  54. data/templates/component/config/routes.rb +2 -2
  55. data/templates/project/Gemfile.tt +3 -5
  56. data/templates/project/app/main/config/routes.rb +4 -4
  57. data/volt.gemspec +2 -2
  58. metadata +33 -8
@@ -1,6 +1,6 @@
1
1
  # See https://github.com/voltrb/volt#routes for more info on routes
2
2
 
3
- get '/about', action: 'about'
3
+ client '/about', action: 'about'
4
4
 
5
5
  # The main route, this should be last. It will match any params not previously matched.
6
- get '/', {}
6
+ client '/', {}
@@ -2,17 +2,15 @@ source 'https://rubygems.org'
2
2
 
3
3
  gem 'volt', '<%= config[:version] %>'
4
4
 
5
-
6
5
  # The following gem's are optional for themeing
7
-
8
6
  # Twitter bootstrap
9
- gem 'volt-bootstrap'
7
+ gem 'volt-bootstrap', '~> 0.0.10'
10
8
 
11
9
  # Simple theme for bootstrap, remove to theme yourself.
12
- gem 'volt-bootstrap-jumbotron-theme'
10
+ gem 'volt-bootstrap-jumbotron-theme', '~> 0.0.5'
13
11
 
14
12
  # User templates for login, signup, and logout menu.
15
- gem 'volt-user-templates'
13
+ gem 'volt-user-templates', '~> 0.1.0'
16
14
 
17
15
  # Server for MRI
18
16
  platform :mri do
@@ -1,11 +1,11 @@
1
1
  # See https://github.com/voltrb/volt#routes for more info on routes
2
2
 
3
- get '/about', action: 'about'
3
+ client '/about', action: 'about'
4
4
 
5
5
  # Routes for login and signup, provided by user-templates component gem
6
- get '/signup', controller: 'user-templates', action: 'signup'
7
- get '/login', controller: 'user-templates', action: 'login'
6
+ client '/signup', controller: 'user-templates', action: 'signup'
7
+ client '/login', controller: 'user-templates', action: 'login'
8
8
 
9
9
  # The main route, this should be last. It will match any params not
10
10
  # previously matched.
11
- get '/', {}
11
+ client '/', {}
data/volt.gemspec CHANGED
@@ -29,14 +29,14 @@ Gem::Specification.new do |spec|
29
29
  spec.add_dependency 'uglifier', '>= 2.4.0'
30
30
  spec.add_dependency "configurations", "~> 2.0.0.pre"
31
31
  spec.add_dependency 'yui-compressor', '~> 0.12.0'
32
- spec.add_dependency 'opal', '~> 0.7.0'
32
+ spec.add_dependency 'opal', '~> 0.7.1'
33
33
  spec.add_dependency 'opal-jquery', '~> 0.3.0'
34
34
  spec.add_dependency 'rspec-core', '~> 3.1.0'
35
35
  spec.add_dependency 'capybara', '~> 2.4.2'
36
36
  spec.add_dependency 'selenium-webdriver', '~> 2.43.0'
37
37
  spec.add_dependency 'chromedriver2-helper', '~> 0.0.8'
38
38
  spec.add_dependency 'poltergeist', '~> 1.5.0'
39
- spec.add_dependency 'opal-rspec', '0.4.0'
39
+ spec.add_dependency 'opal-rspec', '~> 0.4.2'
40
40
  spec.add_dependency 'bundler', '>= 1.5'
41
41
  spec.add_dependency 'volt-sockjs', '~> 0.3.4.4'
42
42
 
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.8.27.beta6
4
+ version: 0.8.27.beta7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Stout
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-05 00:00:00.000000000 Z
11
+ date: 2015-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -156,14 +156,14 @@ dependencies:
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: 0.7.0
159
+ version: 0.7.1
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: 0.7.0
166
+ version: 0.7.1
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: opal-jquery
169
169
  requirement: !ruby/object:Gem::Requirement
@@ -252,16 +252,16 @@ dependencies:
252
252
  name: opal-rspec
253
253
  requirement: !ruby/object:Gem::Requirement
254
254
  requirements:
255
- - - '='
255
+ - - "~>"
256
256
  - !ruby/object:Gem::Version
257
- version: 0.4.0
257
+ version: 0.4.2
258
258
  type: :runtime
259
259
  prerelease: false
260
260
  version_requirements: !ruby/object:Gem::Requirement
261
261
  requirements:
262
- - - '='
262
+ - - "~>"
263
263
  - !ruby/object:Gem::Version
264
- version: 0.4.0
264
+ version: 0.4.2
265
265
  - !ruby/object:Gem::Dependency
266
266
  name: bundler
267
267
  requirement: !ruby/object:Gem::Requirement
@@ -480,6 +480,7 @@ files:
480
480
  - lib/volt/cli/new_gem.rb
481
481
  - lib/volt/cli/runner.rb
482
482
  - lib/volt/config.rb
483
+ - lib/volt/controllers/http_controller.rb
483
484
  - lib/volt/controllers/model_controller.rb
484
485
  - lib/volt/data_stores/data_store.rb
485
486
  - lib/volt/data_stores/mongo_driver.rb
@@ -595,6 +596,10 @@ files:
595
596
  - lib/volt/server/rack/component_code.rb
596
597
  - lib/volt/server/rack/component_html_renderer.rb
597
598
  - lib/volt/server/rack/component_paths.rb
599
+ - lib/volt/server/rack/http_request.rb
600
+ - lib/volt/server/rack/http_resource.rb
601
+ - lib/volt/server/rack/http_response_header.rb
602
+ - lib/volt/server/rack/http_response_renderer.rb
598
603
  - lib/volt/server/rack/index_files.rb
599
604
  - lib/volt/server/rack/opal_files.rb
600
605
  - lib/volt/server/rack/quiet_common_logger.rb
@@ -630,7 +635,9 @@ files:
630
635
  - spec/apps/kitchen_sink/app/main/config/dependencies.rb
631
636
  - spec/apps/kitchen_sink/app/main/config/routes.rb
632
637
  - spec/apps/kitchen_sink/app/main/controllers/main_controller.rb
638
+ - spec/apps/kitchen_sink/app/main/controllers/server/simple_http_controller.rb
633
639
  - spec/apps/kitchen_sink/app/main/controllers/todos_controller.rb
640
+ - spec/apps/kitchen_sink/app/main/controllers/upload_controller.rb
634
641
  - spec/apps/kitchen_sink/app/main/controllers/yield_component_controller.rb
635
642
  - spec/apps/kitchen_sink/app/main/models/user.rb
636
643
  - spec/apps/kitchen_sink/app/main/views/main/bindings.html
@@ -641,10 +648,12 @@ files:
641
648
  - spec/apps/kitchen_sink/app/main/views/main/store.html
642
649
  - spec/apps/kitchen_sink/app/main/views/main/yield.html
643
650
  - spec/apps/kitchen_sink/app/main/views/todos/index.html
651
+ - spec/apps/kitchen_sink/app/main/views/upload/index.html
644
652
  - spec/apps/kitchen_sink/app/main/views/yield-component/index.html
645
653
  - spec/apps/kitchen_sink/config.ru
646
654
  - spec/apps/kitchen_sink/config/app.rb
647
655
  - spec/apps/kitchen_sink/config/base/index.html
656
+ - spec/controllers/http_controller_spec.rb
648
657
  - spec/controllers/reactive_accessors_spec.rb
649
658
  - spec/extra_core/array_spec.rb
650
659
  - spec/extra_core/blank_spec.rb
@@ -658,12 +667,14 @@ files:
658
667
  - spec/integration/bindings_spec.rb
659
668
  - spec/integration/cookies_spec.rb
660
669
  - spec/integration/flash_spec.rb
670
+ - spec/integration/http_endpoints_spec.rb
661
671
  - spec/integration/list_spec.rb
662
672
  - spec/integration/templates_spec.rb
663
673
  - spec/integration/url_spec.rb
664
674
  - spec/integration/user_spec.rb
665
675
  - spec/integration/yield_spec.rb
666
676
  - spec/models/associations_spec.rb
677
+ - spec/models/buffer_spec.rb
667
678
  - spec/models/dirty_spec.rb
668
679
  - spec/models/field_helpers_spec.rb
669
680
  - spec/models/model_spec.rb
@@ -695,6 +706,10 @@ files:
695
706
  - spec/server/html_parser/view_parser_spec.rb
696
707
  - spec/server/rack/asset_files_spec.rb
697
708
  - spec/server/rack/component_paths_spec.rb
709
+ - spec/server/rack/http_request_spec.rb
710
+ - spec/server/rack/http_resource_spec.rb
711
+ - spec/server/rack/http_response_header_spec.rb
712
+ - spec/server/rack/http_response_renderer_spec.rb
698
713
  - spec/server/rack/quite_common_logger_spec.rb
699
714
  - spec/server/rack/rack_requests_spec.rb
700
715
  - spec/spec_helper.rb
@@ -801,7 +816,9 @@ test_files:
801
816
  - spec/apps/kitchen_sink/app/main/config/dependencies.rb
802
817
  - spec/apps/kitchen_sink/app/main/config/routes.rb
803
818
  - spec/apps/kitchen_sink/app/main/controllers/main_controller.rb
819
+ - spec/apps/kitchen_sink/app/main/controllers/server/simple_http_controller.rb
804
820
  - spec/apps/kitchen_sink/app/main/controllers/todos_controller.rb
821
+ - spec/apps/kitchen_sink/app/main/controllers/upload_controller.rb
805
822
  - spec/apps/kitchen_sink/app/main/controllers/yield_component_controller.rb
806
823
  - spec/apps/kitchen_sink/app/main/models/user.rb
807
824
  - spec/apps/kitchen_sink/app/main/views/main/bindings.html
@@ -812,10 +829,12 @@ test_files:
812
829
  - spec/apps/kitchen_sink/app/main/views/main/store.html
813
830
  - spec/apps/kitchen_sink/app/main/views/main/yield.html
814
831
  - spec/apps/kitchen_sink/app/main/views/todos/index.html
832
+ - spec/apps/kitchen_sink/app/main/views/upload/index.html
815
833
  - spec/apps/kitchen_sink/app/main/views/yield-component/index.html
816
834
  - spec/apps/kitchen_sink/config.ru
817
835
  - spec/apps/kitchen_sink/config/app.rb
818
836
  - spec/apps/kitchen_sink/config/base/index.html
837
+ - spec/controllers/http_controller_spec.rb
819
838
  - spec/controllers/reactive_accessors_spec.rb
820
839
  - spec/extra_core/array_spec.rb
821
840
  - spec/extra_core/blank_spec.rb
@@ -829,12 +848,14 @@ test_files:
829
848
  - spec/integration/bindings_spec.rb
830
849
  - spec/integration/cookies_spec.rb
831
850
  - spec/integration/flash_spec.rb
851
+ - spec/integration/http_endpoints_spec.rb
832
852
  - spec/integration/list_spec.rb
833
853
  - spec/integration/templates_spec.rb
834
854
  - spec/integration/url_spec.rb
835
855
  - spec/integration/user_spec.rb
836
856
  - spec/integration/yield_spec.rb
837
857
  - spec/models/associations_spec.rb
858
+ - spec/models/buffer_spec.rb
838
859
  - spec/models/dirty_spec.rb
839
860
  - spec/models/field_helpers_spec.rb
840
861
  - spec/models/model_spec.rb
@@ -866,6 +887,10 @@ test_files:
866
887
  - spec/server/html_parser/view_parser_spec.rb
867
888
  - spec/server/rack/asset_files_spec.rb
868
889
  - spec/server/rack/component_paths_spec.rb
890
+ - spec/server/rack/http_request_spec.rb
891
+ - spec/server/rack/http_resource_spec.rb
892
+ - spec/server/rack/http_response_header_spec.rb
893
+ - spec/server/rack/http_response_renderer_spec.rb
869
894
  - spec/server/rack/quite_common_logger_spec.rb
870
895
  - spec/server/rack/rack_requests_spec.rb
871
896
  - spec/spec_helper.rb