volt 0.9.5 → 0.9.6.pre1

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 +10 -0
  3. data/app/volt/tasks/query_tasks.rb +1 -1
  4. data/app/volt/tasks/user_tasks.rb +6 -0
  5. data/docs/UPGRADE_GUIDE.md +19 -0
  6. data/lib/volt.rb +0 -1
  7. data/lib/volt/cli.rb +3 -0
  8. data/lib/volt/cli/destroy.rb +8 -0
  9. data/lib/volt/cli/generate.rb +1 -105
  10. data/lib/volt/cli/generators.rb +111 -0
  11. data/lib/volt/controllers/model_controller.rb +1 -1
  12. data/lib/volt/helpers/time.rb +5 -5
  13. data/lib/volt/models/array_model.rb +1 -1
  14. data/lib/volt/models/helpers/base.rb +28 -12
  15. data/lib/volt/models/persistors/page.rb +6 -6
  16. data/lib/volt/models/persistors/query/query_listener.rb +1 -1
  17. data/lib/volt/page/bindings/each_binding.rb +1 -1
  18. data/lib/volt/page/channel.rb +18 -7
  19. data/lib/volt/page/tasks.rb +10 -4
  20. data/lib/volt/reactive/computation.rb +20 -8
  21. data/lib/volt/reactive/dependency.rb +3 -1
  22. data/lib/volt/server/component_templates.rb +4 -3
  23. data/lib/volt/server/middleware/default_middleware_stack.rb +6 -6
  24. data/lib/volt/server/rack/index_files.rb +0 -12
  25. data/lib/volt/server/rack/opal_files.rb +1 -1
  26. data/lib/volt/server/socket_connection_handler.rb +40 -1
  27. data/lib/volt/server/template_handlers/sprockets_component_handler.rb +5 -2
  28. data/lib/volt/server/template_handlers/view_processor.rb +4 -4
  29. data/lib/volt/tasks/task.rb +2 -1
  30. data/lib/volt/utils/csso_patch.rb +1 -1
  31. data/lib/volt/version.rb +1 -1
  32. data/lib/volt/volt/app.rb +9 -0
  33. data/lib/volt/volt/server_setup/app.rb +19 -0
  34. data/lib/volt/volt/users.rb +4 -0
  35. data/spec/apps/kitchen_sink/app/main/config/routes.rb +1 -0
  36. data/spec/apps/kitchen_sink/app/main/controllers/main_controller.rb +3 -0
  37. data/spec/apps/kitchen_sink/app/main/models/user.rb +18 -0
  38. data/spec/apps/kitchen_sink/app/main/views/main/callbacks.html +7 -0
  39. data/spec/integration/bindings_spec.rb +1 -1
  40. data/spec/integration/callbacks_spec.rb +31 -0
  41. data/spec/integration/todos_spec.rb +2 -2
  42. data/spec/models/array_model_spec.rb +13 -0
  43. data/spec/models/associations_spec.rb +1 -1
  44. data/spec/models/field_helpers_spec.rb +1 -1
  45. data/spec/models/model_spec.rb +18 -0
  46. data/spec/models/permissions_spec.rb +1 -2
  47. data/spec/models/persistors/page_spec.rb +19 -0
  48. data/spec/reactive/computation_spec.rb +33 -0
  49. data/spec/server/socket_connection_handler_spec.rb +99 -0
  50. data/spec/tasks/dispatcher_spec.rb +1 -1
  51. data/spec/tasks/user_tasks_spec.rb +1 -1
  52. data/spec/utils/task_argument_filtererer_spec.rb +1 -1
  53. data/templates/project/Gemfile.tt +1 -1
  54. data/templates/project/README.md.tt +1 -1
  55. data/templates/project/config/app.rb.tt +10 -0
  56. data/templates/view/index.html.tt +1 -1
  57. metadata +14 -5
  58. data/lib/volt/utils/set_patch.rb +0 -25
@@ -1,25 +0,0 @@
1
- # Temp until https://github.com/opal/opal/pull/596
2
- require 'set'
3
-
4
- class Set
5
- def delete(o)
6
- if include?(o)
7
- @hash.delete(o)
8
- true
9
- else
10
- nil
11
- end
12
- end
13
-
14
- def delete_if
15
- block_given? or return enum_for(__method__)
16
- # @hash.delete_if should be faster, but using it breaks the order
17
- # of enumeration in subclasses.
18
- select { |o| yield o }.each { |o| @hash.delete(o) }
19
- self
20
- end
21
-
22
- def to_a
23
- @hash.keys
24
- end
25
- end