volt 0.8.27.beta3 → 0.8.27.beta4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/CHANGELOG.md +11 -0
- data/CONTRIBUTING.md +3 -2
- data/{Readme.md → README.md} +9 -12
- data/Rakefile +2 -9
- data/VERSION +1 -1
- data/app/volt/models/user.rb +8 -0
- data/app/volt/tasks/live_query/data_store.rb +13 -5
- data/app/volt/tasks/live_query/live_query.rb +45 -3
- data/app/volt/tasks/live_query/live_query_pool.rb +9 -1
- data/app/volt/tasks/query_tasks.rb +20 -2
- data/app/volt/tasks/store_tasks.rb +37 -20
- data/app/volt/tasks/user_tasks.rb +15 -13
- data/lib/volt/boot.rb +5 -3
- data/lib/volt/cli/console.rb +1 -0
- data/lib/volt/cli/generate.rb +15 -0
- data/lib/volt/cli.rb +19 -12
- data/lib/volt/config.rb +1 -1
- data/lib/volt/controllers/model_controller.rb +13 -3
- data/lib/volt/extra_core/extra_core.rb +1 -0
- data/lib/volt/extra_core/hash.rb +26 -0
- data/lib/volt/extra_core/object.rb +5 -1
- data/lib/volt/models/array_model.rb +86 -35
- data/lib/volt/models/associations.rb +53 -0
- data/lib/volt/models/buffer.rb +22 -10
- data/lib/volt/models/dirty.rb +88 -0
- data/lib/volt/models/errors.rb +21 -0
- data/lib/volt/models/field_helpers.rb +2 -2
- data/lib/volt/models/listener_tracker.rb +17 -0
- data/lib/volt/models/model.rb +213 -69
- data/lib/volt/models/model_helpers.rb +27 -17
- data/lib/volt/models/permissions.rb +246 -0
- data/lib/volt/models/persistors/array_store.rb +149 -81
- data/lib/volt/models/persistors/base.rb +16 -0
- data/lib/volt/models/persistors/cookies.rb +14 -9
- data/lib/volt/models/persistors/flash.rb +3 -0
- data/lib/volt/models/persistors/local_store.rb +0 -16
- data/lib/volt/models/persistors/model_store.rb +1 -2
- data/lib/volt/models/persistors/query/normalizer.rb +51 -0
- data/lib/volt/models/persistors/query/query_listener.rb +21 -5
- data/lib/volt/models/persistors/query/query_listener_pool.rb +0 -9
- data/lib/volt/models/persistors/store.rb +8 -0
- data/lib/volt/models/persistors/store_state.rb +4 -27
- data/lib/volt/models/state_helpers.rb +11 -0
- data/lib/volt/models/state_manager.rb +43 -0
- data/lib/volt/models/url.rb +5 -5
- data/lib/volt/models/validations.rb +38 -41
- data/lib/volt/models/validators/email_validator.rb +4 -9
- data/lib/volt/models/validators/format_validator.rb +23 -8
- data/lib/volt/models/validators/length_validator.rb +2 -2
- data/lib/volt/models/validators/numericality_validator.rb +7 -3
- data/lib/volt/models/validators/phone_number_validator.rb +4 -9
- data/lib/volt/models/validators/presence_validator.rb +2 -2
- data/lib/volt/models/validators/unique_validator.rb +2 -2
- data/lib/volt/models/validators/user_validation.rb +6 -0
- data/lib/volt/models.rb +8 -3
- data/lib/volt/page/bindings/attribute_binding.rb +10 -4
- data/lib/volt/page/bindings/content_binding.rb +9 -5
- data/lib/volt/page/bindings/if_binding.rb +25 -2
- data/lib/volt/page/bindings/template_binding.rb +19 -1
- data/lib/volt/page/bindings/yield_binding.rb +31 -0
- data/lib/volt/page/page.rb +11 -16
- data/lib/volt/reactive/class_eventable.rb +71 -0
- data/lib/volt/reactive/computation.rb +79 -10
- data/lib/volt/reactive/dependency.rb +27 -8
- data/lib/volt/reactive/eventable.rb +36 -22
- data/lib/volt/reactive/reactive_array.rb +2 -3
- data/lib/volt/reactive/reactive_hash.rb +8 -3
- data/lib/volt/router/routes.rb +2 -1
- data/lib/volt/server/component_templates.rb +0 -2
- data/lib/volt/server/html_parser/component_view_scope.rb +59 -0
- data/lib/volt/server/html_parser/view_handler.rb +3 -0
- data/lib/volt/server/html_parser/view_parser.rb +1 -0
- data/lib/volt/server/html_parser/view_scope.rb +17 -41
- data/lib/volt/server/rack/component_paths.rb +1 -10
- data/lib/volt/server/rack/index_files.rb +9 -4
- data/lib/volt/server/rack/opal_files.rb +22 -14
- data/lib/volt/server/rack/quiet_common_logger.rb +1 -1
- data/lib/volt/server/socket_connection_handler.rb +4 -0
- data/lib/volt/spec/setup.rb +26 -0
- data/lib/volt/tasks/dispatcher.rb +11 -0
- data/lib/volt/utils/event_counter.rb +29 -0
- data/lib/volt/utils/generic_pool.rb +12 -0
- data/lib/volt/utils/modes.rb +40 -0
- data/lib/volt/utils/promise_patch.rb +66 -0
- data/lib/volt/utils/timers.rb +33 -0
- data/lib/volt/volt/users.rb +48 -5
- data/lib/volt.rb +4 -0
- data/spec/apps/kitchen_sink/Gemfile +3 -1
- data/spec/apps/kitchen_sink/app/main/config/routes.rb +9 -8
- data/spec/apps/kitchen_sink/app/main/controllers/main_controller.rb +9 -0
- data/spec/apps/kitchen_sink/app/main/controllers/yield_component_controller.rb +5 -0
- data/spec/apps/kitchen_sink/app/main/views/main/cookie_test.html +1 -1
- data/spec/apps/kitchen_sink/app/main/views/main/index.html +1 -1
- data/spec/apps/kitchen_sink/app/main/views/main/main.html +2 -1
- data/spec/apps/kitchen_sink/app/main/views/main/yield.html +18 -0
- data/spec/apps/kitchen_sink/app/main/views/yield-component/index.html +4 -0
- data/spec/extra_core/logger_spec.rb +4 -2
- data/spec/integration/user_spec.rb +42 -42
- data/spec/integration/yield_spec.rb +18 -0
- data/spec/models/associations_spec.rb +37 -0
- data/spec/models/dirty_spec.rb +102 -0
- data/spec/models/model_spec.rb +64 -8
- data/spec/models/model_state_spec.rb +24 -0
- data/spec/models/permissions_spec.rb +96 -0
- data/spec/models/user_spec.rb +8 -5
- data/spec/models/user_validation_spec.rb +24 -0
- data/spec/models/validations_spec.rb +44 -5
- data/spec/models/validators/email_validator_spec.rb +109 -82
- data/spec/models/validators/format_validator_spec.rb +4 -107
- data/spec/models/validators/length_validator_spec.rb +9 -9
- data/spec/models/validators/phone_number_validator_spec.rb +60 -103
- data/spec/models/validators/shared_examples_for_validators.rb +123 -0
- data/spec/reactive/class_eventable_spec.rb +37 -0
- data/spec/reactive/computation_spec.rb +68 -3
- data/spec/reactive/dependency_spec.rb +71 -0
- data/spec/reactive/eventable_spec.rb +21 -0
- data/spec/reactive/reactive_hash_spec.rb +12 -0
- data/spec/router/routes_spec.rb +50 -50
- data/spec/server/html_parser/view_parser_spec.rb +0 -3
- data/spec/server/rack/component_paths_spec.rb +11 -0
- data/spec/server/rack/quite_common_logger_spec.rb +3 -4
- data/spec/spec_helper.rb +7 -3
- data/templates/component/config/dependencies.rb +1 -7
- data/templates/component/config/routes.rb +1 -1
- data/templates/component/controllers/main_controller.rb.tt +20 -0
- data/templates/component/views/{index → main}/index.html.tt +0 -0
- data/templates/newgem/lib/newgem.rb.tt +1 -3
- data/templates/project/app/main/config/routes.rb +3 -3
- data/templates/project/app/main/views/main/main.html.tt +4 -4
- data/templates/project/config/app.rb.tt +6 -0
- data/volt.gemspec +11 -7
- metadata +96 -42
- data/lib/volt/models/model_state.rb +0 -21
- data/templates/component/controllers/main_controller.rb +0 -18
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.
|
4
|
+
version: 0.8.27.beta4
|
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-
|
11
|
+
date: 2015-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -94,20 +94,6 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 1.9.0
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: rake
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: 10.0.4
|
104
|
-
type: :runtime
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: 10.0.4
|
111
97
|
- !ruby/object:Gem::Dependency
|
112
98
|
name: listen
|
113
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -154,14 +140,14 @@ dependencies:
|
|
154
140
|
name: yui-compressor
|
155
141
|
requirement: !ruby/object:Gem::Requirement
|
156
142
|
requirements:
|
157
|
-
- - "
|
143
|
+
- - "~>"
|
158
144
|
- !ruby/object:Gem::Version
|
159
145
|
version: 0.12.0
|
160
146
|
type: :runtime
|
161
147
|
prerelease: false
|
162
148
|
version_requirements: !ruby/object:Gem::Requirement
|
163
149
|
requirements:
|
164
|
-
- - "
|
150
|
+
- - "~>"
|
165
151
|
- !ruby/object:Gem::Version
|
166
152
|
version: 0.12.0
|
167
153
|
- !ruby/object:Gem::Dependency
|
@@ -170,28 +156,28 @@ dependencies:
|
|
170
156
|
requirements:
|
171
157
|
- - "~>"
|
172
158
|
- !ruby/object:Gem::Version
|
173
|
-
version: 0.
|
159
|
+
version: 0.7.0
|
174
160
|
type: :runtime
|
175
161
|
prerelease: false
|
176
162
|
version_requirements: !ruby/object:Gem::Requirement
|
177
163
|
requirements:
|
178
164
|
- - "~>"
|
179
165
|
- !ruby/object:Gem::Version
|
180
|
-
version: 0.
|
166
|
+
version: 0.7.0
|
181
167
|
- !ruby/object:Gem::Dependency
|
182
168
|
name: opal-jquery
|
183
169
|
requirement: !ruby/object:Gem::Requirement
|
184
170
|
requirements:
|
185
171
|
- - "~>"
|
186
172
|
- !ruby/object:Gem::Version
|
187
|
-
version: 0.
|
173
|
+
version: 0.3.0
|
188
174
|
type: :runtime
|
189
175
|
prerelease: false
|
190
176
|
version_requirements: !ruby/object:Gem::Requirement
|
191
177
|
requirements:
|
192
178
|
- - "~>"
|
193
179
|
- !ruby/object:Gem::Version
|
194
|
-
version: 0.
|
180
|
+
version: 0.3.0
|
195
181
|
- !ruby/object:Gem::Dependency
|
196
182
|
name: rspec-core
|
197
183
|
requirement: !ruby/object:Gem::Requirement
|
@@ -206,20 +192,6 @@ dependencies:
|
|
206
192
|
- - "~>"
|
207
193
|
- !ruby/object:Gem::Version
|
208
194
|
version: 3.1.0
|
209
|
-
- !ruby/object:Gem::Dependency
|
210
|
-
name: rspec-expectations
|
211
|
-
requirement: !ruby/object:Gem::Requirement
|
212
|
-
requirements:
|
213
|
-
- - "~>"
|
214
|
-
- !ruby/object:Gem::Version
|
215
|
-
version: 3.1.0
|
216
|
-
type: :runtime
|
217
|
-
prerelease: false
|
218
|
-
version_requirements: !ruby/object:Gem::Requirement
|
219
|
-
requirements:
|
220
|
-
- - "~>"
|
221
|
-
- !ruby/object:Gem::Version
|
222
|
-
version: 3.1.0
|
223
195
|
- !ruby/object:Gem::Dependency
|
224
196
|
name: capybara
|
225
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -282,14 +254,14 @@ dependencies:
|
|
282
254
|
requirements:
|
283
255
|
- - '='
|
284
256
|
- !ruby/object:Gem::Version
|
285
|
-
version: 0.
|
257
|
+
version: 0.4.0
|
286
258
|
type: :runtime
|
287
259
|
prerelease: false
|
288
260
|
version_requirements: !ruby/object:Gem::Requirement
|
289
261
|
requirements:
|
290
262
|
- - '='
|
291
263
|
- !ruby/object:Gem::Version
|
292
|
-
version: 0.
|
264
|
+
version: 0.4.0
|
293
265
|
- !ruby/object:Gem::Dependency
|
294
266
|
name: bundler
|
295
267
|
requirement: !ruby/object:Gem::Requirement
|
@@ -360,6 +332,20 @@ dependencies:
|
|
360
332
|
- - "~>"
|
361
333
|
- !ruby/object:Gem::Version
|
362
334
|
version: 4.3.0
|
335
|
+
- !ruby/object:Gem::Dependency
|
336
|
+
name: rake
|
337
|
+
requirement: !ruby/object:Gem::Requirement
|
338
|
+
requirements:
|
339
|
+
- - "~>"
|
340
|
+
- !ruby/object:Gem::Version
|
341
|
+
version: 10.0.4
|
342
|
+
type: :development
|
343
|
+
prerelease: false
|
344
|
+
version_requirements: !ruby/object:Gem::Requirement
|
345
|
+
requirements:
|
346
|
+
- - "~>"
|
347
|
+
- !ruby/object:Gem::Version
|
348
|
+
version: 10.0.4
|
363
349
|
- !ruby/object:Gem::Dependency
|
364
350
|
name: yard
|
365
351
|
requirement: !ruby/object:Gem::Requirement
|
@@ -374,6 +360,34 @@ dependencies:
|
|
374
360
|
- - "~>"
|
375
361
|
- !ruby/object:Gem::Version
|
376
362
|
version: 0.8.7.0
|
363
|
+
- !ruby/object:Gem::Dependency
|
364
|
+
name: redcarpet
|
365
|
+
requirement: !ruby/object:Gem::Requirement
|
366
|
+
requirements:
|
367
|
+
- - "~>"
|
368
|
+
- !ruby/object:Gem::Version
|
369
|
+
version: 3.2.2
|
370
|
+
type: :development
|
371
|
+
prerelease: false
|
372
|
+
version_requirements: !ruby/object:Gem::Requirement
|
373
|
+
requirements:
|
374
|
+
- - "~>"
|
375
|
+
- !ruby/object:Gem::Version
|
376
|
+
version: 3.2.2
|
377
|
+
- !ruby/object:Gem::Dependency
|
378
|
+
name: github-markup
|
379
|
+
requirement: !ruby/object:Gem::Requirement
|
380
|
+
requirements:
|
381
|
+
- - "~>"
|
382
|
+
- !ruby/object:Gem::Version
|
383
|
+
version: 1.3.1
|
384
|
+
type: :development
|
385
|
+
prerelease: false
|
386
|
+
version_requirements: !ruby/object:Gem::Requirement
|
387
|
+
requirements:
|
388
|
+
- - "~>"
|
389
|
+
- !ruby/object:Gem::Version
|
390
|
+
version: 1.3.1
|
377
391
|
- !ruby/object:Gem::Dependency
|
378
392
|
name: sauce
|
379
393
|
requirement: !ruby/object:Gem::Requirement
|
@@ -434,8 +448,8 @@ files:
|
|
434
448
|
- Gemfile
|
435
449
|
- Guardfile
|
436
450
|
- LICENSE.txt
|
451
|
+
- README.md
|
437
452
|
- Rakefile
|
438
|
-
- Readme.md
|
439
453
|
- VERSION
|
440
454
|
- app/volt/assets/css/notices.css.scss
|
441
455
|
- app/volt/assets/js/jquery-2.0.3.js
|
@@ -473,6 +487,7 @@ files:
|
|
473
487
|
- lib/volt/extra_core/blank.rb
|
474
488
|
- lib/volt/extra_core/class.rb
|
475
489
|
- lib/volt/extra_core/extra_core.rb
|
490
|
+
- lib/volt/extra_core/hash.rb
|
476
491
|
- lib/volt/extra_core/inflections.rb
|
477
492
|
- lib/volt/extra_core/inflector.rb
|
478
493
|
- lib/volt/extra_core/inflector/inflections.rb
|
@@ -485,14 +500,18 @@ files:
|
|
485
500
|
- lib/volt/extra_core/true_false.rb
|
486
501
|
- lib/volt/models.rb
|
487
502
|
- lib/volt/models/array_model.rb
|
503
|
+
- lib/volt/models/associations.rb
|
488
504
|
- lib/volt/models/buffer.rb
|
489
505
|
- lib/volt/models/cursor.rb
|
506
|
+
- lib/volt/models/dirty.rb
|
507
|
+
- lib/volt/models/errors.rb
|
490
508
|
- lib/volt/models/field_helpers.rb
|
509
|
+
- lib/volt/models/listener_tracker.rb
|
491
510
|
- lib/volt/models/model.rb
|
492
511
|
- lib/volt/models/model_hash_behaviour.rb
|
493
512
|
- lib/volt/models/model_helpers.rb
|
494
|
-
- lib/volt/models/model_state.rb
|
495
513
|
- lib/volt/models/model_wrapper.rb
|
514
|
+
- lib/volt/models/permissions.rb
|
496
515
|
- lib/volt/models/persistors/array_store.rb
|
497
516
|
- lib/volt/models/persistors/base.rb
|
498
517
|
- lib/volt/models/persistors/cookies.rb
|
@@ -501,11 +520,14 @@ files:
|
|
501
520
|
- lib/volt/models/persistors/model_identity_map.rb
|
502
521
|
- lib/volt/models/persistors/model_store.rb
|
503
522
|
- lib/volt/models/persistors/params.rb
|
523
|
+
- lib/volt/models/persistors/query/normalizer.rb
|
504
524
|
- lib/volt/models/persistors/query/query_listener.rb
|
505
525
|
- lib/volt/models/persistors/query/query_listener_pool.rb
|
506
526
|
- lib/volt/models/persistors/store.rb
|
507
527
|
- lib/volt/models/persistors/store_factory.rb
|
508
528
|
- lib/volt/models/persistors/store_state.rb
|
529
|
+
- lib/volt/models/state_helpers.rb
|
530
|
+
- lib/volt/models/state_manager.rb
|
509
531
|
- lib/volt/models/url.rb
|
510
532
|
- lib/volt/models/validations.rb
|
511
533
|
- lib/volt/models/validators/email_validator.rb
|
@@ -515,6 +537,7 @@ files:
|
|
515
537
|
- lib/volt/models/validators/phone_number_validator.rb
|
516
538
|
- lib/volt/models/validators/presence_validator.rb
|
517
539
|
- lib/volt/models/validators/unique_validator.rb
|
540
|
+
- lib/volt/models/validators/user_validation.rb
|
518
541
|
- lib/volt/page/bindings/attribute_binding.rb
|
519
542
|
- lib/volt/page/bindings/base_binding.rb
|
520
543
|
- lib/volt/page/bindings/component_binding.rb
|
@@ -525,6 +548,7 @@ files:
|
|
525
548
|
- lib/volt/page/bindings/template_binding.rb
|
526
549
|
- lib/volt/page/bindings/template_binding/grouped_controllers.rb
|
527
550
|
- lib/volt/page/bindings/template_binding/view_lookup_for_path.rb
|
551
|
+
- lib/volt/page/bindings/yield_binding.rb
|
528
552
|
- lib/volt/page/channel.rb
|
529
553
|
- lib/volt/page/channel_stub.rb
|
530
554
|
- lib/volt/page/document.rb
|
@@ -545,6 +569,7 @@ files:
|
|
545
569
|
- lib/volt/page/tasks.rb
|
546
570
|
- lib/volt/page/template_renderer.rb
|
547
571
|
- lib/volt/page/url_tracker.rb
|
572
|
+
- lib/volt/reactive/class_eventable.rb
|
548
573
|
- lib/volt/reactive/computation.rb
|
549
574
|
- lib/volt/reactive/dependency.rb
|
550
575
|
- lib/volt/reactive/eventable.rb
|
@@ -558,6 +583,7 @@ files:
|
|
558
583
|
- lib/volt/server/component_handler.rb
|
559
584
|
- lib/volt/server/component_templates.rb
|
560
585
|
- lib/volt/server/html_parser/attribute_scope.rb
|
586
|
+
- lib/volt/server/html_parser/component_view_scope.rb
|
561
587
|
- lib/volt/server/html_parser/each_scope.rb
|
562
588
|
- lib/volt/server/html_parser/if_view_scope.rb
|
563
589
|
- lib/volt/server/html_parser/sandlebars_parser.rb
|
@@ -582,9 +608,13 @@ files:
|
|
582
608
|
- lib/volt/tasks/dispatcher.rb
|
583
609
|
- lib/volt/tasks/task_handler.rb
|
584
610
|
- lib/volt/utils/ejson.rb
|
611
|
+
- lib/volt/utils/event_counter.rb
|
585
612
|
- lib/volt/utils/generic_counting_pool.rb
|
586
613
|
- lib/volt/utils/generic_pool.rb
|
587
614
|
- lib/volt/utils/local_storage.rb
|
615
|
+
- lib/volt/utils/modes.rb
|
616
|
+
- lib/volt/utils/promise_patch.rb
|
617
|
+
- lib/volt/utils/timers.rb
|
588
618
|
- lib/volt/volt/environment.rb
|
589
619
|
- lib/volt/volt/users.rb
|
590
620
|
- spec/apps/file_loading/app/bootstrap/assets/js/bootstrap.js
|
@@ -601,6 +631,7 @@ files:
|
|
601
631
|
- spec/apps/kitchen_sink/app/main/config/routes.rb
|
602
632
|
- spec/apps/kitchen_sink/app/main/controllers/main_controller.rb
|
603
633
|
- spec/apps/kitchen_sink/app/main/controllers/todos_controller.rb
|
634
|
+
- spec/apps/kitchen_sink/app/main/controllers/yield_component_controller.rb
|
604
635
|
- spec/apps/kitchen_sink/app/main/models/user.rb
|
605
636
|
- spec/apps/kitchen_sink/app/main/views/main/bindings.html
|
606
637
|
- spec/apps/kitchen_sink/app/main/views/main/cookie_test.html
|
@@ -608,7 +639,9 @@ files:
|
|
608
639
|
- spec/apps/kitchen_sink/app/main/views/main/index.html
|
609
640
|
- spec/apps/kitchen_sink/app/main/views/main/main.html
|
610
641
|
- spec/apps/kitchen_sink/app/main/views/main/store.html
|
642
|
+
- spec/apps/kitchen_sink/app/main/views/main/yield.html
|
611
643
|
- spec/apps/kitchen_sink/app/main/views/todos/index.html
|
644
|
+
- spec/apps/kitchen_sink/app/main/views/yield-component/index.html
|
612
645
|
- spec/apps/kitchen_sink/config.ru
|
613
646
|
- spec/apps/kitchen_sink/config/app.rb
|
614
647
|
- spec/apps/kitchen_sink/config/base/index.html
|
@@ -629,24 +662,33 @@ files:
|
|
629
662
|
- spec/integration/templates_spec.rb
|
630
663
|
- spec/integration/url_spec.rb
|
631
664
|
- spec/integration/user_spec.rb
|
665
|
+
- spec/integration/yield_spec.rb
|
666
|
+
- spec/models/associations_spec.rb
|
667
|
+
- spec/models/dirty_spec.rb
|
632
668
|
- spec/models/field_helpers_spec.rb
|
633
669
|
- spec/models/model_spec.rb
|
670
|
+
- spec/models/model_state_spec.rb
|
671
|
+
- spec/models/permissions_spec.rb
|
634
672
|
- spec/models/persistors/params_spec.rb
|
635
673
|
- spec/models/persistors/store_spec.rb
|
636
674
|
- spec/models/user_spec.rb
|
675
|
+
- spec/models/user_validation_spec.rb
|
637
676
|
- spec/models/validations_spec.rb
|
638
677
|
- spec/models/validators/email_validator_spec.rb
|
639
678
|
- spec/models/validators/format_validator_spec.rb
|
640
679
|
- spec/models/validators/length_validator_spec.rb
|
641
680
|
- spec/models/validators/phone_number_validator_spec.rb
|
681
|
+
- spec/models/validators/shared_examples_for_validators.rb
|
642
682
|
- spec/page/bindings/content_binding_spec.rb
|
643
683
|
- spec/page/bindings/template_binding/view_lookup_for_path_spec.rb
|
644
684
|
- spec/page/bindings/template_binding_spec.rb
|
645
685
|
- spec/page/sub_context_spec.rb
|
686
|
+
- spec/reactive/class_eventable_spec.rb
|
646
687
|
- spec/reactive/computation_spec.rb
|
647
688
|
- spec/reactive/dependency_spec.rb
|
648
689
|
- spec/reactive/eventable_spec.rb
|
649
690
|
- spec/reactive/reactive_array_spec.rb
|
691
|
+
- spec/reactive/reactive_hash_spec.rb
|
650
692
|
- spec/router/routes_spec.rb
|
651
693
|
- spec/server/html_parser/sample_page.html
|
652
694
|
- spec/server/html_parser/sandlebars_parser_spec.rb
|
@@ -670,10 +712,10 @@ files:
|
|
670
712
|
- templates/component/assets/js/.empty_directory
|
671
713
|
- templates/component/config/dependencies.rb
|
672
714
|
- templates/component/config/routes.rb
|
673
|
-
- templates/component/controllers/main_controller.rb
|
715
|
+
- templates/component/controllers/main_controller.rb.tt
|
674
716
|
- templates/component/models/.empty_directory
|
675
717
|
- templates/component/tasks/.empty_directory
|
676
|
-
- templates/component/views/
|
718
|
+
- templates/component/views/main/index.html.tt
|
677
719
|
- templates/model/model.rb.tt
|
678
720
|
- templates/newgem/Gemfile.tt
|
679
721
|
- templates/newgem/LICENSE.txt.tt
|
@@ -760,6 +802,7 @@ test_files:
|
|
760
802
|
- spec/apps/kitchen_sink/app/main/config/routes.rb
|
761
803
|
- spec/apps/kitchen_sink/app/main/controllers/main_controller.rb
|
762
804
|
- spec/apps/kitchen_sink/app/main/controllers/todos_controller.rb
|
805
|
+
- spec/apps/kitchen_sink/app/main/controllers/yield_component_controller.rb
|
763
806
|
- spec/apps/kitchen_sink/app/main/models/user.rb
|
764
807
|
- spec/apps/kitchen_sink/app/main/views/main/bindings.html
|
765
808
|
- spec/apps/kitchen_sink/app/main/views/main/cookie_test.html
|
@@ -767,7 +810,9 @@ test_files:
|
|
767
810
|
- spec/apps/kitchen_sink/app/main/views/main/index.html
|
768
811
|
- spec/apps/kitchen_sink/app/main/views/main/main.html
|
769
812
|
- spec/apps/kitchen_sink/app/main/views/main/store.html
|
813
|
+
- spec/apps/kitchen_sink/app/main/views/main/yield.html
|
770
814
|
- spec/apps/kitchen_sink/app/main/views/todos/index.html
|
815
|
+
- spec/apps/kitchen_sink/app/main/views/yield-component/index.html
|
771
816
|
- spec/apps/kitchen_sink/config.ru
|
772
817
|
- spec/apps/kitchen_sink/config/app.rb
|
773
818
|
- spec/apps/kitchen_sink/config/base/index.html
|
@@ -788,24 +833,33 @@ test_files:
|
|
788
833
|
- spec/integration/templates_spec.rb
|
789
834
|
- spec/integration/url_spec.rb
|
790
835
|
- spec/integration/user_spec.rb
|
836
|
+
- spec/integration/yield_spec.rb
|
837
|
+
- spec/models/associations_spec.rb
|
838
|
+
- spec/models/dirty_spec.rb
|
791
839
|
- spec/models/field_helpers_spec.rb
|
792
840
|
- spec/models/model_spec.rb
|
841
|
+
- spec/models/model_state_spec.rb
|
842
|
+
- spec/models/permissions_spec.rb
|
793
843
|
- spec/models/persistors/params_spec.rb
|
794
844
|
- spec/models/persistors/store_spec.rb
|
795
845
|
- spec/models/user_spec.rb
|
846
|
+
- spec/models/user_validation_spec.rb
|
796
847
|
- spec/models/validations_spec.rb
|
797
848
|
- spec/models/validators/email_validator_spec.rb
|
798
849
|
- spec/models/validators/format_validator_spec.rb
|
799
850
|
- spec/models/validators/length_validator_spec.rb
|
800
851
|
- spec/models/validators/phone_number_validator_spec.rb
|
852
|
+
- spec/models/validators/shared_examples_for_validators.rb
|
801
853
|
- spec/page/bindings/content_binding_spec.rb
|
802
854
|
- spec/page/bindings/template_binding/view_lookup_for_path_spec.rb
|
803
855
|
- spec/page/bindings/template_binding_spec.rb
|
804
856
|
- spec/page/sub_context_spec.rb
|
857
|
+
- spec/reactive/class_eventable_spec.rb
|
805
858
|
- spec/reactive/computation_spec.rb
|
806
859
|
- spec/reactive/dependency_spec.rb
|
807
860
|
- spec/reactive/eventable_spec.rb
|
808
861
|
- spec/reactive/reactive_array_spec.rb
|
862
|
+
- spec/reactive/reactive_hash_spec.rb
|
809
863
|
- spec/router/routes_spec.rb
|
810
864
|
- spec/server/html_parser/sample_page.html
|
811
865
|
- spec/server/html_parser/sandlebars_parser_spec.rb
|
@@ -1,21 +0,0 @@
|
|
1
|
-
module Volt
|
2
|
-
# All models have a state that has to do with it being loaded, in process of
|
3
|
-
# being loaded, or not yet loading.
|
4
|
-
module ModelState
|
5
|
-
def state
|
6
|
-
if @persistor && @persistor.respond_to?(:state)
|
7
|
-
@persistor.state
|
8
|
-
else
|
9
|
-
@state || :loaded
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
def change_state_to(state)
|
14
|
-
@state = state
|
15
|
-
end
|
16
|
-
|
17
|
-
def loaded?
|
18
|
-
state == :loaded
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
class MainController < Volt::ModelController
|
2
|
-
def index
|
3
|
-
# Add code for when the index view is loaded
|
4
|
-
end
|
5
|
-
|
6
|
-
def about
|
7
|
-
# Add code for when the about view is loaded
|
8
|
-
end
|
9
|
-
|
10
|
-
private
|
11
|
-
|
12
|
-
# the main template contains a #template binding that shows another
|
13
|
-
# template. This is the path to that template. It may change based
|
14
|
-
# on the params._controller and params._action values.
|
15
|
-
def main_path
|
16
|
-
params._controller.or('main') + '/' + params._action.or('index')
|
17
|
-
end
|
18
|
-
end
|