volt 0.8.27.beta2 → 0.8.27.beta3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/.travis.yml +3 -0
  4. data/CHANGELOG.md +7 -2
  5. data/CONTRIBUTING.md +133 -0
  6. data/Gemfile +0 -1
  7. data/Rakefile +11 -3
  8. data/Readme.md +4 -4
  9. data/VERSION +1 -1
  10. data/app/volt/models/user.rb +6 -3
  11. data/lib/volt/cli/console.rb +21 -12
  12. data/lib/volt/cli/runner.rb +1 -1
  13. data/lib/volt/cli.rb +5 -4
  14. data/lib/volt/config.rb +9 -11
  15. data/lib/volt/controllers/model_controller.rb +16 -0
  16. data/lib/volt/data_stores/data_store.rb +1 -1
  17. data/lib/volt/extra_core/array.rb +1 -6
  18. data/lib/volt/extra_core/blank.rb +1 -3
  19. data/lib/volt/extra_core/class.rb +1 -1
  20. data/lib/volt/extra_core/extra_core.rb +0 -1
  21. data/lib/volt/extra_core/logger.rb +78 -1
  22. data/lib/volt/extra_core/object.rb +4 -4
  23. data/lib/volt/models/array_model.rb +2 -3
  24. data/lib/volt/models/buffer.rb +1 -2
  25. data/lib/volt/models/field_helpers.rb +4 -5
  26. data/lib/volt/models/model.rb +27 -1
  27. data/lib/volt/models/model_hash_behaviour.rb +3 -4
  28. data/lib/volt/models/persistors/array_store.rb +6 -7
  29. data/lib/volt/models/persistors/cookies.rb +2 -2
  30. data/lib/volt/models/persistors/model_store.rb +5 -6
  31. data/lib/volt/models/validations.rb +5 -7
  32. data/lib/volt/models/validators/email_validator.rb +8 -29
  33. data/lib/volt/models/validators/format_validator.rb +116 -0
  34. data/lib/volt/models/validators/numericality_validator.rb +2 -2
  35. data/lib/volt/models/validators/phone_number_validator.rb +8 -29
  36. data/lib/volt/models/validators/unique_validator.rb +2 -2
  37. data/lib/volt/page/bindings/content_binding.rb +1 -1
  38. data/lib/volt/page/bindings/each_binding.rb +1 -1
  39. data/lib/volt/page/bindings/template_binding/view_lookup_for_path.rb +92 -0
  40. data/lib/volt/page/bindings/template_binding.rb +10 -85
  41. data/lib/volt/page/channel.rb +0 -1
  42. data/lib/volt/page/page.rb +5 -7
  43. data/lib/volt/page/sub_context.rb +1 -1
  44. data/lib/volt/page/targets/base_section.rb +2 -2
  45. data/lib/volt/page/targets/helpers/comment_searchers.rb +2 -2
  46. data/lib/volt/reactive/reactive_accessors.rb +1 -1
  47. data/lib/volt/reactive/reactive_array.rb +6 -6
  48. data/lib/volt/router/routes.rb +4 -4
  49. data/lib/volt/server/rack/asset_files.rb +1 -2
  50. data/lib/volt/server/rack/component_code.rb +0 -2
  51. data/lib/volt/server/rack/component_paths.rb +2 -2
  52. data/lib/volt/server/rack/quiet_common_logger.rb +2 -2
  53. data/lib/volt/spec/capybara.rb +1 -1
  54. data/lib/volt/spec/sauce_labs.rb +6 -6
  55. data/lib/volt/spec/setup.rb +8 -7
  56. data/lib/volt/tasks/dispatcher.rb +12 -10
  57. data/lib/volt/tasks/task_handler.rb +1 -1
  58. data/lib/volt/utils/generic_pool.rb +2 -2
  59. data/lib/volt/volt/users.rb +7 -9
  60. data/lib/volt.rb +2 -4
  61. data/spec/apps/file_loading/app/missing_deps/config/dependencies.rb +1 -1
  62. data/spec/apps/kitchen_sink/Gemfile +2 -2
  63. data/spec/apps/kitchen_sink/app/main/config/dependencies.rb +1 -1
  64. data/spec/apps/kitchen_sink/app/main/config/routes.rb +0 -1
  65. data/spec/apps/kitchen_sink/app/main/models/user.rb +1 -1
  66. data/spec/apps/kitchen_sink/app/main/views/main/main.html +1 -1
  67. data/spec/apps/kitchen_sink/config/app.rb +1 -1
  68. data/spec/extra_core/array_spec.rb +4 -2
  69. data/spec/extra_core/blank_spec.rb +11 -0
  70. data/spec/extra_core/class_spec.rb +2 -2
  71. data/spec/extra_core/logger_spec.rb +50 -0
  72. data/spec/extra_core/string_transformations_spec.rb +0 -1
  73. data/spec/integration/cookies_spec.rb +1 -2
  74. data/spec/integration/flash_spec.rb +2 -3
  75. data/spec/integration/list_spec.rb +1 -1
  76. data/spec/integration/templates_spec.rb +0 -1
  77. data/spec/integration/url_spec.rb +1 -2
  78. data/spec/integration/user_spec.rb +3 -3
  79. data/spec/models/field_helpers_spec.rb +2 -2
  80. data/spec/models/model_spec.rb +21 -2
  81. data/spec/models/user_spec.rb +69 -0
  82. data/spec/models/validations_spec.rb +69 -78
  83. data/spec/models/validators/email_validator_spec.rb +3 -3
  84. data/spec/models/validators/format_validator_spec.rb +144 -0
  85. data/spec/models/validators/length_validator_spec.rb +82 -0
  86. data/spec/models/validators/phone_number_validator_spec.rb +3 -3
  87. data/spec/page/bindings/template_binding/view_lookup_for_path_spec.rb +149 -0
  88. data/spec/page/bindings/template_binding_spec.rb +0 -151
  89. data/spec/reactive/computation_spec.rb +46 -0
  90. data/spec/reactive/dependency_spec.rb +0 -1
  91. data/spec/reactive/reactive_array_spec.rb +0 -1
  92. data/spec/router/routes_spec.rb +0 -4
  93. data/spec/server/html_parser/view_parser_spec.rb +0 -4
  94. data/spec/server/rack/asset_files_spec.rb +1 -1
  95. data/spec/server/rack/quite_common_logger_spec.rb +55 -0
  96. data/spec/spec_helper.rb +2 -5
  97. data/spec/tasks/dispatcher_spec.rb +16 -5
  98. data/spec/tasks/live_query_spec.rb +0 -1
  99. data/spec/tasks/query_tasks.rb +0 -1
  100. data/spec/tasks/query_tracker_spec.rb +0 -3
  101. data/spec/templates/targets/binding_document/component_node_spec.rb +0 -1
  102. data/spec/utils/generic_counting_pool_spec.rb +0 -1
  103. data/spec/utils/generic_pool_spec.rb +0 -1
  104. data/templates/component/assets/images/.empty_directory +0 -0
  105. data/templates/project/README.md.tt +3 -2
  106. data/templates/project/app/main/assets/images/.empty_directory +0 -0
  107. data/templates/project/config/base/index.html +6 -7
  108. data/volt.gemspec +3 -5
  109. metadata +27 -9
  110. data/lib/volt/extra_core/numeric.rb +0 -9
