radiant 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of radiant might be problematic. Click here for more details.
- data/CHANGELOG +61 -7
- data/CONTRIBUTORS +15 -0
- data/app/controllers/admin/export_controller.rb +1 -1
- data/app/controllers/admin/page_controller.rb +1 -0
- data/app/controllers/admin/user_controller.rb +2 -1
- data/app/controllers/application.rb +7 -8
- data/app/helpers/admin/node_helper.rb +84 -0
- data/app/helpers/admin/page_helper.rb +1 -19
- data/app/helpers/application_helper.rb +15 -9
- data/app/models/file_not_found_page.rb +2 -2
- data/app/models/page.rb +22 -18
- data/app/models/page_context.rb +9 -0
- data/app/models/radiant/config.rb +4 -2
- data/app/models/response_cache.rb +18 -12
- data/app/models/standard_tags.rb +111 -50
- data/app/views/admin/extension/index.rhtml +2 -2
- data/app/views/admin/layout/edit.rhtml +2 -2
- data/app/views/admin/layout/remove.rhtml +2 -2
- data/app/views/admin/page/_node.rhtml +4 -26
- data/app/views/admin/page/_part.rhtml +9 -14
- data/app/views/admin/page/edit.rhtml +38 -121
- data/app/views/admin/page/index.rhtml +2 -6
- data/app/views/admin/page/remove.rhtml +2 -2
- data/app/views/admin/snippet/edit.rhtml +3 -3
- data/app/views/admin/snippet/index.rhtml +2 -2
- data/app/views/admin/snippet/remove.rhtml +2 -2
- data/app/views/admin/user/edit.rhtml +4 -4
- data/app/views/admin/user/preferences.rhtml +2 -2
- data/app/views/admin/welcome/login.rhtml +1 -1
- data/config/environment.rb +79 -78
- data/db/schema.rb +2 -0
- data/lib/local_time.rb +12 -0
- data/lib/plugins/extension_patches/lib/fixture_loading_extension.rb +1 -1
- data/lib/plugins/extension_patches/lib/mailer_view_paths_extension.rb +3 -3
- data/lib/radiant.rb +1 -1
- data/lib/radiant/extension.rb +9 -3
- data/lib/radiant/extension_loader.rb +2 -2
- data/lib/tasks/extensions.rake +23 -8
- data/public/javascripts/admin.js +89 -0
- data/public/javascripts/controls.js +486 -354
- data/public/javascripts/dragdrop.js +90 -58
- data/public/javascripts/effects.js +398 -364
- data/public/javascripts/pngfix.js +37 -37
- data/public/javascripts/prototype.js +2764 -1095
- data/public/javascripts/ruledtable.js +10 -25
- data/public/javascripts/sitemap.js +74 -112
- data/public/javascripts/string.js +1 -7
- data/public/javascripts/tabcontrol.js +71 -86
- data/public/javascripts/tag_reference_search.js +19 -26
- data/public/stylesheets/admin/main.css +11 -5
- data/test/fixtures/extensions/01_basic/lib/new_module.rb +2 -0
- data/test/fixtures/page_parts.yml +16 -1
- data/test/fixtures/pages.yml +47 -84
- data/test/functional/extension_initialization_test.rb +11 -0
- data/test/helpers/login_test_helper.rb +12 -1
- data/test/helpers/page_test_helper.rb +6 -0
- data/test/helpers/render_test_helper.rb +11 -8
- data/test/test_helper.rb +1 -12
- data/test/unit/file_not_found_page_test.rb +5 -1
- data/test/unit/local_time_test.rb +45 -0
- data/test/unit/page_context_test.rb +32 -1
- data/test/unit/page_test.rb +45 -11
- data/test/unit/radiant/config_test.rb +1 -1
- data/test/unit/response_cache_test.rb +27 -2
- data/test/unit/standard_tags_test.rb +60 -15
- data/vendor/extensions/archive/README +29 -0
- data/vendor/extensions/archive/Rakefile +25 -0
- data/{app → vendor/extensions/archive/app}/models/archive_day_index_page.rb +0 -0
- data/{app → vendor/extensions/archive/app}/models/archive_finder.rb +8 -6
- data/{app → vendor/extensions/archive/app}/models/archive_month_index_page.rb +0 -0
- data/{app → vendor/extensions/archive/app}/models/archive_page.rb +0 -0
- data/{app → vendor/extensions/archive/app}/models/archive_year_index_page.rb +0 -0
- data/vendor/extensions/archive/archive_extension.rb +19 -0
- data/{lib → vendor/extensions/archive/lib}/archive_index_tags_and_methods.rb +0 -0
- data/vendor/extensions/archive/lib/tasks/archive_extension_tasks.rake +28 -0
- data/vendor/extensions/archive/test/fixtures/pages.yml +397 -0
- data/vendor/extensions/archive/test/functional/archive_extension_test.rb +16 -0
- data/{test → vendor/extensions/archive/test}/helpers/archive_index_test_helper.rb +0 -0
- data/vendor/extensions/archive/test/test_helper.rb +19 -0
- data/{test → vendor/extensions/archive/test}/unit/archive_day_index_page_test.rb +0 -0
- data/{test → vendor/extensions/archive/test}/unit/archive_month_index_page_test.rb +0 -0
- data/{test → vendor/extensions/archive/test}/unit/archive_page_test.rb +7 -1
- data/{test → vendor/extensions/archive/test}/unit/archive_year_index_page_test.rb +0 -0
- data/vendor/rails/actionmailer/CHANGELOG +10 -0
- data/vendor/rails/actionmailer/Rakefile +1 -1
- data/vendor/rails/actionmailer/lib/action_mailer/version.rb +1 -1
- data/vendor/rails/actionpack/CHANGELOG +51 -2
- data/vendor/rails/actionpack/Rakefile +1 -1
- data/vendor/rails/actionpack/lib/action_controller/assertions/dom_assertions.rb +2 -2
- data/vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb +1 -1
- data/vendor/rails/actionpack/lib/action_controller/assertions/response_assertions.rb +3 -0
- data/vendor/rails/actionpack/lib/action_controller/assertions/routing_assertions.rb +1 -0
- data/vendor/rails/actionpack/lib/action_controller/assertions/selector_assertions.rb +2 -0
- data/vendor/rails/actionpack/lib/action_controller/base.rb +7 -1
- data/vendor/rails/actionpack/lib/action_controller/caching.rb +39 -38
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/pstore_performance_fix.rb +30 -0
- data/vendor/rails/actionpack/lib/action_controller/cgi_ext/raw_post_data_fix.rb +1 -1
- data/vendor/rails/actionpack/lib/action_controller/cgi_process.rb +13 -4
- data/vendor/rails/actionpack/lib/action_controller/cookies.rb +5 -3
- data/vendor/rails/actionpack/lib/action_controller/filters.rb +176 -77
- data/vendor/rails/actionpack/lib/action_controller/integration.rb +31 -21
- data/vendor/rails/actionpack/lib/action_controller/macros/in_place_editing.rb +1 -1
- data/vendor/rails/actionpack/lib/action_controller/pagination.rb +7 -1
- data/vendor/rails/actionpack/lib/action_controller/resources.rb +117 -32
- data/vendor/rails/actionpack/lib/action_controller/routing.rb +56 -23
- data/vendor/rails/actionpack/lib/action_controller/test_process.rb +5 -2
- data/vendor/rails/actionpack/lib/action_controller/url_rewriter.rb +4 -1
- data/vendor/rails/actionpack/lib/action_controller/verification.rb +1 -0
- data/vendor/rails/actionpack/lib/action_pack/version.rb +1 -1
- data/vendor/rails/actionpack/lib/action_view/base.rb +25 -19
- data/vendor/rails/actionpack/lib/action_view/compiled_templates.rb +2 -2
- data/vendor/rails/actionpack/lib/action_view/helpers/active_record_helper.rb +18 -18
- data/vendor/rails/actionpack/lib/action_view/helpers/debug_helper.rb +10 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/deprecated_helper.rb +3 -0
- data/vendor/rails/actionpack/lib/action_view/helpers/prototype_helper.rb +33 -17
- data/vendor/rails/actionpack/test/activerecord/pagination_test.rb +9 -0
- data/vendor/rails/actionpack/test/controller/action_pack_assertions_test.rb +13 -0
- data/vendor/rails/actionpack/test/controller/addresses_render_test.rb +4 -1
- data/vendor/rails/actionpack/test/controller/base_test.rb +1 -1
- data/vendor/rails/actionpack/test/controller/caching_test.rb +3 -2
- data/vendor/rails/actionpack/test/controller/cookie_test.rb +11 -0
- data/vendor/rails/actionpack/test/controller/deprecation/deprecated_base_methods_test.rb +18 -0
- data/vendor/rails/actionpack/test/controller/filter_params_test.rb +1 -0
- data/vendor/rails/actionpack/test/controller/filters_test.rb +149 -26
- data/vendor/rails/actionpack/test/controller/integration_test.rb +93 -8
- data/vendor/rails/actionpack/test/controller/resources_test.rb +215 -36
- data/vendor/rails/actionpack/test/controller/routing_test.rb +2 -2
- data/vendor/rails/actionpack/test/controller/test_test.rb +16 -0
- data/vendor/rails/actionpack/test/controller/url_rewriter_test.rb +66 -10
- data/vendor/rails/actionpack/test/controller/verification_test.rb +15 -0
- data/vendor/rails/actionpack/test/fixtures/test/hello_world.rxml +2 -1
- data/vendor/rails/actionpack/test/template/asset_tag_helper_test.rb +5 -0
- data/vendor/rails/actionpack/test/template/compiled_templates_test.rb +29 -17
- data/vendor/rails/actionpack/test/template/javascript_helper_test.rb +4 -4
- data/vendor/rails/actionpack/test/template/number_helper_test.rb +1 -1
- data/vendor/rails/actionpack/test/template/prototype_helper_test.rb +13 -13
- data/vendor/rails/actionwebservice/CHANGELOG +14 -0
- data/vendor/rails/actionwebservice/Rakefile +2 -2
- data/vendor/rails/actionwebservice/lib/action_web_service/version.rb +1 -1
- data/vendor/rails/activerecord/CHANGELOG +34 -0
- data/vendor/rails/activerecord/Rakefile +1 -1
- data/vendor/rails/activerecord/lib/active_record/acts/list.rb +14 -2
- data/vendor/rails/activerecord/lib/active_record/acts/tree.rb +7 -0
- data/vendor/rails/activerecord/lib/active_record/associations.rb +29 -14
- data/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb +5 -1
- data/vendor/rails/activerecord/lib/active_record/associations/has_many_association.rb +2 -2
- data/vendor/rails/activerecord/lib/active_record/associations/has_many_through_association.rb +10 -0
- data/vendor/rails/activerecord/lib/active_record/base.rb +12 -3
- data/vendor/rails/activerecord/lib/active_record/calculations.rb +2 -2
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/quoting.rb +1 -1
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/oracle_adapter.rb +1 -0
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb +2 -2
- data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb +54 -38
- data/vendor/rails/activerecord/lib/active_record/deprecated_finders.rb +3 -3
- data/vendor/rails/activerecord/lib/active_record/fixtures.rb +1 -1
- data/vendor/rails/activerecord/lib/active_record/timestamp.rb +0 -9
- data/vendor/rails/activerecord/lib/active_record/version.rb +1 -1
- data/vendor/rails/activerecord/test/associations/eager_test.rb +13 -0
- data/vendor/rails/activerecord/test/associations/join_model_test.rb +10 -1
- data/vendor/rails/activerecord/test/associations_test.rb +36 -3
- data/vendor/rails/activerecord/test/base_test.rb +17 -4
- data/vendor/rails/activerecord/test/defaults_test.rb +15 -0
- data/vendor/rails/activerecord/test/fixtures/author.rb +1 -0
- data/vendor/rails/activerecord/test/fixtures/binaries.yml +437 -0
- data/vendor/rails/activerecord/test/fixtures/db_definitions/schema.rb +13 -0
- data/vendor/rails/activerecord/test/fixtures/developer.rb +10 -0
- data/vendor/rails/activerecord/test/fixtures_test.rb +9 -5
- data/vendor/rails/activerecord/test/migration_test.rb +9 -10
- data/vendor/rails/activerecord/test/mixin_test.rb +47 -0
- data/vendor/rails/activerecord/test/validations_test.rb +2 -2
- data/vendor/rails/activesupport/CHANGELOG +16 -0
- data/vendor/rails/activesupport/lib/active_support/core_ext/blank.rb +9 -3
- data/vendor/rails/activesupport/lib/active_support/core_ext/hash/conversions.rb +48 -3
- data/vendor/rails/activesupport/lib/active_support/core_ext/module/introspection.rb +14 -0
- data/vendor/rails/activesupport/lib/active_support/dependencies.rb +3 -3
- data/vendor/rails/activesupport/lib/active_support/json/encoders/core.rb +5 -3
- data/vendor/rails/activesupport/lib/active_support/multibyte/chars.rb +6 -6
- data/vendor/rails/activesupport/lib/active_support/version.rb +1 -1
- data/vendor/rails/activesupport/test/core_ext/hash_ext_test.rb +37 -0
- data/vendor/rails/activesupport/test/core_ext/module_test.rb +8 -0
- data/vendor/rails/activesupport/test/dependencies_test.rb +11 -0
- data/vendor/rails/activesupport/test/{json.rb → json_test.rb} +15 -5
- data/vendor/rails/railties/CHANGELOG +25 -1
- data/vendor/rails/railties/README +32 -3
- data/vendor/rails/railties/Rakefile +5 -5
- data/vendor/rails/railties/environments/boot.rb +12 -18
- data/vendor/rails/railties/environments/environment.rb +15 -15
- data/vendor/rails/railties/lib/dispatcher.rb +1 -2
- data/vendor/rails/railties/lib/initializer.rb +33 -9
- data/vendor/rails/railties/lib/rails/version.rb +1 -1
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb +1 -1
- data/vendor/rails/railties/lib/rails_generator/generators/components/scaffold_resource/scaffold_resource_generator.rb +1 -0
- data/vendor/rails/railties/lib/railties_path.rb +1 -1
- data/vendor/rails/railties/lib/tasks/framework.rake +4 -4
- data/vendor/rails/railties/lib/tasks/routes.rake +17 -0
- data/vendor/rails/release.rb +2 -2
- metadata +1877 -1848
@@ -0,0 +1,19 @@
|
|
1
|
+
# Uncomment this if you reference any of your controllers in activate
|
2
|
+
# require_dependency 'application'
|
3
|
+
|
4
|
+
class ArchiveExtension < Radiant::Extension
|
5
|
+
version "1.0"
|
6
|
+
description "Provides Archive page types behave similar to a blog or news archive."
|
7
|
+
url "http://dev.radiantcms.org/"
|
8
|
+
|
9
|
+
def activate
|
10
|
+
ArchivePage
|
11
|
+
ArchiveYearIndexPage
|
12
|
+
ArchiveMonthIndexPage
|
13
|
+
ArchiveDayIndexPage
|
14
|
+
end
|
15
|
+
|
16
|
+
def deactivate
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
File without changes
|
@@ -0,0 +1,28 @@
|
|
1
|
+
namespace :radiant do
|
2
|
+
namespace :extensions do
|
3
|
+
namespace :archive do
|
4
|
+
|
5
|
+
desc "Runs the migration of the Archive extension"
|
6
|
+
task :migrate => :environment do
|
7
|
+
require 'radiant/extension_migrator'
|
8
|
+
if ENV["VERSION"]
|
9
|
+
ArchiveExtension.migrator.migrate(ENV["VERSION"].to_i)
|
10
|
+
else
|
11
|
+
ArchiveExtension.migrator.migrate
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
desc "Copies public assets of the Archive to the instance public/ directory."
|
16
|
+
task :update => :environment do
|
17
|
+
is_svn_or_dir = proc {|path| path =~ /\.svn/ || File.directory?(path) }
|
18
|
+
Dir[ArchiveExtension.root + "/public/**/*"].reject(&is_svn_or_dir).each do |file|
|
19
|
+
path = file.sub(ArchiveExtension.root, '')
|
20
|
+
directory = File.dirname(path)
|
21
|
+
puts "Copying #{path}..."
|
22
|
+
mkdir_p RAILS_ROOT + directory
|
23
|
+
cp file, RAILS_ROOT + path
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,397 @@
|
|
1
|
+
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
|
2
|
+
homepage:
|
3
|
+
id: 1
|
4
|
+
title: Ruby Home Page
|
5
|
+
breadcrumb: Home
|
6
|
+
slug: /
|
7
|
+
status_id: 100
|
8
|
+
parent_id:
|
9
|
+
published_at: 2006-01-30 08:41:07
|
10
|
+
documentation:
|
11
|
+
id: 2
|
12
|
+
title: Documentation
|
13
|
+
breadcrumb: Documentation
|
14
|
+
slug: documentation
|
15
|
+
status_id: 100
|
16
|
+
parent_id: 1
|
17
|
+
published_at: 2006-01-30 08:41:07
|
18
|
+
books:
|
19
|
+
id: 3
|
20
|
+
title: Books
|
21
|
+
breadcrumb: Books
|
22
|
+
slug: books
|
23
|
+
status_id: 100
|
24
|
+
parent_id: 2
|
25
|
+
published_at: 2006-01-30 08:41:07
|
26
|
+
textile:
|
27
|
+
id: 4
|
28
|
+
title: Textile
|
29
|
+
breadcrumb: Textile
|
30
|
+
slug: textile
|
31
|
+
status_id: 100
|
32
|
+
parent_id: 1
|
33
|
+
published_at: 2006-01-30 08:41:07
|
34
|
+
radius:
|
35
|
+
id: 5
|
36
|
+
title: Radius Test Page
|
37
|
+
breadcrumb: Radius Test Page
|
38
|
+
slug: radius
|
39
|
+
status_id: 100
|
40
|
+
parent_id: 1
|
41
|
+
created_by: 3
|
42
|
+
published_at: 2006-01-30 08:41:07
|
43
|
+
created_at: 2006-01-30 08:40:00
|
44
|
+
updated_at: 2006-01-31 08:40:00
|
45
|
+
<% for i in 1..3 %>
|
46
|
+
radius_child_<%= i %>:
|
47
|
+
id: <%= 5 + i %>
|
48
|
+
title: Radius Test Child <%= i %>
|
49
|
+
breadcrumb: Radius Test Child <%= i %>
|
50
|
+
slug: child-<%= i %>
|
51
|
+
status_id: 100
|
52
|
+
parent_id: 5
|
53
|
+
created_by: 1
|
54
|
+
published_at: 2006-01-30 08:41:07
|
55
|
+
<% end %>
|
56
|
+
page_with_layout:
|
57
|
+
id: 9
|
58
|
+
title: Page With Layout
|
59
|
+
breadcrumb: Page With Layout
|
60
|
+
slug: page-with-layout
|
61
|
+
status_id: 100
|
62
|
+
layout_id: 1
|
63
|
+
parent_id: 1
|
64
|
+
published_at: 2006-01-30 08:41:07
|
65
|
+
another_page_with_layout:
|
66
|
+
id: 52
|
67
|
+
title: Another Page With Layout
|
68
|
+
breadcrumb: Another Page With Layout
|
69
|
+
slug: another-page-with-layout
|
70
|
+
status_id: 100
|
71
|
+
layout_id: 1
|
72
|
+
parent_id: 1
|
73
|
+
published_at: 2006-01-30 08:41:07
|
74
|
+
child_of_page_with_layout:
|
75
|
+
id: 18
|
76
|
+
title: Child of Page With Layout
|
77
|
+
breadcrumb: Child of Page With Layout
|
78
|
+
slug: child-of-page-with-layout
|
79
|
+
status_id: 100
|
80
|
+
parent_id: 9
|
81
|
+
published_at: 2006-01-30 08:47:07
|
82
|
+
parent:
|
83
|
+
id: 10
|
84
|
+
title: Parent
|
85
|
+
breadcrumb: Parent
|
86
|
+
slug: parent
|
87
|
+
status_id: 100
|
88
|
+
parent_id: 1
|
89
|
+
published_at: 2006-01-30 08:41:07
|
90
|
+
child:
|
91
|
+
id: 11
|
92
|
+
title: Child
|
93
|
+
breadcrumb: Child
|
94
|
+
slug: child
|
95
|
+
status_id: 100
|
96
|
+
parent_id: 10
|
97
|
+
published_at: 2006-01-30 08:41:07
|
98
|
+
archive:
|
99
|
+
id: 12
|
100
|
+
title: Archive
|
101
|
+
breadcrumb: Parent
|
102
|
+
slug: archive
|
103
|
+
class_name: ArchivePage
|
104
|
+
status_id: 100
|
105
|
+
parent_id: 1
|
106
|
+
published_at: 2006-01-30 08:41:07
|
107
|
+
year_index:
|
108
|
+
id: 41
|
109
|
+
title: %Y Archive
|
110
|
+
slug: year
|
111
|
+
class_name: ArchiveYearIndexPage
|
112
|
+
status_id: 101
|
113
|
+
parent_id: 12
|
114
|
+
virtual: true
|
115
|
+
published_at: 2006-02-05 08:44:07
|
116
|
+
month_index:
|
117
|
+
id: 42
|
118
|
+
title: %B %Y Archive
|
119
|
+
slug: month
|
120
|
+
class_name: ArchiveMonthIndexPage
|
121
|
+
status_id: 101
|
122
|
+
parent_id: 12
|
123
|
+
virtual: true
|
124
|
+
published_at: 2006-02-05 08:44:07
|
125
|
+
day_index:
|
126
|
+
id: 43
|
127
|
+
title: %B %d, %Y Archive
|
128
|
+
slug: day
|
129
|
+
class_name: ArchiveDayIndexPage
|
130
|
+
status_id: 101
|
131
|
+
parent_id: 12
|
132
|
+
virtual: true
|
133
|
+
published_at: 2006-02-05 08:44:07
|
134
|
+
article:
|
135
|
+
id: 13
|
136
|
+
title: Article
|
137
|
+
breadcrumb: Article
|
138
|
+
slug: article
|
139
|
+
status_id: 100
|
140
|
+
parent_id: 12
|
141
|
+
published_at: 2000-05-01 08:41:07
|
142
|
+
article2:
|
143
|
+
id: 14
|
144
|
+
title: Article Two
|
145
|
+
breadcrumb: Article Two
|
146
|
+
slug: article-2
|
147
|
+
status_id: 100
|
148
|
+
parent_id: 12
|
149
|
+
published_at: 2000-06-09 08:42:04
|
150
|
+
article3:
|
151
|
+
id: 44
|
152
|
+
title: Article Three
|
153
|
+
breadcrumb: Article Three
|
154
|
+
slug: article-3
|
155
|
+
status_id: 100
|
156
|
+
parent_id: 12
|
157
|
+
published_at: 2000-06-10 12:02:43
|
158
|
+
article4:
|
159
|
+
id: 45
|
160
|
+
title: Article Four
|
161
|
+
breadcrumb: Article Four
|
162
|
+
slug: article-4
|
163
|
+
status_id: 100
|
164
|
+
parent_id: 12
|
165
|
+
published_at: 2000-08-06 03:32:31
|
166
|
+
article5:
|
167
|
+
id: 46
|
168
|
+
title: Article Five
|
169
|
+
breadcrumb: Article Five
|
170
|
+
slug: article-5
|
171
|
+
status_id: 100
|
172
|
+
parent_id: 12
|
173
|
+
published_at: 2001-08-06 03:32:31
|
174
|
+
article_draft:
|
175
|
+
id: 53
|
176
|
+
title: Draft Article
|
177
|
+
breadcrumb: Draft Article
|
178
|
+
slug: draft
|
179
|
+
status_id: 1
|
180
|
+
parent_id: 12
|
181
|
+
draft:
|
182
|
+
id: 15
|
183
|
+
title: Draft Page
|
184
|
+
breadcrumb: Draft Page
|
185
|
+
slug: draft
|
186
|
+
status_id: 1
|
187
|
+
parent_id: 1
|
188
|
+
hidden:
|
189
|
+
id: 16
|
190
|
+
title: Hidden Page
|
191
|
+
breadcrumb: Hidden Page
|
192
|
+
slug: hidden
|
193
|
+
status_id: 101
|
194
|
+
parent_id: 1
|
195
|
+
no_cache:
|
196
|
+
id: 17
|
197
|
+
title: No Cache
|
198
|
+
breadcrumb: No Cache
|
199
|
+
slug: no-cache
|
200
|
+
status_id: 100
|
201
|
+
parent_id: 1
|
202
|
+
class_name: NoCachePage
|
203
|
+
assorted:
|
204
|
+
id: 19
|
205
|
+
title: Assorted Root
|
206
|
+
breadcrumb: No Cache
|
207
|
+
slug: assorted
|
208
|
+
status_id: 100
|
209
|
+
parent_id: 1
|
210
|
+
<% for i in 1..10 %>
|
211
|
+
assorted<%= i %>:
|
212
|
+
id: <%= 19 + i %>
|
213
|
+
title: Assorted <%= i %>
|
214
|
+
breadcrumb: <%= (i + 5) % 10 %>
|
215
|
+
slug: <%= (?a + (10 - i)).chr %>
|
216
|
+
status_id: 100
|
217
|
+
parent_id: 19
|
218
|
+
published_at: 2000-06-10 07:<%= '%02d' % (17 - i) %>:<%= '%02d' % (i + 11) %>
|
219
|
+
<% end %>
|
220
|
+
assorted-draft:
|
221
|
+
id: 40
|
222
|
+
title: Draft
|
223
|
+
breadcrumb: Draft
|
224
|
+
slug: draft
|
225
|
+
status_id: 1
|
226
|
+
parent_id: 19
|
227
|
+
news:
|
228
|
+
id: 30
|
229
|
+
title: News Archives
|
230
|
+
breadcrumb: news
|
231
|
+
slug: news
|
232
|
+
status_id: 100
|
233
|
+
parent_id: 1
|
234
|
+
published_at: 2006-01-30 08:41:07
|
235
|
+
news_child_published:
|
236
|
+
id: 31
|
237
|
+
title: A Great Day for Ruby
|
238
|
+
breadcrumb: news
|
239
|
+
slug: a-great-day-for-ruby
|
240
|
+
status_id: 100
|
241
|
+
parent_id: 30
|
242
|
+
published_at: 2006-01-30 08:41:07
|
243
|
+
news_child_published_2:
|
244
|
+
id: 32
|
245
|
+
title: Another Great Day for Ruby
|
246
|
+
breadcrumb: news
|
247
|
+
slug: another-great-day-for-ruby
|
248
|
+
status_id: 100
|
249
|
+
parent_id: 30
|
250
|
+
published_at: 2006-02-05 08:44:07
|
251
|
+
grandchild:
|
252
|
+
id: 33
|
253
|
+
title: Grandchild
|
254
|
+
breadcrumb: Grandchild
|
255
|
+
slug: grandchild
|
256
|
+
status_id: 100
|
257
|
+
parent_id: 11
|
258
|
+
published_at: 2006-02-05 08:44:07
|
259
|
+
great_grandchild:
|
260
|
+
id: 34
|
261
|
+
title: Great-Grandchild
|
262
|
+
slug: great-grandchild
|
263
|
+
status_id: 100
|
264
|
+
parent_id: 33
|
265
|
+
published_at: 2006-02-05 08:44:07
|
266
|
+
test_page:
|
267
|
+
id: 35
|
268
|
+
title: Test Page
|
269
|
+
slug: test-page
|
270
|
+
class_name: TestPage
|
271
|
+
status_id: 100
|
272
|
+
parent_id: 1
|
273
|
+
published_at: 2006-02-05 08:44:07
|
274
|
+
custom_tags_child:
|
275
|
+
id: 36
|
276
|
+
title: Custom Tags Child
|
277
|
+
slug: child
|
278
|
+
status_id: 100
|
279
|
+
parent_id: 35
|
280
|
+
published_at: 2006-02-05 08:44:07
|
281
|
+
page_with_yaml_config:
|
282
|
+
id: 37
|
283
|
+
title: Page with YAML config
|
284
|
+
slug: page-with-yaml-config
|
285
|
+
status_id: 100
|
286
|
+
parent_id: 1
|
287
|
+
published_at: 2006-02-05 08:44:07
|
288
|
+
small_test:
|
289
|
+
id: 38
|
290
|
+
title: Small Test
|
291
|
+
slug: small-test
|
292
|
+
status_id: 100
|
293
|
+
parent_id: 1
|
294
|
+
published_at: 2006-02-05 08:44:07
|
295
|
+
inheritance_test_page:
|
296
|
+
id: 47
|
297
|
+
title: Inheritance Test Page
|
298
|
+
slug: inheritance-test-page
|
299
|
+
status_id: 100
|
300
|
+
parent_id: 1
|
301
|
+
published_at: 2006-02-05 08:44:07
|
302
|
+
inheritance_test_page_child:
|
303
|
+
id: 48
|
304
|
+
title: Inheritance Test Page Child
|
305
|
+
slug: child
|
306
|
+
status_id: 100
|
307
|
+
parent_id: 47
|
308
|
+
published_at: 2006-02-05 08:44:07
|
309
|
+
inheritance_test_page_grandchild:
|
310
|
+
id: 49
|
311
|
+
title: Inheritance Test Page Grandchild
|
312
|
+
slug: grandchild
|
313
|
+
status_id: 100
|
314
|
+
parent_id: 48
|
315
|
+
published_at: 2006-02-05 08:44:07
|
316
|
+
gallery:
|
317
|
+
id: 50
|
318
|
+
title: Gallery
|
319
|
+
slug: gallery
|
320
|
+
status_id: 100
|
321
|
+
parent_id: 1
|
322
|
+
published_at: 2006-02-05 08:44:07
|
323
|
+
file_not_found:
|
324
|
+
id: 51
|
325
|
+
title: File Not Found
|
326
|
+
slug: missing
|
327
|
+
class_name: FileNotFoundPage
|
328
|
+
status_id: 100
|
329
|
+
parent_id: 50
|
330
|
+
published_at: 2006-02-05 08:44:07
|
331
|
+
page_with_content_type_set_on_layout:
|
332
|
+
id: 54
|
333
|
+
title: Page With Content Type Set On Layout
|
334
|
+
slug: page_with_content_type_set_on_layout
|
335
|
+
status_id: 100
|
336
|
+
layout_id: 2
|
337
|
+
parent_id: 1
|
338
|
+
published_at: 2006-02-05 08:44:07
|
339
|
+
deep_nested_child_for_breadcrumbs:
|
340
|
+
id: 55
|
341
|
+
title: Deeply nested child for testing breadcrumbs
|
342
|
+
slug: deep-nested-child
|
343
|
+
breadcrumb: Deeply nested child
|
344
|
+
status_id: 100
|
345
|
+
parent_id: 6
|
346
|
+
published_at: 2006-02-05 08:44:07
|
347
|
+
homepage_draft:
|
348
|
+
id: 56
|
349
|
+
title: Home Page Draft
|
350
|
+
breadcrumb: Home Page Draft
|
351
|
+
slug: homepage_draft
|
352
|
+
status_id: 1
|
353
|
+
parent_id: 1
|
354
|
+
published_at: 2006-01-30 08:41:07
|
355
|
+
gallery_draft:
|
356
|
+
id: 57
|
357
|
+
title: Gallery Draft
|
358
|
+
slug: gallery_draft
|
359
|
+
status_id: 1
|
360
|
+
parent_id: 50
|
361
|
+
published_at: 2006-02-05 08:44:07
|
362
|
+
custom_404_root:
|
363
|
+
id: 58
|
364
|
+
title: Custom 404 Root
|
365
|
+
slug: custom_404
|
366
|
+
status_id: 100
|
367
|
+
parent_id: 1
|
368
|
+
published_at: 2006-02-05 08:44:07
|
369
|
+
custom_404:
|
370
|
+
id: 59
|
371
|
+
title: Custom File Not Found
|
372
|
+
slug: missing
|
373
|
+
class_name: CustomFileNotFoundPage
|
374
|
+
status_id: 100
|
375
|
+
parent_id: 58
|
376
|
+
published_at: 2006-02-05 08:44:07
|
377
|
+
devtags:
|
378
|
+
id: 60
|
379
|
+
title: Dev Test Page
|
380
|
+
slug: devtags
|
381
|
+
status_id: 100
|
382
|
+
parent_id: 1
|
383
|
+
published_at: 2006-02-05 08:44:07
|
384
|
+
another:
|
385
|
+
id: 61
|
386
|
+
title: Another Page
|
387
|
+
slug: another
|
388
|
+
status_id: 100
|
389
|
+
parent_id: 1
|
390
|
+
published_at: 2006-02-05 08:44:07
|
391
|
+
childless:
|
392
|
+
id: 62
|
393
|
+
title: Childless Page
|
394
|
+
slug: childless
|
395
|
+
status_id: 100
|
396
|
+
parent_id: 1
|
397
|
+
published_at: 2006-02-05 08:44:07
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
|
3
|
+
class ArchiveExtensionTest < Test::Unit::TestCase
|
4
|
+
|
5
|
+
def test_initialization
|
6
|
+
assert_equal File.join(File.expand_path(RAILS_ROOT), 'vendor', 'extensions', 'archive'), ArchiveExtension.root
|
7
|
+
assert_equal 'Archive', ArchiveExtension.extension_name
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_should_define_pages
|
11
|
+
assert defined?(ArchivePage)
|
12
|
+
assert defined?(ArchiveYearIndexPage)
|
13
|
+
assert defined?(ArchiveMonthIndexPage)
|
14
|
+
assert defined?(ArchiveDayIndexPage)
|
15
|
+
end
|
16
|
+
end
|