volt 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Readme.md +2 -2
- data/VERSION +1 -1
- data/lib/volt/controllers/model_controller.rb +4 -0
- data/lib/volt/extra_core/array.rb +0 -9
- data/lib/volt/extra_core/extra_core.rb +0 -1
- data/lib/volt/models/model.rb +0 -5
- data/lib/volt/models/persistors/local_store.rb +1 -1
- data/lib/volt/page/targets/helpers/comment_searchers.rb +3 -3
- data/spec/apps/kitchen_sink/app/main/views/main/bindings.html +25 -0
- data/spec/integration/bindings_spec.rb +37 -0
- metadata +1 -2
- data/lib/volt/extra_core/hash.rb +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 151e9fd7b7262c2b6ae7dc51fe4974ffb1c65628
|
4
|
+
data.tar.gz: d43d340ea71cb98295ec0d3c5682676254b23ad5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffbae1aa4a8653a2a9a7b36ef302aa32cbf81fe1f4aeb1d8f86e471d22bb27083cf1c018d3d5e6f89aa520f72e1f89a4b0ae21391701d6f1916726b909cbc3e8
|
7
|
+
data.tar.gz: b6eefeb6b8fc07eabcc9f65ad6c0d28d577ff54409c8a16afdfdc13ef48b0f2b4296cd4c3c8c1734abe875f366c543fdcd1f1491454fdba45efd6020684e72cb
|
data/Readme.md
CHANGED
@@ -71,8 +71,8 @@ You can access the Volt console with:
|
|
71
71
|
|
72
72
|
1. [Getting Help](#getting-help)
|
73
73
|
2. [Rendering](#rendering)
|
74
|
-
1. [States and Computations](#
|
75
|
-
1. [Computations](#
|
74
|
+
1. [States and Computations](#state-and-computations)
|
75
|
+
1. [Computations](#computations)
|
76
76
|
3. [Views](#views)
|
77
77
|
1. [Bindings](#bindings)
|
78
78
|
1. [Content Binding](#content-binding)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.2
|
data/lib/volt/models/model.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
module CommentSearchers
|
2
2
|
if RUBY_PLATFORM == 'opal'
|
3
|
-
|
3
|
+
NO_XPATH = `!!window._phantom || !document.evaluate`
|
4
4
|
else
|
5
|
-
|
5
|
+
NO_XPATH = false
|
6
6
|
end
|
7
7
|
|
8
8
|
def find_by_comment(text, in_node=`document`)
|
9
|
-
if
|
9
|
+
if NO_XPATH
|
10
10
|
return find_by_comment_without_xml(text, in_node)
|
11
11
|
else
|
12
12
|
node = nil
|
@@ -25,6 +25,12 @@
|
|
25
25
|
<td><input type="text" id="routesName2" value="{params._route_test}"></td>
|
26
26
|
<td id="routesName3">{params._route_test}</td>
|
27
27
|
</tr>
|
28
|
+
<tr>
|
29
|
+
<td>Local Store</td>
|
30
|
+
<td><input type="text" id="localstoreName1" value="{local_store._name}"></td>
|
31
|
+
<td><input type="text" id="localstoreName2" value="{local_store._name}"></td>
|
32
|
+
<td id="localstoreName3">{local_store._name}</td>
|
33
|
+
</tr>
|
28
34
|
</table>
|
29
35
|
|
30
36
|
<h2>Checkbox</h2>
|
@@ -61,6 +67,25 @@
|
|
61
67
|
</tr>
|
62
68
|
</table>
|
63
69
|
|
70
|
+
<h2>Select</h2>
|
71
|
+
<table class="table">
|
72
|
+
<tr>
|
73
|
+
<td>Page</td>
|
74
|
+
<td>
|
75
|
+
<select id="pageSelect1" value="{page._select}">
|
76
|
+
<option value="one">One</option>
|
77
|
+
<option value="two">Two</option>
|
78
|
+
<option value="three">Three</option>
|
79
|
+
</select>
|
80
|
+
</td>
|
81
|
+
<td>
|
82
|
+
<input type="text" id="pageSelect2" value="{page._select}" />
|
83
|
+
</td>
|
84
|
+
<td id="pageSelect3">{page._select}</td>
|
85
|
+
</tr>
|
86
|
+
</table>
|
87
|
+
|
88
|
+
|
64
89
|
<h2>Textarea</h2>
|
65
90
|
<table class="table">
|
66
91
|
<tr>
|
@@ -104,6 +104,43 @@ if ENV['BROWSER']
|
|
104
104
|
expect(find('#textareaName3')).to have_content('Update everywhere')
|
105
105
|
end
|
106
106
|
|
107
|
+
it 'should update local_store bindings' do
|
108
|
+
visit '/'
|
109
|
+
|
110
|
+
click_link 'Bindings'
|
111
|
+
|
112
|
+
# Fill in one field and see if it updates the rest
|
113
|
+
fill_in('localstoreName1', :with => 'Page bindings')
|
114
|
+
expect(find('#localstoreName1').value).to eq('Page bindings')
|
115
|
+
expect(find('#localstoreName2').value).to eq('Page bindings')
|
116
|
+
expect(find('#localstoreName3')).to have_content('Page bindings')
|
117
|
+
|
118
|
+
fill_in('localstoreName2', :with => 'Update everywhere')
|
119
|
+
expect(find('#localstoreName1').value).to eq('Update everywhere')
|
120
|
+
expect(find('#localstoreName2').value).to eq('Update everywhere')
|
121
|
+
expect(find('#localstoreName3')).to have_content('Update everywhere')
|
122
|
+
end
|
123
|
+
|
124
|
+
# it 'should update local_store bindings' do
|
125
|
+
# visit '/'
|
126
|
+
#
|
127
|
+
# click_link 'Bindings'
|
128
|
+
#
|
129
|
+
# within '#pageSelect1' do
|
130
|
+
# find("option[value='two']").click
|
131
|
+
# end
|
132
|
+
#
|
133
|
+
# # Fill in one field and see if it updates the rest
|
134
|
+
# expect(find('#pageSelect1').value).to eq('two')
|
135
|
+
# expect(find('#pageSelect2').value).to eq('two')
|
136
|
+
# expect(find('#pageSelect3')).to have_content('two')
|
137
|
+
#
|
138
|
+
# # Fill in one field and see if it updates the rest
|
139
|
+
# fill_in('pageSelect2', :with => 'three')
|
140
|
+
# expect(find('#pageSelect1').value).to eq('three')
|
141
|
+
# expect(find('#pageSelect2').value).to eq('three')
|
142
|
+
# expect(find('#pageSelect3')).to have_content('three')
|
143
|
+
# end
|
107
144
|
end
|
108
145
|
|
109
146
|
describe "check boxes" do
|
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.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Stout
|
@@ -382,7 +382,6 @@ files:
|
|
382
382
|
- lib/volt/extra_core/array.rb
|
383
383
|
- lib/volt/extra_core/blank.rb
|
384
384
|
- lib/volt/extra_core/extra_core.rb
|
385
|
-
- lib/volt/extra_core/hash.rb
|
386
385
|
- lib/volt/extra_core/inflections.rb
|
387
386
|
- lib/volt/extra_core/inflector.rb
|
388
387
|
- lib/volt/extra_core/inflector/inflections.rb
|