@@ -44,7 +44,6 @@ if RUBY_PLATFORM != 'opal'
44
44
 
45
45
  @query_tracker = QueryTracker.new(@live_query, data_store)
46
46
  @query_tracker.run
47
-
48
47
  end
49
48
 
50
49
  it 'should add items' do
@@ -113,8 +112,6 @@ if RUBY_PLATFORM != 'opal'
113
112
  ]
114
113
  @query_tracker.run
115
114
  expect(@live_query.items).to eq(@items)
116
-
117
115
  end
118
-
119
116
  end
120
117
  end
@@ -13,7 +13,6 @@ describe Volt::ComponentNode do
13
13
  it 'should find a component from a binding id' do
14
14
  expect(@component.find_by_binding_id(1).to_html).to eq('Inside')
15
15
  expect(@component.find_by_binding_id(0).to_html).to eq('Before Inside After')
16
-
17
16
  end
18
17
 
19
18
  # it "should render if blocks" do
@@ -31,6 +31,5 @@ describe Volt::GenericCountingPool do
31
31
 
32
32
  @count_pool.remove('_items', 'one')
33
33
  expect(@count_pool.instance_variable_get('@pool')).to eq({})
34
-
35
34
  end
36
35
  end
@@ -7,7 +7,6 @@ class PoolTest < Volt::GenericPool
7
7
  end
