volt 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6c3db947b2a626b68ef6ed4d2a12b3724ee7d10c
4
- data.tar.gz: cd9a7fc5cd979912a02ef3298c4d901d53166e4d
3
+ metadata.gz: c68b3acc9f83d53f4bc696e40646086e44035c1c
4
+ data.tar.gz: 6b6ae0d67023515a38e737bced141fa056bc0eb3
5
5
  SHA512:
6
- metadata.gz: a2fa2133cf4ee62729a34d8fff30234cb81477b3817289a70c5d6d229fc39866b9e8c8b250b31e72cf476a6d6e6cc26008e7bed3f53c03a8a56fca6ac7ce92ff
7
- data.tar.gz: a8f19f6779cfd3a34df76537c2f77df4760735ffea222d8c5b33ce297cd732adfd029ef7013860e70015c646acfbd284dc44cf6e1776ecad66394b1d35b9592e
6
+ metadata.gz: 1e78bd6f60875a7295d9d826430eca58d7d0490cecedecab80b5b58b914971b6c94958d0a8f77854bb542128f55fa3255e94c77f78305f0f49f812cbc62aee45
7
+ data.tar.gz: 32c5dbacd53d2e20ed40787434b7674fb840e966944d249d0837a2858129afea9f18977cb74ed20e5d8ed104f65a37a381f07fc100eba99467776b83b9665465
data/Readme.md CHANGED
@@ -34,4 +34,11 @@ Everyone wishes that we could predict the scope and required features for each p
34
34
  - subtemplate
35
35
  - template
36
36
  - controller
37
- - component
37
+ - component
38
+
39
+ # Components
40
+
41
+ Apps are made up of Components. Each folder under app/ is a component. When you visit a route, it loads all of the files in the component on the front end, so new pages within the component can be rendered on the front end. If a url is visited that routes to a different component, the request will be loaded as a normal page load and all of that components files will be loaded. You can think of components as the "reload boundry" between sections of your app.
42
+
43
+ # Controls
44
+
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
@@ -2,7 +2,6 @@
2
2
  module ObjectTracking
3
3
  def __setup_tracking(key, value)
4
4
  if value.reactive?
5
- puts "Value: #{value.inspect} - #{key}"
6
5
  # TODO: We should build this in so it fires just for the current index.
7
6
  # Currently this is a big performance hit.
8
7
  chain_listener = event_chain.add_object(value.reactive_manager) do |event, *args|
@@ -219,7 +219,7 @@ class Template
219
219
  full_template_path = "#{@template_parser.template_path}/#{section_name}/#{template_name}"
220
220
  @binding_number += 1
221
221
 
222
- attribute_template = Template.new(@template_parser, section_name, Nokogiri::HTML::DocumentFragment.parse(content))
222
+ attribute_template = Template.new(@template_parser, "#{section_name}/#{template_name}", Nokogiri::HTML::DocumentFragment.parse(content))
223
223
  @template_parser.add_template("#{section_name}/#{template_name}", attribute_template)
224
224
  attribute_template.start_walk
225
225
  attribute_template.pull_closed_block_scopes
@@ -433,6 +433,7 @@ class TemplateParser
433
433
  end
434
434
 
435
435
  def add_template(name, template)
436
+ raise "Already defined at #{@template_path + '/' + name}" if @templates[@template_path + '/' + name]
436
437
  @templates[@template_path + '/' + name] = template
437
438
  end
438
439
 
@@ -12,7 +12,6 @@ class Channel
12
12
  this.socket = new SockJS('http://localhost:3000/channel');//, {reconnect: true});
13
13
 
14
14
  this.socket.onopen = function() {
15
- console.log('open');
16
15
  self['$trigger!']("open");
17
16
  };
18
17
 
@@ -70,7 +70,6 @@ class Page
70
70
  end
71
71
 
72
72
  def link_clicked(url)
73
- puts "Link Clicked to: #{url}"
74
73
  # Skip when href == ''
75
74
  return if url.blank?
76
75
 
@@ -2,6 +2,7 @@ class ReactiveTemplate
2
2
  include Events
3
3
 
4
4
  def initialize(context, template_path)
5
+ # puts "New Reactive Template: #{context.inspect} - #{template_path.inspect}"
5
6
  @template_path = template_path
6
7
  @target = AttributeTarget.new
7
8
  @template = TemplateRenderer.new(@target, context, "main", template_path)
@@ -25,6 +25,10 @@ class TemplateRenderer < BaseBinding
25
25
  @sub_bindings << binding.call(target, context, id)
26
26
  end
27
27
  end
28
+
29
+ if @context.respond_to?(:dom_ready)
30
+ @context.dom_ready
31
+ end
28
32
 
29
33
  end
30
34
 
@@ -41,7 +45,14 @@ class TemplateRenderer < BaseBinding
41
45
  end
42
46
 
43
47
  @sub_bindings = []
48
+
44
49
  super
50
+
51
+ # Let the controller know we removed
52
+ if @context.respond_to?(:dom_removed)
53
+ @context.dom_removed
54
+ end
55
+
45
56
  end
46
57
 
47
58
  def remove_anchors
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: volt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Stout