zafu 0.7.4 → 0.7.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +10 -0
- data/lib/zafu/all.rb +2 -0
- data/lib/zafu/controller_methods.rb +0 -2
- data/lib/zafu/info.rb +1 -1
- data/lib/zafu/markup.rb +12 -2
- data/lib/zafu/node_context.rb +11 -8
- data/lib/zafu/parser.rb +2 -0
- data/lib/zafu/parsing_rules.rb +12 -10
- data/lib/zafu/process/ajax.rb +6 -4
- data/lib/zafu/process/conditional.rb +2 -1
- data/lib/zafu/process/ruby_less_processing.rb +17 -12
- data/lib/zafu/security.rb +15 -0
- data/test/node_context_test.rb +2 -2
- data/test/ruby_less_test.rb +1 -0
- data/test/zafu/meta.yml +5 -0
- data/test/zafu/security.yml +4 -0
- data/zafu.gemspec +5 -4
- metadata +16 -4
data/History.txt
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
== 0.7.5 2011-01-15
|
2
|
+
|
3
|
+
* Enhancements
|
4
|
+
* Fixed double rendering of zafu block (store) and @var usage.
|
5
|
+
* Fixed security hole where include could be used to create erb.
|
6
|
+
* Fixed a bug where class conditional in [if] would not render correctly.
|
7
|
+
* Better handling of nested dom_id when used with ajax (draggable).
|
8
|
+
* Adapted RubyLess resolution to new Proc calls (RubyLess 0.8.1).
|
9
|
+
* Removed some Zena specific code.
|
10
|
+
|
1
11
|
== 0.7.4 2010-09-25
|
2
12
|
|
3
13
|
* Minor enhancement
|
data/lib/zafu/all.rb
CHANGED
@@ -5,6 +5,7 @@ require 'zafu/process/ruby_less_processing'
|
|
5
5
|
require 'zafu/process/context'
|
6
6
|
require 'zafu/process/conditional'
|
7
7
|
require 'zafu/process/forms'
|
8
|
+
require 'zafu/security'
|
8
9
|
|
9
10
|
module Zafu
|
10
11
|
All = [
|
@@ -15,5 +16,6 @@ module Zafu
|
|
15
16
|
Zafu::Process::RubyLessProcessing,
|
16
17
|
Zafu::Process::Ajax,
|
17
18
|
Zafu::Process::Forms,
|
19
|
+
Zafu::Security,
|
18
20
|
]
|
19
21
|
end
|
@@ -14,8 +14,6 @@ module Zafu
|
|
14
14
|
t.previously_last_modified = nil
|
15
15
|
# end
|
16
16
|
render_for_text @template.render(:file => template_path, :locals => locals, :layout => layout), status
|
17
|
-
rescue => err
|
18
|
-
puts err.backtrace.join("\n")
|
19
17
|
end
|
20
18
|
alias_method_chain :render_for_file, :rebuild
|
21
19
|
end
|
data/lib/zafu/info.rb
CHANGED
data/lib/zafu/markup.rb
CHANGED
@@ -100,9 +100,19 @@ module Zafu
|
|
100
100
|
if value =~ /^(.*)\#\{(.*)\}(.*)$/
|
101
101
|
@params.delete(key)
|
102
102
|
if $1 == '' && $3 == ''
|
103
|
-
|
103
|
+
code = RubyLess.translate(helper, $2)
|
104
|
+
if code.literal
|
105
|
+
append_dyn_param(key, helper.form_quote(code.literal.to_s))
|
106
|
+
else
|
107
|
+
append_dyn_param(key, "<%= #{code} %>")
|
108
|
+
end
|
104
109
|
else
|
105
|
-
|
110
|
+
code = RubyLess.translate_string(helper, value)
|
111
|
+
if code.literal
|
112
|
+
append_dyn_param(key, helper.form_quote(code.literal.to_s))
|
113
|
+
else
|
114
|
+
append_dyn_param(key, "<%= #{code} %>")
|
115
|
+
end
|
106
116
|
end
|
107
117
|
end
|
108
118
|
end
|
data/lib/zafu/node_context.rb
CHANGED
@@ -22,7 +22,7 @@ module Zafu
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def move_to(name, klass, opts={})
|
25
|
-
|
25
|
+
self.class.new(name, klass, self, opts)
|
26
26
|
end
|
27
27
|
|
28
28
|
# Since the idiom to write the node context name is the main purpose of this class, it
|
@@ -38,7 +38,7 @@ module Zafu
|
|
38
38
|
# Return true if the NodeContext represents an element of the given type. We use 'will_be' because
|
39
39
|
# it is equivalent to 'is_a', but for future objects (during rendering).
|
40
40
|
def will_be?(type)
|
41
|
-
single_class
|
41
|
+
single_class <= type
|
42
42
|
end
|
43
43
|
|
44
44
|
# Return a new node context that corresponds to the current object when rendered alone (in an ajax response or
|
@@ -48,7 +48,7 @@ module Zafu
|
|
48
48
|
# ivar name (see #master_class).
|
49
49
|
def as_main(after_class = nil)
|
50
50
|
klass = after_class ? master_class(after_class) : single_class
|
51
|
-
|
51
|
+
self.class.new("@#{klass.to_s.underscore}", single_class)
|
52
52
|
end
|
53
53
|
|
54
54
|
# Find the class just afer 'after_class' in the class hierarchy.
|
@@ -65,6 +65,7 @@ module Zafu
|
|
65
65
|
|
66
66
|
# Generate a unique DOM id for this element based on dom_scopes defined in parent contexts.
|
67
67
|
def dom_id(opts = {})
|
68
|
+
dom_prefix = opts[:dom_prefix] || self.dom_prefix
|
68
69
|
options = {:list => true, :erb => true}.merge(opts)
|
69
70
|
|
70
71
|
if options[:erb]
|
@@ -129,14 +130,16 @@ module Zafu
|
|
129
130
|
class_name.to_s.underscore
|
130
131
|
end
|
131
132
|
|
132
|
-
# Return the class name or the superclass name if the current class is an anonymous class.
|
133
|
-
# FIXME: just use klass.to_s (so that we can do clever things with 'to_s')
|
133
|
+
# Return the 'real' class name or the superclass name if the current class is an anonymous class.
|
134
134
|
def class_name
|
135
|
+
klass = single_class
|
136
|
+
while klass.name == ''
|
137
|
+
klass = klass.superclass
|
138
|
+
end
|
135
139
|
if list_context?
|
136
|
-
klass
|
137
|
-
"[#{(klass.name.blank? ? klass.superclass : klass).name}]"
|
140
|
+
"[#{klass}]"
|
138
141
|
else
|
139
|
-
|
142
|
+
klass.name
|
140
143
|
end
|
141
144
|
end
|
142
145
|
|
data/lib/zafu/parser.rb
CHANGED
@@ -121,6 +121,7 @@ module Zafu
|
|
121
121
|
:@out_post => @out_post,
|
122
122
|
:@params => @params.dup,
|
123
123
|
:@method => @method,
|
124
|
+
:@var => @var,
|
124
125
|
}
|
125
126
|
end
|
126
127
|
|
@@ -237,6 +238,7 @@ module Zafu
|
|
237
238
|
else
|
238
239
|
@context = context
|
239
240
|
end
|
241
|
+
# FIXME: replace with array and join (faster)
|
240
242
|
@result = ""
|
241
243
|
@out_post = ""
|
242
244
|
|
data/lib/zafu/parsing_rules.rb
CHANGED
@@ -92,7 +92,7 @@ module Zafu
|
|
92
92
|
end
|
93
93
|
|
94
94
|
def remove_erb(text)
|
95
|
-
text.gsub('<%', '<%').gsub('%>', '%>')
|
95
|
+
text.gsub('<%', '<%').gsub('%>', '%>').gsub(/<\Z/, '<')
|
96
96
|
end
|
97
97
|
|
98
98
|
def unescape_ruby
|
@@ -186,17 +186,18 @@ module Zafu
|
|
186
186
|
|
187
187
|
def scan_tag(opts={})
|
188
188
|
#puts "TAG(#{@method}): [#{@text}]"
|
189
|
-
if @text =~ /\A<r:([\w_]
|
189
|
+
if @text =~ /\A<r:([\w_]+\??)([^>]*?)(\/?)>/
|
190
190
|
#puts "RTAG:#{$~.to_a.inspect}" # ztag
|
191
191
|
eat $&
|
192
192
|
opts.merge!(:method=>$1, :params=>$2)
|
193
193
|
opts.merge!(:text=>'') if $3 != ''
|
194
194
|
make(:void, opts)
|
195
|
-
elsif @text =~ /\A<(\w+)([^>]*?)do\s*=('([^>]*?[^\\]|)'|"([^>]*?[^\\]|)")([^>]*?)(\/?)>/
|
196
|
-
|
195
|
+
#elsif @text =~ /\A<(\w+)([^>]*?)do\s*=('([^>]*?[^\\]|)'|"([^>]*?[^\\]|)")([^>]*?)(\/?)>/
|
196
|
+
elsif @text =~ /\A<(\w+)([^>]*?)do\s*=('|")([^\3]*?[^\\])\3([^>]*?)(\/?)>/
|
197
|
+
#puts "DO:#{$~.to_a.inspect}" # do tag
|
197
198
|
eat $&
|
198
|
-
opts.merge!(:method=>
|
199
|
-
opts.merge!(:text=>'') if $
|
199
|
+
opts.merge!(:method=> $4, :html_tag=>$1, :html_tag_params=>$2, :params=>$5)
|
200
|
+
opts.merge!(:text=>'') if $6 != ''
|
200
201
|
make(:void, opts)
|
201
202
|
elsif @options[:form] && @text =~ /\A<(input|select|textarea|form)([^>]*?)(\/?)>/
|
202
203
|
eat $&
|
@@ -219,7 +220,7 @@ module Zafu
|
|
219
220
|
opts.merge!(:method=>'void', :html_tag=>$1, :params=>{:id => $3[1..-2]}, :html_tag_params=>"#{$2}id=#{$3}#{$4}")
|
220
221
|
opts.merge!(:text=>'') if $5 != ''
|
221
222
|
make(:void, opts)
|
222
|
-
elsif @end_tag && @text =~ /\A<#{@end_tag}([^>]*?)(\/?)>/
|
223
|
+
elsif @end_tag && @text =~ /\A<#{@end_tag.gsub('?', '\\?')}([^>]*?)(\/?)>/
|
223
224
|
#puts "SAME:#{$~.to_a.inspect}" # simple html tag same as end_tag
|
224
225
|
flush $&
|
225
226
|
@end_tag_count += 1 unless $2 == '/'
|
@@ -242,10 +243,11 @@ module Zafu
|
|
242
243
|
|
243
244
|
def scan_asset
|
244
245
|
# puts "ASSET(#{object_id}) [#{@text}]"
|
245
|
-
if @text =~ /\A<(\w
|
246
|
+
if @text =~ /\A<(\w+)([^>]*?)(\/?)>/
|
246
247
|
eat $&
|
247
248
|
@method = 'rename_asset'
|
248
|
-
@markup.tag =
|
249
|
+
@markup.tag = $1
|
250
|
+
@end_tag = $1
|
249
251
|
closed = ($3 != '')
|
250
252
|
@params = Markup.parse_params($2)
|
251
253
|
if closed
|
@@ -263,7 +265,7 @@ module Zafu
|
|
263
265
|
end
|
264
266
|
|
265
267
|
def scan_inside_asset
|
266
|
-
if @text =~ /\A(.*?)<\/#{@end_tag}>/m
|
268
|
+
if @text =~ /\A(.*?)<\/#{@end_tag.gsub('?', '\\?')}>/m
|
267
269
|
eat $&
|
268
270
|
store $1
|
269
271
|
leave(:asset)
|
data/lib/zafu/process/ajax.rb
CHANGED
@@ -208,14 +208,15 @@ module Zafu
|
|
208
208
|
out wrap("#{expand_with(:onclick=>"[\"#{node.dom_prefix}_add\", \"#{node.dom_prefix}_form\"].each(Element.toggle);#{focus}return false;")}")
|
209
209
|
|
210
210
|
# New object to render form.
|
211
|
+
|
211
212
|
# FIXME: use 'klass' param in r_add or r_form instead of current list content.
|
212
|
-
new_node = node.move_to("#{var}_new", [node.klass].flatten.first)
|
213
|
+
new_node = node.move_to("#{var}_new", [node.klass].flatten.first, :new_record => true)
|
213
214
|
|
214
215
|
if new_node.will_be?(Node)
|
215
216
|
# FIXME: BUG if we set <r:form klass='Post'/> the user cannot select class with menu...
|
216
217
|
|
217
218
|
# FIXME: inspect '@context[:form]' to see if it contains v_klass ?
|
218
|
-
out "<% if #{new_node} = secure(Node) { Node.
|
219
|
+
out "<% if #{new_node} = secure(Node) { Node.new_node('class' => '#{new_node.klass}') } -%>"
|
219
220
|
else
|
220
221
|
out "<% if #{new_node} = #{new_node.class_name}.new -%>"
|
221
222
|
end
|
@@ -266,12 +267,13 @@ module Zafu
|
|
266
267
|
# Block visibility of descendance with 'do_list'.
|
267
268
|
def public_descendants
|
268
269
|
all = super
|
269
|
-
if ['context', 'each', 'block'].include?(
|
270
|
+
if ['context', 'each', 'block'].include?(method)
|
270
271
|
# do not propagate 'form',etc up
|
271
272
|
all.reject do |k,v|
|
272
273
|
['form','unlink'].include?(k)
|
273
274
|
end
|
274
|
-
elsif ['if', 'case'].include?(
|
275
|
+
elsif ['if', 'case'].include?(method) || (method =~ /^[A-Z]/)
|
276
|
+
# conditional
|
275
277
|
all.reject do |k,v|
|
276
278
|
['else', 'elsif', 'when'].include?(k)
|
277
279
|
end
|
@@ -63,7 +63,8 @@ module Zafu
|
|
63
63
|
res << wrap(expand_with)
|
64
64
|
end
|
65
65
|
|
66
|
-
|
66
|
+
only = method == 'case' ? %r{^[A-Z]|else|elsif|when} : %w{else elsif when}
|
67
|
+
res << expand_with(:in_if => true, :only => only, :markup => alt_markup)
|
67
68
|
res << "<% end -%>"
|
68
69
|
res
|
69
70
|
end
|
@@ -28,8 +28,8 @@ module Zafu
|
|
28
28
|
# Resolve unknown methods by using RubyLess in the current compilation context (the
|
29
29
|
# translate method in RubyLess will call 'safe_method_type' in this module).
|
30
30
|
def rubyless_eval(params = @params)
|
31
|
-
if @method =~ /^[A-Z]\w
|
32
|
-
return rubyless_class_scope(
|
31
|
+
if @method =~ /^([A-Z]\w+?)\?$/
|
32
|
+
return rubyless_class_scope($1)
|
33
33
|
end
|
34
34
|
|
35
35
|
rubyless_render(@method, params)
|
@@ -78,7 +78,7 @@ module Zafu
|
|
78
78
|
def set_markup_attr(markup, key, value)
|
79
79
|
value = value.kind_of?(RubyLess::TypedString) ? value : RubyLess.translate_string(self, value)
|
80
80
|
if value.literal
|
81
|
-
markup.set_param(key, value.literal)
|
81
|
+
markup.set_param(key, form_quote(value.literal))
|
82
82
|
else
|
83
83
|
markup.set_dyn_param(key, "<%= #{value} %>")
|
84
84
|
end
|
@@ -87,7 +87,7 @@ module Zafu
|
|
87
87
|
def append_markup_attr(markup, key, value)
|
88
88
|
value = RubyLess.translate_string(self, value)
|
89
89
|
if value.literal
|
90
|
-
markup.append_param(key, value.literal)
|
90
|
+
markup.append_param(key, form_quote(value.literal))
|
91
91
|
else
|
92
92
|
markup.append_dyn_param(key, "<%= #{value} %>")
|
93
93
|
end
|
@@ -132,7 +132,6 @@ module Zafu
|
|
132
132
|
# 6. append block as argument (restart 1-5 with xxx(block_string))
|
133
133
|
def get_method_type(signature, added_options = false)
|
134
134
|
node = self.node
|
135
|
-
raise "#{node.klass.class}" unless node.klass.kind_of?(Array) || node.klass.kind_of?(Class)
|
136
135
|
|
137
136
|
if type = node_context_from_signature(signature)
|
138
137
|
# Resolve self, @page, @node
|
@@ -149,11 +148,15 @@ module Zafu
|
|
149
148
|
elsif node && !node.list_context? && type = safe_method_from(node.klass, signature, node)
|
150
149
|
# not a list_contex
|
151
150
|
# Resolve node context methods: xxx.foo, xxx.bar
|
152
|
-
type = type[:class].call(self, signature) if type[:class].kind_of?(Proc)
|
153
|
-
type.merge(:
|
151
|
+
type = type[:class].call(self, node.klass, signature) if type[:class].kind_of?(Proc)
|
152
|
+
type.merge(:receiver => RubyLess::TypedString.new(node.name, :class => node.klass))
|
153
|
+
elsif node && node.list_context? && type = safe_method_from(Array, signature, node)
|
154
|
+
# FIXME: why do we need this here ? Remove with related code in zafu_safe_definitions ?
|
155
|
+
type = type[:class].call(self, node.klass, signature) if type[:class].kind_of?(Proc)
|
156
|
+
type.merge(:receiver => RubyLess::TypedString.new(node.name, :class => Array, :elem => node.klass.first))
|
154
157
|
elsif node && node.list_context? && type = safe_method_from(node.klass.first, signature, node)
|
155
|
-
type = type[:class].call(self, signature) if type[:class].kind_of?(Proc)
|
156
|
-
type.merge(:
|
158
|
+
type = type[:class].call(self, node.klass, signature) if type[:class].kind_of?(Proc)
|
159
|
+
type.merge(:receiver => RubyLess::TypedString.new("#{node.name}.first", :class => node.klass.first))
|
157
160
|
elsif @rendering_block_owner && @blocks.first.kind_of?(String) && !added_options
|
158
161
|
# Insert the block content into the method: <r:trans>blah</r:trans> becomes trans("blah")
|
159
162
|
signature_with_block = signature.dup
|
@@ -166,8 +169,8 @@ module Zafu
|
|
166
169
|
elsif node && !added_options
|
167
170
|
# Try prepending current node before arguments: link("foo") becomes link(var1, "foo")
|
168
171
|
signature_with_node = signature.dup
|
169
|
-
signature_with_node.insert(1, node.klass
|
170
|
-
if type = get_method_type(signature_with_node,
|
172
|
+
signature_with_node.insert(1, node.real_class) # node.klass ?
|
173
|
+
if type = get_method_type(signature_with_node, true)
|
171
174
|
type.merge(:prepend_args => RubyLess::TypedString.new(node.name, :class => node.klass))
|
172
175
|
else
|
173
176
|
nil
|
@@ -210,7 +213,7 @@ module Zafu
|
|
210
213
|
def rubyless_expand(res)
|
211
214
|
if res.klass == String && !@blocks.detect {|b| !b.kind_of?(String)}
|
212
215
|
if lit = res.literal
|
213
|
-
out lit
|
216
|
+
out erb_escape(lit)
|
214
217
|
else
|
215
218
|
out "<%= #{res} %>"
|
216
219
|
end
|
@@ -224,6 +227,8 @@ module Zafu
|
|
224
227
|
end
|
225
228
|
|
226
229
|
def rubyless_class_scope(class_name)
|
230
|
+
return parser_error("Cannot scope class in list (use each before filtering).") if node.list_context?
|
231
|
+
|
227
232
|
# capital letter ==> class conditional
|
228
233
|
klass = Module.const_get(class_name)
|
229
234
|
if klass.ancestors.include?(node.klass)
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Zafu
|
2
|
+
module Security
|
3
|
+
SECURE_REGEXP = %r{<%|%>|<\Z}
|
4
|
+
SAFE_CODE = {'<%' => '<%', '%>' => '%>', '<' => '<'}
|
5
|
+
# Make sure translations and other literal values cannot be used to build erb.
|
6
|
+
def erb_escape(text)
|
7
|
+
# Do not only replace '<%' ! or <r:t>min</r:t>% ==> <% ...
|
8
|
+
text.gsub(SECURE_REGEXP) {|code| SAFE_CODE[code]}
|
9
|
+
end
|
10
|
+
|
11
|
+
def form_quote(text)
|
12
|
+
erb_escape(text).gsub("'", "'")
|
13
|
+
end
|
14
|
+
end # Security
|
15
|
+
end # Zafu
|
data/test/node_context_test.rb
CHANGED
@@ -121,7 +121,7 @@ class NodeContextTest < Test::Unit::TestCase
|
|
121
121
|
end
|
122
122
|
end # with a sub-class
|
123
123
|
|
124
|
-
context 'with an
|
124
|
+
context 'with an anonymous sub-class' do
|
125
125
|
subject do
|
126
126
|
NodeContext.new('@node', Class.new(Page))
|
127
127
|
end
|
@@ -129,7 +129,7 @@ class NodeContextTest < Test::Unit::TestCase
|
|
129
129
|
should 'return class on class_name' do
|
130
130
|
assert_equal 'Page', subject.class_name
|
131
131
|
end
|
132
|
-
end # with an
|
132
|
+
end # with an anonymous sub-class
|
133
133
|
end
|
134
134
|
|
135
135
|
context 'In a sub-context' do
|
data/test/ruby_less_test.rb
CHANGED
@@ -3,6 +3,7 @@ require 'test_helper'
|
|
3
3
|
class ZafuRubyLessTest < Test::Unit::TestCase
|
4
4
|
include RubyLess
|
5
5
|
def self.process_unknown(callback); end;
|
6
|
+
include Zafu::Security
|
6
7
|
include Zafu::Process::RubyLessProcessing
|
7
8
|
def helper; self.class; end
|
8
9
|
safe_method :one => {:class => String, :method => "main_one"}
|
data/test/zafu/meta.yml
CHANGED
@@ -7,6 +7,11 @@ include_with_part:
|
|
7
7
|
src: "<r:include template='/some/template'><r:with part='a'/><r:with part='b'>new b:<r:include template='/some/template' part='a'/></r:with></r:include>"
|
8
8
|
tem: "<div id='b'>new b:<div id='a'>a</div></div>"
|
9
9
|
|
10
|
+
include_missing_part:
|
11
|
+
# part 'a' is moved around
|
12
|
+
src: "<r:include template='/some/template' part='bad'/>"
|
13
|
+
tem: "<span class='parser_error'><span class='method'>include</span> <span class='message'>'bad' not found in template '/some/template'</span></span>"
|
14
|
+
|
10
15
|
missing_template:
|
11
16
|
src: "<r:include template='Foo'/>"
|
12
17
|
tem: "/template 'Foo' not found/"
|
data/test/zafu/security.yml
CHANGED
data/zafu.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{zafu}
|
8
|
-
s.version = "0.7.
|
8
|
+
s.version = "0.7.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Gaspard Bucher"]
|
12
|
-
s.date = %q{
|
12
|
+
s.date = %q{2011-01-15}
|
13
13
|
s.description = %q{Provides a powerful templating language based on xhtml for rails}
|
14
14
|
s.email = %q{gaspard@teti.ch}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -38,6 +38,7 @@ Gem::Specification.new do |s|
|
|
38
38
|
"lib/zafu/process/forms.rb",
|
39
39
|
"lib/zafu/process/html.rb",
|
40
40
|
"lib/zafu/process/ruby_less_processing.rb",
|
41
|
+
"lib/zafu/security.rb",
|
41
42
|
"lib/zafu/template.rb",
|
42
43
|
"lib/zafu/test_helper.rb",
|
43
44
|
"lib/zafu/view_methods.rb",
|
@@ -67,7 +68,7 @@ Gem::Specification.new do |s|
|
|
67
68
|
s.homepage = %q{http://zenadmin.org/zafu}
|
68
69
|
s.rdoc_options = ["--charset=UTF-8"]
|
69
70
|
s.require_paths = ["lib"]
|
70
|
-
s.rubygems_version = %q{1.3.
|
71
|
+
s.rubygems_version = %q{1.3.7}
|
71
72
|
s.summary = %q{Provides a powerful templating language based on xhtml for rails}
|
72
73
|
s.test_files = [
|
73
74
|
"test/markup_test.rb",
|
@@ -87,7 +88,7 @@ Gem::Specification.new do |s|
|
|
87
88
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
88
89
|
s.specification_version = 3
|
89
90
|
|
90
|
-
if Gem::Version.new(Gem::
|
91
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
91
92
|
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
92
93
|
s.add_development_dependency(%q<yamltest>, [">= 0.5.0"])
|
93
94
|
s.add_runtime_dependency(%q<rubyless>, [">= 0.7.0"])
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zafu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 9
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 0
|
7
8
|
- 7
|
8
|
-
-
|
9
|
-
version: 0.7.
|
9
|
+
- 5
|
10
|
+
version: 0.7.5
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Gaspard Bucher
|
@@ -14,16 +15,18 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date:
|
18
|
+
date: 2011-01-15 00:00:00 +01:00
|
18
19
|
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
22
|
name: shoulda
|
22
23
|
prerelease: false
|
23
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
24
26
|
requirements:
|
25
27
|
- - ">="
|
26
28
|
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
27
30
|
segments:
|
28
31
|
- 0
|
29
32
|
version: "0"
|
@@ -33,9 +36,11 @@ dependencies:
|
|
33
36
|
name: yamltest
|
34
37
|
prerelease: false
|
35
38
|
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
36
40
|
requirements:
|
37
41
|
- - ">="
|
38
42
|
- !ruby/object:Gem::Version
|
43
|
+
hash: 11
|
39
44
|
segments:
|
40
45
|
- 0
|
41
46
|
- 5
|
@@ -47,9 +52,11 @@ dependencies:
|
|
47
52
|
name: rubyless
|
48
53
|
prerelease: false
|
49
54
|
requirement: &id003 !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
50
56
|
requirements:
|
51
57
|
- - ">="
|
52
58
|
- !ruby/object:Gem::Version
|
59
|
+
hash: 3
|
53
60
|
segments:
|
54
61
|
- 0
|
55
62
|
- 7
|
@@ -88,6 +95,7 @@ files:
|
|
88
95
|
- lib/zafu/process/forms.rb
|
89
96
|
- lib/zafu/process/html.rb
|
90
97
|
- lib/zafu/process/ruby_less_processing.rb
|
98
|
+
- lib/zafu/security.rb
|
91
99
|
- lib/zafu/template.rb
|
92
100
|
- lib/zafu/test_helper.rb
|
93
101
|
- lib/zafu/view_methods.rb
|
@@ -123,23 +131,27 @@ rdoc_options:
|
|
123
131
|
require_paths:
|
124
132
|
- lib
|
125
133
|
required_ruby_version: !ruby/object:Gem::Requirement
|
134
|
+
none: false
|
126
135
|
requirements:
|
127
136
|
- - ">="
|
128
137
|
- !ruby/object:Gem::Version
|
138
|
+
hash: 3
|
129
139
|
segments:
|
130
140
|
- 0
|
131
141
|
version: "0"
|
132
142
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
|
+
none: false
|
133
144
|
requirements:
|
134
145
|
- - ">="
|
135
146
|
- !ruby/object:Gem::Version
|
147
|
+
hash: 3
|
136
148
|
segments:
|
137
149
|
- 0
|
138
150
|
version: "0"
|
139
151
|
requirements: []
|
140
152
|
|
141
153
|
rubyforge_project:
|
142
|
-
rubygems_version: 1.3.
|
154
|
+
rubygems_version: 1.3.7
|
143
155
|
signing_key:
|
144
156
|
specification_version: 3
|
145
157
|
summary: Provides a powerful templating language based on xhtml for rails
|