8
8
 
9
9
  describe Volt::GenericPool do
10
-
11
10
  before do
12
11
  @pool_test = PoolTest.new
13
12
  end
@@ -1,3 +1,4 @@
1
- # Start your docs here.
1
+ # Place your app's docs here.
2
2
 
3
- # See Volt docs at https://github.com/voltrb/volt/blob/master/Readme.md
3
+ ## New to Volt?
4
+ Be sure to read the volt docs at http://docs.voltframework.com
@@ -1,7 +1,7 @@
1
1
  <!DOCTYPE html>
2
2
  <html>
3
- <head>
4
- <meta charset="UTF-8" />
3
+ <head>
4
+ <meta charset="UTF-8" />
5
5
  <% javascript_files.each do |javascript_file| %>
6
6
  <script src="<%= javascript_file %>"></script>
7
7
  <% end %>
@@ -9,9 +9,8 @@
9
9
  <% css_files.each do |css_file| %>
10
10
  <link href="<%= css_file %>" media="all" rel="stylesheet" type="text/css" />
11
11
  <% end %>
12
+ </head>
13
+ <body>
12
14
 
13
- </head>
14
- <body>
15
-
16
- </body>
17
- </html>
15
+ </body>
16
+ </html>
data/volt.gemspec CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ['lib']
21
21
 
22
22
  spec.add_dependency 'thor', '~> 0.19.0'
23
- spec.add_dependency 'pry', '~> 0.9.12.0'
23
+ spec.add_dependency 'pry', '~> 0.10.0'
24
24
  spec.add_dependency 'rack', '~> 1.5.0'
25
25
  spec.add_dependency 'sprockets-sass', '~> 1.0.0'
26
26
  spec.add_dependency 'sass', '~> 3.2.5'
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
28
28
  spec.add_dependency 'rake', '~> 10.0.4'
29
29
  spec.add_dependency 'listen', '~> 2.8.0'
30
30
  spec.add_dependency 'uglifier', '>= 2.4.0'
31
- spec.add_dependency "configurations", "~> 2.0.0.pre"
31
+ spec.add_dependency 'configurations', '~> 2.0.0.pre'
32
32
  spec.add_dependency 'yui-compressor', '>= 0.12.0'
33
33
  spec.add_dependency 'opal', '~> 0.6.0'
34
34
  spec.add_dependency 'opal-jquery', '~> 0.2.0'
@@ -50,7 +50,5 @@ Gem::Specification.new do |spec|
50
50
  spec.add_development_dependency 'yard', '~> 0.8.7.0'
51
51
  spec.add_development_dependency 'sauce', '~> 3.5.3'
52
52
  spec.add_development_dependency 'sauce-connect', '~> 3.5.0'
53
- spec.add_development_dependency 'byebug', '~> 3.5.1'
54
-
55
-
53
+ spec.add_development_dependency 'pry-byebug', '~> 2.0.0'
56
54
  end
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.beta2
4
+ version: 0.8.27.beta3
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-12-20 00:00:00.000000000 Z
11
+ date: 2015-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.9.12.0
33
+ version: 0.10.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.9.12.0
40
+ version: 0.10.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rack
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -403,19 +403,19 @@ dependencies:
403
403
  - !ruby/object:Gem::Version
404
404
  version: 3.5.0
