zena 0.16.3 → 0.16.4
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/.gitignore +1 -0
- data/History.txt +11 -0
- data/app/controllers/nodes_controller.rb +1 -1
- data/app/controllers/versions_controller.rb +1 -1
- data/app/controllers/virtual_classes_controller.rb +29 -2
- data/app/models/cached_page.rb +3 -3
- data/app/models/document.rb +1 -20
- data/app/models/iformat.rb +4 -4
- data/app/models/image.rb +1 -1
- data/app/models/image_content.rb +5 -5
- data/app/models/node.rb +25 -0
- data/app/models/text_document_version.rb +11 -3
- data/app/models/virtual_class.rb +50 -0
- data/app/views/{nodes → sites}/404.html +0 -0
- data/app/views/templates/edit_tabs/_image.rhtml +1 -1
- data/app/views/versions/_list.rhtml +3 -1
- data/app/views/virtual_classes/_li.erb +2 -2
- data/app/views/virtual_classes/index.erb +9 -1
- data/bricks/tags/patch/node.rb +1 -1
- data/config/bricks.yml +1 -1
- data/config/gems.yml +4 -2
- data/db/migrate/047_change_default_link_id_to_zero.rb +1 -1
- data/db/migrate/20090825201159_insert_zero_link.rb +1 -1
- data/lib/bricks.rb +2 -2
- data/lib/bricks/requirements_validation.rb +13 -8
- data/lib/gettext_strings.rb +1 -0
- data/lib/tasks/zena.rake +15 -6
- data/lib/zena.rb +9 -3
- data/lib/{base_additions.rb → zena/base_additions.rb} +0 -0
- data/lib/{core_ext → zena/core_ext}/date_time.rb +0 -0
- data/lib/{core_ext → zena/core_ext}/dir.rb +0 -0
- data/lib/zena/core_ext/file_utils.rb +13 -0
- data/lib/{core_ext → zena/core_ext}/fixnum.rb +0 -0
- data/lib/{core_ext → zena/core_ext}/string.rb +0 -0
- data/lib/zena/deploy.rb +1 -1
- data/lib/zena/deploy/start.html +1 -1
- data/lib/zena/deploy/template.rb +5 -1
- data/lib/{fix_rails_layouts.rb → zena/fix_rails_layouts.rb} +0 -0
- data/lib/zena/info.rb +2 -2
- data/lib/zena/routes.rb +1 -1
- data/lib/zena/use/fixtures.rb +1 -1
- data/lib/zena/use/html_tags.rb +3 -3
- data/lib/zena/use/image_builder.rb +329 -0
- data/lib/zena/use/query_comment.rb +96 -0
- data/lib/zena/use/query_node.rb +408 -0
- data/lib/zena/use/query_node_finders.rb +91 -0
- data/lib/zena/use/rendering.rb +2 -2
- data/lib/{webdav_adapter.rb → zena/webdav_adapter.rb} +0 -0
- data/locale/de/LC_MESSAGES/zena.mo +0 -0
- data/locale/de/zena.po +1456 -0
- data/locale/en/LC_MESSAGES/zena.mo +0 -0
- data/locale/en/zena.po +626 -1197
- data/locale/fr/LC_MESSAGES/zena.mo +0 -0
- data/locale/fr/zena.po +895 -1221
- data/locale/zena.pot +527 -1027
- data/public/calendar/lang/calendar-de-utf8.js +128 -0
- data/public/calendar/menuarrow.gif +0 -0
- data/public/stylesheets/admin.css +2 -1
- data/test/custom_queries/complex.host.yml +1 -1
- data/test/fixtures/files/vclasses.yml +12 -0
- data/test/functional/virtual_classes_controller_test.rb +9 -0
- data/test/helpers/{node_query → query_node}/basic.yml +0 -0
- data/test/helpers/{node_query → query_node}/comments.yml +0 -0
- data/test/helpers/{node_query → query_node}/complex.yml +0 -0
- data/test/helpers/{node_query → query_node}/filters.yml +0 -0
- data/test/helpers/{node_query → query_node}/relations.yml +0 -0
- data/test/helpers/{node_query_test.rb → query_node_test.rb} +1 -2
- data/test/integration/navigation_test.rb +2 -0
- data/test/test_helper.rb +1 -1
- data/test/test_zena.rb +1 -1
- data/test/unit/core_ext_test.rb +3 -3
- data/test/unit/iformat_test.rb +3 -3
- data/test/unit/image_builder_test.rb +34 -34
- data/test/unit/node_test.rb +15 -1
- data/test/unit/virtual_class_test.rb +106 -0
- data/test/unit/zena/use/upload_test.rb +3 -3
- data/vendor/plugins/gettext_i18n_rails/tasks/gettext_rails_i18n.rake +3 -3
- data/zena.gemspec +36 -29
- data/zena_console.rb +33 -0
- metadata +30 -23
- data/lib/comment_query.rb +0 -92
- data/lib/image_builder.rb +0 -325
- data/lib/zena/use/node_query_finders.rb +0 -494
- data/vendor/bricks/20070122-172926.txt +0 -282
data/test/unit/node_test.rb
CHANGED
|
@@ -340,7 +340,7 @@ class NodeTest < Zena::Unit::TestCase
|
|
|
340
340
|
login(:ant)
|
|
341
341
|
node = secure!(Node) { nodes(:cleanWater) }
|
|
342
342
|
child = node.new_child( :name => 'status', :class => Page )
|
|
343
|
-
assert !
|
|
343
|
+
assert !child.save, "Save fails"
|
|
344
344
|
assert child.errors[:name].any?
|
|
345
345
|
|
|
346
346
|
child = node.new_child( :name => 'new_name', :class => Page )
|
|
@@ -1442,6 +1442,20 @@ done: \"I am done\""
|
|
|
1442
1442
|
assert_equal 'nicePeople', node.name
|
|
1443
1443
|
end
|
|
1444
1444
|
|
|
1445
|
+
def test_sync_name_should_result_on_duplicates
|
|
1446
|
+
login(:tiger)
|
|
1447
|
+
# was in sync, correct lang
|
|
1448
|
+
people = secure!(Node) { nodes(:people) }
|
|
1449
|
+
node = secure!(Page) { Page.create(:v_title => 'nice people', :parent_id => people.parent_id)}
|
|
1450
|
+
assert !node.new_record?
|
|
1451
|
+
assert_equal 'nicePeople', node.name
|
|
1452
|
+
# would sync to 'nicePeople'
|
|
1453
|
+
assert people.update_attributes(:v_title => 'nice people')
|
|
1454
|
+
assert_equal 'people', people.name
|
|
1455
|
+
assert people.publish
|
|
1456
|
+
assert_equal 'nicePeople-1', people.name
|
|
1457
|
+
end
|
|
1458
|
+
|
|
1445
1459
|
def test_sync_name_before_publish_if_single_version
|
|
1446
1460
|
login(:ant)
|
|
1447
1461
|
node = secure!(Node) { Node.create(:v_title => 'Eve', :parent_id => nodes_id(:people)) }
|
|
@@ -239,4 +239,110 @@ class VirtualClassTest < Zena::Unit::TestCase
|
|
|
239
239
|
assert post.update_attributes(:d_foo => 'bar', :d_book => 'Alice In Wonderland')
|
|
240
240
|
assert_equal ["book", "foo", "reading"], post.dyn_attribute_keys
|
|
241
241
|
end
|
|
242
|
+
|
|
243
|
+
context 'importing virtual class definitions' do
|
|
244
|
+
setup do
|
|
245
|
+
login(:lion)
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
context 'with an existing superclass' do
|
|
249
|
+
setup do
|
|
250
|
+
@data = {"Foo" => {'superclass' => 'Page'}}
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
should 'create a new virtual class with the given name' do
|
|
254
|
+
res = nil
|
|
255
|
+
assert_difference('VirtualClass.count', 1) do
|
|
256
|
+
res = secure(VirtualClass) { VirtualClass.import(@data) }
|
|
257
|
+
end
|
|
258
|
+
assert_equal 'Foo', res.first.name
|
|
259
|
+
assert_equal 'new', res.first.import_result
|
|
260
|
+
assert_equal 'NPF', res.first.kpath
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
context 'and an existing virtual class' do
|
|
264
|
+
setup do
|
|
265
|
+
@data = {'Post' => {'superclass' => 'Note'}}
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
should 'update the virtual class if the superclass match' do
|
|
269
|
+
res = nil
|
|
270
|
+
assert_difference('VirtualClass.count', 0) do
|
|
271
|
+
res = secure(VirtualClass) { VirtualClass.import(@data) }
|
|
272
|
+
end
|
|
273
|
+
assert_equal 'Post', res.first.name
|
|
274
|
+
assert_equal 'same', res.first.import_result
|
|
275
|
+
assert_equal 'NNP', res.first.kpath
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
context 'if the superclasses do not match' do
|
|
279
|
+
setup do
|
|
280
|
+
@data['Post']['superclass'] = 'Page'
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
should 'return a conflict error' do
|
|
284
|
+
res = nil
|
|
285
|
+
assert_difference('VirtualClass.count', 0) do
|
|
286
|
+
res = secure(VirtualClass) { VirtualClass.import(@data) }
|
|
287
|
+
end
|
|
288
|
+
assert_equal 'Post', res.first.name
|
|
289
|
+
assert_equal 'conflict', res.first.import_result
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
should 'propagate the conflict error to subclasses in the definitions' do
|
|
293
|
+
@data['Foo'] = {'superclass' => 'Post'}
|
|
294
|
+
@data['Bar'] = {'superclass' => 'Foo'}
|
|
295
|
+
res = nil
|
|
296
|
+
assert_difference('VirtualClass.count', 0) do
|
|
297
|
+
res = secure(VirtualClass) { VirtualClass.import(@data) }
|
|
298
|
+
end
|
|
299
|
+
post = res.detect {|r| r.name == 'Post'}
|
|
300
|
+
foo = res.detect {|r| r.name == 'Foo'}
|
|
301
|
+
bar = res.detect {|r| r.name == 'Bar'}
|
|
302
|
+
assert foo.new_record?
|
|
303
|
+
assert_equal 'Foo', foo.name
|
|
304
|
+
assert_equal 'conflict in superclass', foo.import_result
|
|
305
|
+
assert_equal 'Post', post.name
|
|
306
|
+
assert_equal 'conflict', post.import_result
|
|
307
|
+
assert bar.new_record?
|
|
308
|
+
assert_equal 'Bar', bar.name
|
|
309
|
+
assert_equal 'conflict in superclass', bar.import_result
|
|
310
|
+
end
|
|
311
|
+
end
|
|
312
|
+
end
|
|
313
|
+
end # with an existing superclass
|
|
314
|
+
|
|
315
|
+
context 'without an existing superclass' do
|
|
316
|
+
setup do
|
|
317
|
+
@data = {'Foo' => {'superclass' => 'Baz'}, 'Baz' => {'superclass' => 'Post'}}
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
should 'create the superclass first if it is in the definitions' do
|
|
321
|
+
res = nil
|
|
322
|
+
assert_difference('VirtualClass.count', 2) do
|
|
323
|
+
res = secure(VirtualClass) { VirtualClass.import(@data) }
|
|
324
|
+
end
|
|
325
|
+
foo = res.detect {|r| r.name == 'Foo'}
|
|
326
|
+
baz = res.detect {|r| r.name == 'Baz'}
|
|
327
|
+
assert_equal 'Foo', foo.name
|
|
328
|
+
assert_equal 'new', foo.import_result
|
|
329
|
+
assert_equal 'NNPBF', foo.kpath
|
|
330
|
+
assert_equal 'Baz', baz.name
|
|
331
|
+
assert_equal 'new', baz.import_result
|
|
332
|
+
assert_equal 'NNPB', baz.kpath
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
should 'return an error if the superclass is not in the definitions' do
|
|
336
|
+
@data.delete('Baz')
|
|
337
|
+
res = nil
|
|
338
|
+
assert_difference('VirtualClass.count', 0) do
|
|
339
|
+
res = secure(VirtualClass) { VirtualClass.import(@data) }
|
|
340
|
+
end
|
|
341
|
+
foo = res.first
|
|
342
|
+
assert_equal 'Foo', foo.name
|
|
343
|
+
assert_equal 'missing superclass', foo.import_result
|
|
344
|
+
end
|
|
345
|
+
end # without an existing superclass
|
|
346
|
+
end # importing virtual class definitions
|
|
347
|
+
|
|
242
348
|
end
|
|
@@ -20,19 +20,19 @@ class UploadTest < Zena::View::TestCase
|
|
|
20
20
|
|
|
21
21
|
context 'to a file too large' do
|
|
22
22
|
setup do
|
|
23
|
-
@params = {'attachment_url' => "http://
|
|
23
|
+
@params = {'attachment_url' => "http://ftp.acc.umu.se/debian-cd/5.0.4/i386/iso-cd/debian-504-i386-CD-1.iso"}
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
should 'return an error about file being too big, without a download' do
|
|
27
27
|
file, error = get_attachment
|
|
28
28
|
assert_nil file
|
|
29
|
-
assert_equal 'size (645.
|
|
29
|
+
assert_equal 'size (645.8 MB) too big to fetch url', error
|
|
30
30
|
end
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
context 'to a file without size' do
|
|
34
34
|
setup do
|
|
35
|
-
@params = {'attachment_url' => "http://
|
|
35
|
+
@params = {'attachment_url' => "http://prdownload.berlios.de/zena/zena_playground.zip"}
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
should 'return an error about missing content length' do
|
|
@@ -18,7 +18,7 @@ namespace :gettext do
|
|
|
18
18
|
|
|
19
19
|
if GetText.respond_to? :update_pofiles_org
|
|
20
20
|
GetText.update_pofiles_org(
|
|
21
|
-
"
|
|
21
|
+
"zena",
|
|
22
22
|
Dir.glob("{app,lib,config,locale}/**/*.{rb,erb,haml}"),
|
|
23
23
|
"version 0.0.1",
|
|
24
24
|
:po_root => 'locale',
|
|
@@ -37,8 +37,8 @@ namespace :gettext do
|
|
|
37
37
|
|
|
38
38
|
#parse files.. (models are simply parsed as ruby files)
|
|
39
39
|
GetText.update_pofiles(
|
|
40
|
-
"
|
|
41
|
-
Dir.glob("{app,lib,config,locale}/**/*.{rb,erb,haml}"),
|
|
40
|
+
"zena",
|
|
41
|
+
Dir.glob("{app,lib,config,locale}/**/*.{rb,erb,haml,rhtml}"),
|
|
42
42
|
"version 0.0.1",
|
|
43
43
|
'locale'
|
|
44
44
|
)
|
data/zena.gemspec
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# Generated by jeweler
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
|
-
# Instead, edit Jeweler::Tasks in
|
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{zena}
|
|
8
|
-
s.version = "0.16.
|
|
8
|
+
s.version = "0.16.4"
|
|
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{2010-
|
|
12
|
+
s.date = %q{2010-02-22}
|
|
13
13
|
s.default_executable = %q{zena}
|
|
14
14
|
s.description = %q{zena is a Ruby on Rails CMS (content managment system) with a focus on usability, ease of customization and web 2.0 goodness (application like behaviour).}
|
|
15
15
|
s.email = %q{gaspard@teti.ch}
|
|
@@ -151,7 +151,6 @@ Gem::Specification.new do |s|
|
|
|
151
151
|
"app/views/links/create.rjs",
|
|
152
152
|
"app/views/links/destroy.rjs",
|
|
153
153
|
"app/views/links/show.rjs",
|
|
154
|
-
"app/views/nodes/404.html",
|
|
155
154
|
"app/views/nodes/500.html",
|
|
156
155
|
"app/views/nodes/_dates.rhtml",
|
|
157
156
|
"app/views/nodes/_edit_attribute.rhtml",
|
|
@@ -188,6 +187,7 @@ Gem::Specification.new do |s|
|
|
|
188
187
|
"app/views/relations/show.rjs",
|
|
189
188
|
"app/views/relations/update.rjs",
|
|
190
189
|
"app/views/search/_form.rhtml",
|
|
190
|
+
"app/views/sites/404.html",
|
|
191
191
|
"app/views/sites/_form.erb",
|
|
192
192
|
"app/views/sites/_li.erb",
|
|
193
193
|
"app/views/sites/clear_cache.rjs",
|
|
@@ -395,19 +395,11 @@ Gem::Specification.new do |s|
|
|
|
395
395
|
"doc/template/cache/STYLE",
|
|
396
396
|
"doc/template/cache/URL",
|
|
397
397
|
"doc/zafu_changes.yml",
|
|
398
|
-
"lib/base_additions.rb",
|
|
399
398
|
"lib/bricks.rb",
|
|
400
399
|
"lib/bricks/loader.rb",
|
|
401
400
|
"lib/bricks/requirements_validation.rb",
|
|
402
|
-
"lib/comment_query.rb",
|
|
403
|
-
"lib/core_ext/date_time.rb",
|
|
404
|
-
"lib/core_ext/dir.rb",
|
|
405
|
-
"lib/core_ext/fixnum.rb",
|
|
406
|
-
"lib/core_ext/string.rb",
|
|
407
401
|
"lib/exif_data.rb",
|
|
408
|
-
"lib/fix_rails_layouts.rb",
|
|
409
402
|
"lib/gettext_strings.rb",
|
|
410
|
-
"lib/image_builder.rb",
|
|
411
403
|
"lib/log_recorder/lib/log_recorder.rb",
|
|
412
404
|
"lib/log_recorder/test/log_recorder_test.rb",
|
|
413
405
|
"lib/parser.rb",
|
|
@@ -415,7 +407,6 @@ Gem::Specification.new do |s|
|
|
|
415
407
|
"lib/tasks/zena.rake",
|
|
416
408
|
"lib/tasks/zena.rb",
|
|
417
409
|
"lib/upload_progress_server.rb",
|
|
418
|
-
"lib/webdav_adapter.rb",
|
|
419
410
|
"lib/zafu/action.rb",
|
|
420
411
|
"lib/zafu/ajax.rb",
|
|
421
412
|
"lib/zafu/attributes.rb",
|
|
@@ -442,8 +433,14 @@ Gem::Specification.new do |s|
|
|
|
442
433
|
"lib/zena/acts/multiversion.rb",
|
|
443
434
|
"lib/zena/acts/secure.rb",
|
|
444
435
|
"lib/zena/app.rb",
|
|
436
|
+
"lib/zena/base_additions.rb",
|
|
445
437
|
"lib/zena/code_syntax.rb",
|
|
446
438
|
"lib/zena/controller/test_case.rb",
|
|
439
|
+
"lib/zena/core_ext/date_time.rb",
|
|
440
|
+
"lib/zena/core_ext/dir.rb",
|
|
441
|
+
"lib/zena/core_ext/file_utils.rb",
|
|
442
|
+
"lib/zena/core_ext/fixnum.rb",
|
|
443
|
+
"lib/zena/core_ext/string.rb",
|
|
447
444
|
"lib/zena/crypto_provider/initial.rb",
|
|
448
445
|
"lib/zena/db.rb",
|
|
449
446
|
"lib/zena/deploy.rb",
|
|
@@ -458,6 +455,7 @@ Gem::Specification.new do |s|
|
|
|
458
455
|
"lib/zena/deploy/vhost.rhtml",
|
|
459
456
|
"lib/zena/deploy/vhost_www.rhtml",
|
|
460
457
|
"lib/zena/fix/mysql_connection.rb",
|
|
458
|
+
"lib/zena/fix_rails_layouts.rb",
|
|
461
459
|
"lib/zena/foxy_parser.rb",
|
|
462
460
|
"lib/zena/info.rb",
|
|
463
461
|
"lib/zena/migrator.rb",
|
|
@@ -480,8 +478,11 @@ Gem::Specification.new do |s|
|
|
|
480
478
|
"lib/zena/use/grid.rb",
|
|
481
479
|
"lib/zena/use/html_tags.rb",
|
|
482
480
|
"lib/zena/use/i18n.rb",
|
|
481
|
+
"lib/zena/use/image_builder.rb",
|
|
483
482
|
"lib/zena/use/nested_attributes_alias.rb",
|
|
484
|
-
"lib/zena/use/
|
|
483
|
+
"lib/zena/use/query_comment.rb",
|
|
484
|
+
"lib/zena/use/query_node.rb",
|
|
485
|
+
"lib/zena/use/query_node_finders.rb",
|
|
485
486
|
"lib/zena/use/refactor.rb",
|
|
486
487
|
"lib/zena/use/relations.rb",
|
|
487
488
|
"lib/zena/use/rendering.rb",
|
|
@@ -492,6 +493,9 @@ Gem::Specification.new do |s|
|
|
|
492
493
|
"lib/zena/use/zafu.rb",
|
|
493
494
|
"lib/zena/use/zazen.rb",
|
|
494
495
|
"lib/zena/view/test_case.rb",
|
|
496
|
+
"lib/zena/webdav_adapter.rb",
|
|
497
|
+
"locale/de/LC_MESSAGES/zena.mo",
|
|
498
|
+
"locale/de/zena.po",
|
|
495
499
|
"locale/en/LC_MESSAGES/zena.mo",
|
|
496
500
|
"locale/en/zena.po",
|
|
497
501
|
"locale/fr/LC_MESSAGES/zena.mo",
|
|
@@ -502,9 +506,11 @@ Gem::Specification.new do |s|
|
|
|
502
506
|
"public/calendar/calendar-setup.js",
|
|
503
507
|
"public/calendar/calendar.js",
|
|
504
508
|
"public/calendar/iconCalendar.gif",
|
|
509
|
+
"public/calendar/lang/calendar-de-utf8.js",
|
|
505
510
|
"public/calendar/lang/calendar-en-utf8.js",
|
|
506
511
|
"public/calendar/lang/calendar-fr-utf8.js",
|
|
507
512
|
"public/calendar/lang/lang.zip",
|
|
513
|
+
"public/calendar/menuarrow.gif",
|
|
508
514
|
"public/dispatch.cgi",
|
|
509
515
|
"public/dispatch.fcgi",
|
|
510
516
|
"public/dispatch.rb",
|
|
@@ -1629,6 +1635,7 @@ Gem::Specification.new do |s|
|
|
|
1629
1635
|
"test/fixtures/files/translations_de.yml",
|
|
1630
1636
|
"test/fixtures/files/translations_fr.yml",
|
|
1631
1637
|
"test/fixtures/files/tree.jpg",
|
|
1638
|
+
"test/fixtures/files/vclasses.yml",
|
|
1632
1639
|
"test/fixtures/files/water.pdf",
|
|
1633
1640
|
"test/fixtures/import/photos.en.zml",
|
|
1634
1641
|
"test/fixtures/import/photos/bird.jpg",
|
|
@@ -1657,12 +1664,12 @@ Gem::Specification.new do |s|
|
|
|
1657
1664
|
"test/functional/users_controller_test.rb",
|
|
1658
1665
|
"test/functional/versions_controller_test.rb",
|
|
1659
1666
|
"test/functional/virtual_classes_controller_test.rb",
|
|
1660
|
-
"test/helpers/
|
|
1661
|
-
"test/helpers/
|
|
1662
|
-
"test/helpers/
|
|
1663
|
-
"test/helpers/
|
|
1664
|
-
"test/helpers/
|
|
1665
|
-
"test/helpers/
|
|
1667
|
+
"test/helpers/query_node/basic.yml",
|
|
1668
|
+
"test/helpers/query_node/comments.yml",
|
|
1669
|
+
"test/helpers/query_node/complex.yml",
|
|
1670
|
+
"test/helpers/query_node/filters.yml",
|
|
1671
|
+
"test/helpers/query_node/relations.yml",
|
|
1672
|
+
"test/helpers/query_node_test.rb",
|
|
1666
1673
|
"test/integration/multiple_hosts_test.rb",
|
|
1667
1674
|
"test/integration/multiversion_test.rb",
|
|
1668
1675
|
"test/integration/navigation_test.rb",
|
|
@@ -1873,7 +1880,6 @@ Gem::Specification.new do |s|
|
|
|
1873
1880
|
"vendor/apache2_upload_progress/README",
|
|
1874
1881
|
"vendor/apache2_upload_progress/mod_upload_progress.c",
|
|
1875
1882
|
"vendor/apache_upload/mod_upload_progress.c",
|
|
1876
|
-
"vendor/bricks/20070122-172926.txt",
|
|
1877
1883
|
"vendor/plugins/ar_mysql_full_text/README",
|
|
1878
1884
|
"vendor/plugins/ar_mysql_full_text/init.rb",
|
|
1879
1885
|
"vendor/plugins/ar_mysql_full_text/lib/ar_mysql_full_text.rb",
|
|
@@ -1905,7 +1911,8 @@ Gem::Specification.new do |s|
|
|
|
1905
1911
|
"vendor/plugins/rjs-assertions/init.rb",
|
|
1906
1912
|
"vendor/plugins/rjs-assertions/lib/rjs-assertions.rb",
|
|
1907
1913
|
"vendor/rails_patches/support_for_inverse_relationships_on_active_record_objects.diff",
|
|
1908
|
-
"zena.gemspec"
|
|
1914
|
+
"zena.gemspec",
|
|
1915
|
+
"zena_console.rb"
|
|
1909
1916
|
]
|
|
1910
1917
|
s.homepage = %q{http://zenadmin.org}
|
|
1911
1918
|
s.rdoc_options = ["--charset=UTF-8"]
|
|
@@ -1935,7 +1942,7 @@ Gem::Specification.new do |s|
|
|
|
1935
1942
|
"test/functional/users_controller_test.rb",
|
|
1936
1943
|
"test/functional/versions_controller_test.rb",
|
|
1937
1944
|
"test/functional/virtual_classes_controller_test.rb",
|
|
1938
|
-
"test/helpers/
|
|
1945
|
+
"test/helpers/query_node_test.rb",
|
|
1939
1946
|
"test/integration/multiple_hosts_test.rb",
|
|
1940
1947
|
"test/integration/multiversion_test.rb",
|
|
1941
1948
|
"test/integration/navigation_test.rb",
|
|
@@ -2028,11 +2035,11 @@ Gem::Specification.new do |s|
|
|
|
2028
2035
|
s.add_runtime_dependency(%q<will_paginate>, ["~> 2.3.12"])
|
|
2029
2036
|
s.add_runtime_dependency(%q<gettext>, ["= 1.93.0"])
|
|
2030
2037
|
s.add_runtime_dependency(%q<jeweler>, [">= 0"])
|
|
2031
|
-
s.add_runtime_dependency(%q<rmagick>, [">= 2.
|
|
2038
|
+
s.add_runtime_dependency(%q<rmagick>, [">= 2.10.0"])
|
|
2032
2039
|
s.add_runtime_dependency(%q<hpricot>, [">= 0"])
|
|
2033
2040
|
s.add_runtime_dependency(%q<differ>, [">= 0.1.1"])
|
|
2034
2041
|
s.add_runtime_dependency(%q<RedCloth>, ["= 3.0.4"])
|
|
2035
|
-
s.add_runtime_dependency(%q<querybuilder>, ["= 0.5.
|
|
2042
|
+
s.add_runtime_dependency(%q<querybuilder>, ["= 0.5.8"])
|
|
2036
2043
|
else
|
|
2037
2044
|
s.add_dependency(%q<ruby-recaptcha>, ["= 1.0.0"])
|
|
2038
2045
|
s.add_dependency(%q<tzinfo>, [">= 0.3.12"])
|
|
@@ -2051,11 +2058,11 @@ Gem::Specification.new do |s|
|
|
|
2051
2058
|
s.add_dependency(%q<will_paginate>, ["~> 2.3.12"])
|
|
2052
2059
|
s.add_dependency(%q<gettext>, ["= 1.93.0"])
|
|
2053
2060
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
|
2054
|
-
s.add_dependency(%q<rmagick>, [">= 2.
|
|
2061
|
+
s.add_dependency(%q<rmagick>, [">= 2.10.0"])
|
|
2055
2062
|
s.add_dependency(%q<hpricot>, [">= 0"])
|
|
2056
2063
|
s.add_dependency(%q<differ>, [">= 0.1.1"])
|
|
2057
2064
|
s.add_dependency(%q<RedCloth>, ["= 3.0.4"])
|
|
2058
|
-
s.add_dependency(%q<querybuilder>, ["= 0.5.
|
|
2065
|
+
s.add_dependency(%q<querybuilder>, ["= 0.5.8"])
|
|
2059
2066
|
end
|
|
2060
2067
|
else
|
|
2061
2068
|
s.add_dependency(%q<ruby-recaptcha>, ["= 1.0.0"])
|
|
@@ -2075,11 +2082,11 @@ Gem::Specification.new do |s|
|
|
|
2075
2082
|
s.add_dependency(%q<will_paginate>, ["~> 2.3.12"])
|
|
2076
2083
|
s.add_dependency(%q<gettext>, ["= 1.93.0"])
|
|
2077
2084
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
|
2078
|
-
s.add_dependency(%q<rmagick>, [">= 2.
|
|
2085
|
+
s.add_dependency(%q<rmagick>, [">= 2.10.0"])
|
|
2079
2086
|
s.add_dependency(%q<hpricot>, [">= 0"])
|
|
2080
2087
|
s.add_dependency(%q<differ>, [">= 0.1.1"])
|
|
2081
2088
|
s.add_dependency(%q<RedCloth>, ["= 3.0.4"])
|
|
2082
|
-
s.add_dependency(%q<querybuilder>, ["= 0.5.
|
|
2089
|
+
s.add_dependency(%q<querybuilder>, ["= 0.5.8"])
|
|
2083
2090
|
end
|
|
2084
2091
|
end
|
|
2085
2092
|
|
data/zena_console.rb
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
require 'test/test_helper'
|
|
2
|
+
require "authlogic/test_case"
|
|
3
|
+
require 'hpricot'
|
|
4
|
+
|
|
5
|
+
include Zena::Acts::Secure
|
|
6
|
+
|
|
7
|
+
module Console
|
|
8
|
+
|
|
9
|
+
include Zena::Use::Fixtures
|
|
10
|
+
include Zena::Use::TestHelper
|
|
11
|
+
include Zena::Acts::Secure
|
|
12
|
+
include ::Authlogic::TestCase
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def controller
|
|
16
|
+
@controller ||= Authlogic::TestCase::MockController.new
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def setup_authlogic
|
|
20
|
+
Authlogic::Session::Base.controller = (@request && Authlogic::TestCase::RailsRequestAdapter.new(@request)) || controller
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def visitor
|
|
25
|
+
Thread.current[:visitor]
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
module_function :controller, :activate_authlogic, :login, :users, :versions, :visitor
|
|
29
|
+
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
Console.activate_authlogic
|
|
33
|
+
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zena
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.16.
|
|
4
|
+
version: 0.16.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Gaspard Bucher
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2010-
|
|
12
|
+
date: 2010-02-22 00:00:00 +01:00
|
|
13
13
|
default_executable: zena
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
@@ -190,7 +190,7 @@ dependencies:
|
|
|
190
190
|
requirements:
|
|
191
191
|
- - ">="
|
|
192
192
|
- !ruby/object:Gem::Version
|
|
193
|
-
version: 2.
|
|
193
|
+
version: 2.10.0
|
|
194
194
|
version:
|
|
195
195
|
- !ruby/object:Gem::Dependency
|
|
196
196
|
name: hpricot
|
|
@@ -230,7 +230,7 @@ dependencies:
|
|
|
230
230
|
requirements:
|
|
231
231
|
- - "="
|
|
232
232
|
- !ruby/object:Gem::Version
|
|
233
|
-
version: 0.5.
|
|
233
|
+
version: 0.5.8
|
|
234
234
|
version:
|
|
235
235
|
description: zena is a Ruby on Rails CMS (content managment system) with a focus on usability, ease of customization and web 2.0 goodness (application like behaviour).
|
|
236
236
|
email: gaspard@teti.ch
|
|
@@ -374,7 +374,6 @@ files:
|
|
|
374
374
|
- app/views/links/create.rjs
|
|
375
375
|
- app/views/links/destroy.rjs
|
|
376
376
|
- app/views/links/show.rjs
|
|
377
|
-
- app/views/nodes/404.html
|
|
378
377
|
- app/views/nodes/500.html
|
|
379
378
|
- app/views/nodes/_dates.rhtml
|
|
380
379
|
- app/views/nodes/_edit_attribute.rhtml
|
|
@@ -411,6 +410,7 @@ files:
|
|
|
411
410
|
- app/views/relations/show.rjs
|
|
412
411
|
- app/views/relations/update.rjs
|
|
413
412
|
- app/views/search/_form.rhtml
|
|
413
|
+
- app/views/sites/404.html
|
|
414
414
|
- app/views/sites/_form.erb
|
|
415
415
|
- app/views/sites/_li.erb
|
|
416
416
|
- app/views/sites/clear_cache.rjs
|
|
@@ -618,19 +618,11 @@ files:
|
|
|
618
618
|
- doc/template/cache/STYLE
|
|
619
619
|
- doc/template/cache/URL
|
|
620
620
|
- doc/zafu_changes.yml
|
|
621
|
-
- lib/base_additions.rb
|
|
622
621
|
- lib/bricks.rb
|
|
623
622
|
- lib/bricks/loader.rb
|
|
624
623
|
- lib/bricks/requirements_validation.rb
|
|
625
|
-
- lib/comment_query.rb
|
|
626
|
-
- lib/core_ext/date_time.rb
|
|
627
|
-
- lib/core_ext/dir.rb
|
|
628
|
-
- lib/core_ext/fixnum.rb
|
|
629
|
-
- lib/core_ext/string.rb
|
|
630
624
|
- lib/exif_data.rb
|
|
631
|
-
- lib/fix_rails_layouts.rb
|
|
632
625
|
- lib/gettext_strings.rb
|
|
633
|
-
- lib/image_builder.rb
|
|
634
626
|
- lib/log_recorder/lib/log_recorder.rb
|
|
635
627
|
- lib/log_recorder/test/log_recorder_test.rb
|
|
636
628
|
- lib/parser.rb
|
|
@@ -638,7 +630,6 @@ files:
|
|
|
638
630
|
- lib/tasks/zena.rake
|
|
639
631
|
- lib/tasks/zena.rb
|
|
640
632
|
- lib/upload_progress_server.rb
|
|
641
|
-
- lib/webdav_adapter.rb
|
|
642
633
|
- lib/zafu/action.rb
|
|
643
634
|
- lib/zafu/ajax.rb
|
|
644
635
|
- lib/zafu/attributes.rb
|
|
@@ -665,8 +656,14 @@ files:
|
|
|
665
656
|
- lib/zena/acts/multiversion.rb
|
|
666
657
|
- lib/zena/acts/secure.rb
|
|
667
658
|
- lib/zena/app.rb
|
|
659
|
+
- lib/zena/base_additions.rb
|
|
668
660
|
- lib/zena/code_syntax.rb
|
|
669
661
|
- lib/zena/controller/test_case.rb
|
|
662
|
+
- lib/zena/core_ext/date_time.rb
|
|
663
|
+
- lib/zena/core_ext/dir.rb
|
|
664
|
+
- lib/zena/core_ext/file_utils.rb
|
|
665
|
+
- lib/zena/core_ext/fixnum.rb
|
|
666
|
+
- lib/zena/core_ext/string.rb
|
|
670
667
|
- lib/zena/crypto_provider/initial.rb
|
|
671
668
|
- lib/zena/db.rb
|
|
672
669
|
- lib/zena/deploy.rb
|
|
@@ -681,6 +678,7 @@ files:
|
|
|
681
678
|
- lib/zena/deploy/vhost.rhtml
|
|
682
679
|
- lib/zena/deploy/vhost_www.rhtml
|
|
683
680
|
- lib/zena/fix/mysql_connection.rb
|
|
681
|
+
- lib/zena/fix_rails_layouts.rb
|
|
684
682
|
- lib/zena/foxy_parser.rb
|
|
685
683
|
- lib/zena/info.rb
|
|
686
684
|
- lib/zena/migrator.rb
|
|
@@ -703,8 +701,11 @@ files:
|
|
|
703
701
|
- lib/zena/use/grid.rb
|
|
704
702
|
- lib/zena/use/html_tags.rb
|
|
705
703
|
- lib/zena/use/i18n.rb
|
|
704
|
+
- lib/zena/use/image_builder.rb
|
|
706
705
|
- lib/zena/use/nested_attributes_alias.rb
|
|
707
|
-
- lib/zena/use/
|
|
706
|
+
- lib/zena/use/query_comment.rb
|
|
707
|
+
- lib/zena/use/query_node.rb
|
|
708
|
+
- lib/zena/use/query_node_finders.rb
|
|
708
709
|
- lib/zena/use/refactor.rb
|
|
709
710
|
- lib/zena/use/relations.rb
|
|
710
711
|
- lib/zena/use/rendering.rb
|
|
@@ -715,6 +716,9 @@ files:
|
|
|
715
716
|
- lib/zena/use/zafu.rb
|
|
716
717
|
- lib/zena/use/zazen.rb
|
|
717
718
|
- lib/zena/view/test_case.rb
|
|
719
|
+
- lib/zena/webdav_adapter.rb
|
|
720
|
+
- locale/de/LC_MESSAGES/zena.mo
|
|
721
|
+
- locale/de/zena.po
|
|
718
722
|
- locale/en/LC_MESSAGES/zena.mo
|
|
719
723
|
- locale/en/zena.po
|
|
720
724
|
- locale/fr/LC_MESSAGES/zena.mo
|
|
@@ -725,9 +729,11 @@ files:
|
|
|
725
729
|
- public/calendar/calendar-setup.js
|
|
726
730
|
- public/calendar/calendar.js
|
|
727
731
|
- public/calendar/iconCalendar.gif
|
|
732
|
+
- public/calendar/lang/calendar-de-utf8.js
|
|
728
733
|
- public/calendar/lang/calendar-en-utf8.js
|
|
729
734
|
- public/calendar/lang/calendar-fr-utf8.js
|
|
730
735
|
- public/calendar/lang/lang.zip
|
|
736
|
+
- public/calendar/menuarrow.gif
|
|
731
737
|
- public/dispatch.cgi
|
|
732
738
|
- public/dispatch.fcgi
|
|
733
739
|
- public/dispatch.rb
|
|
@@ -1852,6 +1858,7 @@ files:
|
|
|
1852
1858
|
- test/fixtures/files/translations_de.yml
|
|
1853
1859
|
- test/fixtures/files/translations_fr.yml
|
|
1854
1860
|
- test/fixtures/files/tree.jpg
|
|
1861
|
+
- test/fixtures/files/vclasses.yml
|
|
1855
1862
|
- test/fixtures/files/water.pdf
|
|
1856
1863
|
- test/fixtures/import/photos.en.zml
|
|
1857
1864
|
- test/fixtures/import/photos/bird.jpg
|
|
@@ -1880,12 +1887,12 @@ files:
|
|
|
1880
1887
|
- test/functional/users_controller_test.rb
|
|
1881
1888
|
- test/functional/versions_controller_test.rb
|
|
1882
1889
|
- test/functional/virtual_classes_controller_test.rb
|
|
1883
|
-
- test/helpers/
|
|
1884
|
-
- test/helpers/
|
|
1885
|
-
- test/helpers/
|
|
1886
|
-
- test/helpers/
|
|
1887
|
-
- test/helpers/
|
|
1888
|
-
- test/helpers/
|
|
1890
|
+
- test/helpers/query_node/basic.yml
|
|
1891
|
+
- test/helpers/query_node/comments.yml
|
|
1892
|
+
- test/helpers/query_node/complex.yml
|
|
1893
|
+
- test/helpers/query_node/filters.yml
|
|
1894
|
+
- test/helpers/query_node/relations.yml
|
|
1895
|
+
- test/helpers/query_node_test.rb
|
|
1889
1896
|
- test/integration/multiple_hosts_test.rb
|
|
1890
1897
|
- test/integration/multiversion_test.rb
|
|
1891
1898
|
- test/integration/navigation_test.rb
|
|
@@ -2096,7 +2103,6 @@ files:
|
|
|
2096
2103
|
- vendor/apache2_upload_progress/README
|
|
2097
2104
|
- vendor/apache2_upload_progress/mod_upload_progress.c
|
|
2098
2105
|
- vendor/apache_upload/mod_upload_progress.c
|
|
2099
|
-
- vendor/bricks/20070122-172926.txt
|
|
2100
2106
|
- vendor/plugins/ar_mysql_full_text/README
|
|
2101
2107
|
- vendor/plugins/ar_mysql_full_text/init.rb
|
|
2102
2108
|
- vendor/plugins/ar_mysql_full_text/lib/ar_mysql_full_text.rb
|
|
@@ -2129,6 +2135,7 @@ files:
|
|
|
2129
2135
|
- vendor/plugins/rjs-assertions/lib/rjs-assertions.rb
|
|
2130
2136
|
- vendor/rails_patches/support_for_inverse_relationships_on_active_record_objects.diff
|
|
2131
2137
|
- zena.gemspec
|
|
2138
|
+
- zena_console.rb
|
|
2132
2139
|
has_rdoc: true
|
|
2133
2140
|
homepage: http://zenadmin.org
|
|
2134
2141
|
licenses: []
|
|
@@ -2179,7 +2186,7 @@ test_files:
|
|
|
2179
2186
|
- test/functional/users_controller_test.rb
|
|
2180
2187
|
- test/functional/versions_controller_test.rb
|
|
2181
2188
|
- test/functional/virtual_classes_controller_test.rb
|
|
2182
|
-
- test/helpers/
|
|
2189
|
+
- test/helpers/query_node_test.rb
|
|
2183
2190
|
- test/integration/multiple_hosts_test.rb
|
|
2184
2191
|
- test/integration/multiversion_test.rb
|
|
2185
2192
|
- test/integration/navigation_test.rb
|