pakyow-presenter 0.9.0 → 0.9.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b03aed00a4341ef92f5c05f9e2154a46259c8bc4
|
4
|
+
data.tar.gz: d22155fe2adad963042ba51b15d10ab98572fe20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e5e1f65609f24045e2ef75bd45f7bb50e877d1f606a2b54ba17b7ad3096b0c90d3624b7beecde1fd41abff86824992e8c021c089b48c6cb333481c91310143e
|
7
|
+
data.tar.gz: 28c195177d878332fe18f91e46f3786f70bd32459a89d112fcd8d326c76579c27d4356987bbdeec3a17645de389341065df972a1942cddd33377f8ec978eb365
|
data/pakyow-presenter/CHANGES
CHANGED
@@ -1,4 +1,10 @@
|
|
1
|
-
= 0.9.
|
1
|
+
= 0.9.1 / 2014-12-06
|
2
|
+
|
3
|
+
* Fixes bug where name attribute wasn't set on form fields when binding without a value
|
4
|
+
* Fixes bug causing all partials (not just available ones) to be defined as view parts
|
5
|
+
* Fixes bug causing form action binding to break
|
6
|
+
|
7
|
+
= 0.9.0 / 2014-11-09
|
2
8
|
|
3
9
|
* Introduces StringDoc, replacing Nokogiri for view rendering with a performant alternative
|
4
10
|
* Adds the ability to set an empty first option in bindings
|
@@ -73,7 +73,7 @@ module Pakyow
|
|
73
73
|
|
74
74
|
if id = bindable[:id]
|
75
75
|
return_data[:view] = lambda { |view|
|
76
|
-
view.prepend(View.
|
76
|
+
view.prepend(View.new('<input type="hidden" name="_method" value="patch">'))
|
77
77
|
}
|
78
78
|
|
79
79
|
action = routes.path(:update, :"#{route_group}_id" => id)
|
@@ -88,7 +88,6 @@ module Pakyow
|
|
88
88
|
@doc.prepend(view.doc)
|
89
89
|
end
|
90
90
|
|
91
|
-
#TODO allow strings?
|
92
91
|
def after(view)
|
93
92
|
@doc.after(view.doc)
|
94
93
|
end
|
@@ -299,10 +298,14 @@ module Pakyow
|
|
299
298
|
scope_info[:props].each do |prop_info|
|
300
299
|
catch(:unbound) do
|
301
300
|
prop = prop_info[:prop]
|
301
|
+
doc = prop_info[:doc]
|
302
|
+
|
303
|
+
if DocHelpers.form_field?(doc.tagname)
|
304
|
+
set_form_field_name(doc, scope, prop)
|
305
|
+
end
|
302
306
|
|
303
307
|
if data_has_prop?(data, prop) || Binder.instance.has_scoped_prop?(scope, prop, bindings)
|
304
|
-
value = Binder.instance.value_for_scoped_prop(scope, prop, data, bindings, ctx)
|
305
|
-
doc = prop_info[:doc]
|
308
|
+
value = Binder.instance.value_for_scoped_prop(scope, prop, data, bindings, ctx)
|
306
309
|
|
307
310
|
if DocHelpers.form_field?(doc.tagname)
|
308
311
|
bind_to_form_field(doc, scope, prop, value, data, ctx)
|
@@ -348,8 +351,6 @@ module Pakyow
|
|
348
351
|
end
|
349
352
|
|
350
353
|
def bind_to_form_field(doc, scope, prop, value, bindable, ctx)
|
351
|
-
set_form_field_name(doc, scope, prop)
|
352
|
-
|
353
354
|
# special binding for checkboxes and radio buttons
|
354
355
|
if doc.tagname == 'input' && (doc.get_attribute(:type) == 'checkbox' || doc.get_attribute(:type) == 'radio')
|
355
356
|
bind_to_checked_field(doc, value)
|
@@ -112,8 +112,12 @@ module Pakyow
|
|
112
112
|
def parts
|
113
113
|
parts = ViewCollection.new
|
114
114
|
parts << @template
|
115
|
-
@page.each_container
|
116
|
-
|
115
|
+
@page.each_container { |name, container| parts << container }
|
116
|
+
|
117
|
+
# only include available partials as parts
|
118
|
+
available_partials = parts.inject([]) { |sum, part| sum.concat(part.doc.partials.keys) }
|
119
|
+
partials.select { |name, partial| available_partials.include?(name) }.each_pair { |name, partial| parts << partial }
|
120
|
+
|
117
121
|
return parts
|
118
122
|
end
|
119
123
|
|
@@ -113,7 +113,7 @@ module Pakyow
|
|
113
113
|
|
114
114
|
if File.exists?(templates_path)
|
115
115
|
Dir.entries(templates_path).each do |file|
|
116
|
-
next if file
|
116
|
+
next if file =~ /^\./
|
117
117
|
|
118
118
|
template = Template.load(File.join(templates_path, file))
|
119
119
|
@templates[template.name] = template
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pakyow-presenter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bryan Powell
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-12-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: pakyow-support
|
@@ -17,28 +17,28 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - '='
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 0.9.
|
20
|
+
version: 0.9.1
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
25
|
- - '='
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: 0.9.
|
27
|
+
version: 0.9.1
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: pakyow-core
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - '='
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 0.9.
|
34
|
+
version: 0.9.1
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - '='
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 0.9.
|
41
|
+
version: 0.9.1
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: nokogiri
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|