405
405
  - !ruby/object:Gem::Dependency
406
- name: byebug
406
+ name: pry-byebug
407
407
  requirement: !ruby/object:Gem::Requirement
408
408
  requirements:
409
409
  - - "~>"
410
410
  - !ruby/object:Gem::Version
411
- version: 3.5.1
411
+ version: 2.0.0
412
412
  type: :development
413
413
  prerelease: false
414
414
  version_requirements: !ruby/object:Gem::Requirement
415
415
  requirements:
416
416
  - - "~>"
417
417
  - !ruby/object:Gem::Version
418
- version: 3.5.1
418
+ version: 2.0.0
419
419
  description:
420
420
  email:
421
421
  - ryan@agileproductions.com
@@ -430,6 +430,7 @@ files:
430
430
  - ".ruby-version"
431
431
  - ".travis.yml"
432
432
  - CHANGELOG.md
433
+ - CONTRIBUTING.md
433
434
  - Gemfile
434
435
  - Guardfile
435
436
  - LICENSE.txt
@@ -477,7 +478,6 @@ files:
477
478
  - lib/volt/extra_core/inflector/inflections.rb
478
479
  - lib/volt/extra_core/inflector/methods.rb
479
480
  - lib/volt/extra_core/logger.rb
480
- - lib/volt/extra_core/numeric.rb
481
481
  - lib/volt/extra_core/object.rb
482
482
  - lib/volt/extra_core/string.rb
483
483
  - lib/volt/extra_core/stringify_keys.rb
@@ -509,6 +509,7 @@ files:
509
509
  - lib/volt/models/url.rb
510
510
  - lib/volt/models/validations.rb
511
511
  - lib/volt/models/validators/email_validator.rb
512
+ - lib/volt/models/validators/format_validator.rb
512
513
  - lib/volt/models/validators/length_validator.rb
513
514
  - lib/volt/models/validators/numericality_validator.rb
514
515
  - lib/volt/models/validators/phone_number_validator.rb
@@ -523,6 +524,7 @@ files:
523
524
  - lib/volt/page/bindings/if_binding.rb
524
525
  - lib/volt/page/bindings/template_binding.rb
525
526
  - lib/volt/page/bindings/template_binding/grouped_controllers.rb
527
+ - lib/volt/page/bindings/template_binding/view_lookup_for_path.rb
526
528
  - lib/volt/page/channel.rb
527
529
  - lib/volt/page/channel_stub.rb
528
530
  - lib/volt/page/document.rb
@@ -612,8 +614,10 @@ files:
612
614
  - spec/apps/kitchen_sink/config/base/index.html
613
615
  - spec/controllers/reactive_accessors_spec.rb
614
616
  - spec/extra_core/array_spec.rb
617
+ - spec/extra_core/blank_spec.rb
615
618
  - spec/extra_core/class_spec.rb
616
619
  - spec/extra_core/inflector_spec.rb
620
+ - spec/extra_core/logger_spec.rb
617
621
  - spec/extra_core/object_spec.rb
618
622
  - spec/extra_core/string_transformation_test_cases.rb
619
623
  - spec/extra_core/string_transformations_spec.rb
@@ -629,10 +633,14 @@ files:
629
633
  - spec/models/model_spec.rb
630
634
  - spec/models/persistors/params_spec.rb
631
635
  - spec/models/persistors/store_spec.rb
636
+ - spec/models/user_spec.rb
632
637
  - spec/models/validations_spec.rb
633
638
  - spec/models/validators/email_validator_spec.rb
639
+ - spec/models/validators/format_validator_spec.rb
640
+ - spec/models/validators/length_validator_spec.rb
634
641
  - spec/models/validators/phone_number_validator_spec.rb
635
642
  - spec/page/bindings/content_binding_spec.rb
643
+ - spec/page/bindings/template_binding/view_lookup_for_path_spec.rb
636
644
  - spec/page/bindings/template_binding_spec.rb
637
645
  - spec/page/sub_context_spec.rb
638
646
  - spec/reactive/computation_spec.rb
