volt 0.8.21 → 0.8.22.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +15 -10
  3. data/CHANGELOG.md +8 -0
  4. data/Gemfile +7 -33
  5. data/Readme.md +2 -0
  6. data/VERSION +1 -1
  7. data/app/volt/assets/js/{setImmediate.js → volt_js_polyfills.js} +14 -0
  8. data/app/volt/models/user.rb +21 -26
  9. data/app/volt/tasks/live_query/data_store.rb +4 -0
  10. data/app/volt/tasks/store_tasks.rb +8 -11
  11. data/app/volt/tasks/user_tasks.rb +18 -17
  12. data/lib/volt.rb +7 -1
  13. data/lib/volt/cli.rb +2 -0
  14. data/lib/volt/config.rb +69 -29
  15. data/lib/volt/extra_core/object.rb +8 -0
  16. data/lib/volt/models/model_hash_behaviour.rb +26 -6
  17. data/lib/volt/models/persistors/model_store.rb +1 -2
  18. data/lib/volt/models/validations.rb +18 -9
  19. data/lib/volt/models/validators/length_validator.rb +1 -1
  20. data/lib/volt/models/validators/presence_validator.rb +1 -1
  21. data/lib/volt/models/validators/unique_validator.rb +1 -1
  22. data/lib/volt/page/bindings/template_binding.rb +2 -1
  23. data/lib/volt/page/page.rb +7 -2
  24. data/lib/volt/page/sub_context.rb +8 -4
  25. data/lib/volt/page/targets/base_section.rb +1 -1
  26. data/lib/volt/page/targets/dom_template.rb +1 -1
  27. data/lib/volt/server.rb +3 -2
  28. data/lib/volt/server/html_parser/view_scope.rb +1 -0
  29. data/lib/volt/server/rack/component_code.rb +8 -1
  30. data/lib/volt/server/rack/component_paths.rb +2 -1
  31. data/lib/volt/server/rack/quiet_common_logger.rb +34 -0
  32. data/lib/volt/spec/setup.rb +30 -1
  33. data/lib/volt/utils/generic_pool.rb +4 -0
  34. data/lib/volt/volt/users.rb +18 -0
  35. data/spec/apps/kitchen_sink/Gemfile +3 -0
  36. data/spec/apps/kitchen_sink/app/main/config/dependencies.rb +6 -0
  37. data/spec/apps/kitchen_sink/app/main/config/routes.rb +5 -1
  38. data/spec/apps/kitchen_sink/app/main/models/user.rb +2 -0
  39. data/spec/apps/kitchen_sink/app/main/views/main/main.html +1 -1
  40. data/spec/apps/kitchen_sink/{public → config/base}/index.html +0 -0
  41. data/spec/integration/bindings_spec.rb +1 -1
  42. data/spec/integration/cookies_spec.rb +1 -1
  43. data/spec/integration/flash_spec.rb +3 -2
  44. data/spec/integration/list_spec.rb +1 -1
  45. data/spec/integration/templates_spec.rb +1 -1
  46. data/spec/integration/url_spec.rb +1 -1
  47. data/spec/integration/user_spec.rb +60 -0
  48. data/spec/models/model_spec.rb +0 -1
  49. data/spec/page/bindings/template_binding_spec.rb +0 -4
  50. data/spec/server/rack/asset_files_spec.rb +1 -1
  51. data/spec/spec_helper.rb +5 -0
  52. data/templates/component/tasks/.empty_directory +0 -0
  53. data/templates/newgem/app/newgem/views/main/{main.html → index.html} +0 -0
  54. data/templates/project/Gemfile.tt +0 -11
  55. data/templates/project/app/main/config/routes.rb +5 -0
  56. data/templates/project/app/main/tasks/.empty_directory +0 -0
  57. data/templates/project/app/main/views/main/main.html.tt +1 -0
  58. data/templates/project/config/app.rb.tt +8 -3
  59. data/volt.gemspec +4 -6
  60. metadata +58 -12
  61. data/spec/apps/kitchen_sink/app/main/controllers/users_test_controller.rb +0 -27
  62. data/spec/apps/kitchen_sink/app/main/views/users_test/index.html +0 -22
@@ -1,27 +0,0 @@
1
- class UsersTestController < Volt::ModelController
2
- def index
3
- self.model = store._users.buffer
4
- end
5
-
6
- def signup
7
- puts "Signup"
8
- model.save!.then do |a|
9
- puts "Saved"
10
- end.fail do |err|
11
- puts "Fail with: #{err.inspect}"
12
- end
13
- end
14
-
15
- def login
16
- puts "USER LOGIN"
17
- User.login('ryanstout@gmail.com', 'temppass').then do |result|
18
- puts "Login Success"
19
- end.fail do |err|
20
- puts "ERR: #{err.inspect}"
21
- end
22
- end
23
-
24
- def logout
25
- User.logout
26
- end
27
- end
@@ -1,22 +0,0 @@
1
- <:Title>
2
- Users Test
3
-
4
- <:Body>
5
- <h1>Users Test</h1>
6
-
7
- <form e-submit="signup">
8
- {{ errors.html_inspect }}<br />
9
- <input value="{{ _username }}" /><br />
10
- <input type="password" value="{{ _password }}" /><br />
11
-
12
- <button>Signup</button>
13
- </form>
14
-
15
- <hr />
16
-
17
- <button e-click="login">Login</button><button e-click="logout">Logout</button>
18
-
19
- {{ if Volt.user }}
20
- {{ Volt.user._username }}<br />
21
- {{ Volt.user._name }}
22
- {{ end }}