@@ -645,6 +653,7 @@ files:
645
653
  - spec/server/html_parser/view_parser_spec.rb
646
654
  - spec/server/rack/asset_files_spec.rb
647
655
  - spec/server/rack/component_paths_spec.rb
656
+ - spec/server/rack/quite_common_logger_spec.rb
648
657
  - spec/server/rack/rack_requests_spec.rb
649
658
  - spec/spec_helper.rb
650
659
  - spec/store/mongo_spec.rb
@@ -657,6 +666,7 @@ files:
657
666
  - spec/utils/generic_pool_spec.rb
658
667
  - templates/.gitignore
659
668
  - templates/component/assets/css/.empty_directory
669
+ - templates/component/assets/images/.empty_directory
660
670
  - templates/component/assets/js/.empty_directory
661
671
  - templates/component/config/dependencies.rb
662
672
  - templates/component/config/routes.rb
@@ -692,6 +702,7 @@ files:
692
702
  - templates/project/app/.empty_directory
693
703
  - templates/project/app/main/assets/css/.empty_directory
694
704
  - templates/project/app/main/assets/css/app.css.scss
705
+ - templates/project/app/main/assets/images/.empty_directory
695
706
  - templates/project/app/main/assets/js/.empty_directory
696
707
  - templates/project/app/main/config/dependencies.rb
697
708
  - templates/project/app/main/config/routes.rb
@@ -729,7 +740,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
729
740
  version: 1.3.1
730
741
  requirements: []
731
742
  rubyforge_project:
732
- rubygems_version: 2.2.2
743
+ rubygems_version: 2.4.5
733
744
  signing_key:
734
745
  specification_version: 4
735
746
  summary: A ruby web framework where your ruby runs on both server and client (via
@@ -762,8 +773,10 @@ test_files:
762
773
  - spec/apps/kitchen_sink/config/base/index.html
763
774
  - spec/controllers/reactive_accessors_spec.rb
764
775
  - spec/extra_core/array_spec.rb
776
+ - spec/extra_core/blank_spec.rb
765
777
  - spec/extra_core/class_spec.rb
766
778
  - spec/extra_core/inflector_spec.rb
779
+ - spec/extra_core/logger_spec.rb
767
780
  - spec/extra_core/object_spec.rb
768
781
  - spec/extra_core/string_transformation_test_cases.rb
769
782
  - spec/extra_core/string_transformations_spec.rb
@@ -779,10 +792,14 @@ test_files:
779
792
  - spec/models/model_spec.rb
780
793
  - spec/models/persistors/params_spec.rb
781
794
  - spec/models/persistors/store_spec.rb
795
+ - spec/models/user_spec.rb
782
796
  - spec/models/validations_spec.rb
783
797
  - spec/models/validators/email_validator_spec.rb
798
+ - spec/models/validators/format_validator_spec.rb
799
+ - spec/models/validators/length_validator_spec.rb
784
800
  - spec/models/validators/phone_number_validator_spec.rb
785
801
  - spec/page/bindings/content_binding_spec.rb
802
+ - spec/page/bindings/template_binding/view_lookup_for_path_spec.rb
786
803
  - spec/page/bindings/template_binding_spec.rb
787
804
  - spec/page/sub_context_spec.rb
788
805
  - spec/reactive/computation_spec.rb
@@ -795,6 +812,7 @@ test_files:
795
812
  - spec/server/html_parser/view_parser_spec.rb
796
813
  - spec/server/rack/asset_files_spec.rb
797
814
  - spec/server/rack/component_paths_spec.rb
815
+ - spec/server/rack/quite_common_logger_spec.rb
798
816
  - spec/server/rack/rack_requests_spec.rb
799
817
  - spec/spec_helper.rb
800
818
  - spec/store/mongo_spec.rb
@@ -1,9 +0,0 @@
1
- class Numeric
2
- def in_units_of(unit)
3
- if self == 1
4
- return "1 #{unit}"
5
- else
6
- return "#{self} #{unit}s"
7
- end
8
- end
9
- end