radiant 0.5.0

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.

Files changed (205) hide show
  1. data/CHANGELOG +1 -0
  2. data/CONTRIBUTORS +12 -0
  3. data/LICENSE +9 -0
  4. data/README +91 -0
  5. data/Rakefile +10 -0
  6. data/app/behaviors/archive_behavior.rb +42 -0
  7. data/app/behaviors/archive_day_index_behavior.rb +30 -0
  8. data/app/behaviors/archive_month_index_behavior.rb +30 -0
  9. data/app/behaviors/archive_year_index_behavior.rb +30 -0
  10. data/app/behaviors/env_behavior.rb +18 -0
  11. data/app/behaviors/page_missing_behavior.rb +31 -0
  12. data/app/controllers/admin/export_controller.rb +8 -0
  13. data/app/controllers/admin/layout_controller.rb +23 -0
  14. data/app/controllers/admin/model_controller.rb +119 -0
  15. data/app/controllers/admin/page_controller.rb +119 -0
  16. data/app/controllers/admin/snippet_controller.rb +6 -0
  17. data/app/controllers/admin/user_controller.rb +45 -0
  18. data/app/controllers/admin/welcome_controller.rb +39 -0
  19. data/app/controllers/application.rb +32 -0
  20. data/app/controllers/site_controller.rb +54 -0
  21. data/app/filters/markdown_filter.rb +9 -0
  22. data/app/filters/textile_filter.rb +9 -0
  23. data/app/helpers/admin/export_helper.rb +2 -0
  24. data/app/helpers/admin/layout_helper.rb +2 -0
  25. data/app/helpers/admin/page_helper.rb +10 -0
  26. data/app/helpers/admin/snippet_helper.rb +2 -0
  27. data/app/helpers/admin/user_helper.rb +2 -0
  28. data/app/helpers/admin/welcome_helper.rb +2 -0
  29. data/app/helpers/application_helper.rb +141 -0
  30. data/app/helpers/site_helper.rb +2 -0
  31. data/app/models/archive_finder.rb +66 -0
  32. data/app/models/behavior.rb +194 -0
  33. data/app/models/layout.rb +13 -0
  34. data/app/models/page.rb +91 -0
  35. data/app/models/page_context.rb +526 -0
  36. data/app/models/page_part.rb +13 -0
  37. data/app/models/radiant/config.rb +53 -0
  38. data/app/models/radiant/exporter.rb +11 -0
  39. data/app/models/response_cache.rb +112 -0
  40. data/app/models/snippet.rb +16 -0
  41. data/app/models/status.rb +31 -0
  42. data/app/models/text_filter.rb +11 -0
  43. data/app/models/user.rb +70 -0
  44. data/app/models/user_action_observer.rb +13 -0
  45. data/app/views/admin/layout/index.rhtml +38 -0
  46. data/app/views/admin/layout/new.rhtml +37 -0
  47. data/app/views/admin/layout/remove.rhtml +17 -0
  48. data/app/views/admin/page/_node.rhtml +51 -0
  49. data/app/views/admin/page/_part.rhtml +17 -0
  50. data/app/views/admin/page/children.rhtml +4 -0
  51. data/app/views/admin/page/index.rhtml +172 -0
  52. data/app/views/admin/page/new.rhtml +164 -0
  53. data/app/views/admin/page/remove.rhtml +14 -0
  54. data/app/views/admin/snippet/index.rhtml +36 -0
  55. data/app/views/admin/snippet/new.rhtml +28 -0
  56. data/app/views/admin/snippet/remove.rhtml +16 -0
  57. data/app/views/admin/user/index.rhtml +43 -0
  58. data/app/views/admin/user/new.rhtml +48 -0
  59. data/app/views/admin/user/preferences.rhtml +29 -0
  60. data/app/views/admin/user/remove.rhtml +16 -0
  61. data/app/views/admin/welcome/login.rhtml +51 -0
  62. data/app/views/layouts/application.rhtml +75 -0
  63. data/app/views/site/not_found.rhtml +3 -0
  64. data/bin/radiant +305 -0
  65. data/config/boot.rb +80 -0
  66. data/config/database.mysql.yml +20 -0
  67. data/config/database.postgresql.yml +20 -0
  68. data/config/database.sqlite.yml +20 -0
  69. data/config/environment.rb +76 -0
  70. data/config/environments/development.rb +20 -0
  71. data/config/environments/production.rb +22 -0
  72. data/config/environments/test.rb +20 -0
  73. data/config/locomotive.yml +6 -0
  74. data/config/routes.rb +64 -0
  75. data/db/development_structure.sql +80 -0
  76. data/db/migrate/001_create_radiant_tables.rb +73 -0
  77. data/db/migrate/002_insert_initial_data.rb +45 -0
  78. data/db/migrate/003_rename_behavior_column.rb +9 -0
  79. data/db/migrate/004_rename_filter_column.rb +11 -0
  80. data/db/migrate/005_add_virtual_column_to_page.rb +9 -0
  81. data/db/migrate/006_integer_columns_to_boolean.rb +11 -0
  82. data/db/migrate/007_remove_virtual_column_from_page.rb +9 -0
  83. data/db/migrate/008_add_virtual_column_to_page_again.rb +9 -0
  84. data/db/migrate/009_add_content_type_field_to_layout.rb +9 -0
  85. data/db/schema.rb +74 -0
  86. data/db/templates/empty.yml +2 -0
  87. data/db/templates/simple-blog.yml +197 -0
  88. data/db/templates/styled-blog.yml +472 -0
  89. data/lib/advanced_delegation.rb +21 -0
  90. data/lib/archive_index_behavior_tags_and_methods.rb +48 -0
  91. data/lib/generators/behavior/USAGE +16 -0
  92. data/lib/generators/behavior/behavior_generator.rb +22 -0
  93. data/lib/generators/behavior/templates/model.rb.template +9 -0
  94. data/lib/generators/behavior/templates/unit_test.rb.template +16 -0
  95. data/lib/generators/filter/USAGE +16 -0
  96. data/lib/generators/filter/filter_generator.rb +22 -0
  97. data/lib/generators/filter/templates/model.rb.template +8 -0
  98. data/lib/generators/filter/templates/unit_test.rb.template +7 -0
  99. data/lib/inheritable_class_attributes.rb +65 -0
  100. data/lib/login_system.rb +80 -0
  101. data/lib/plugins/index_quoting_fix/init.rb +32 -0
  102. data/lib/plugins/string_io/init.rb +2 -0
  103. data/lib/radiant.rb +5 -0
  104. data/lib/registerable.rb +70 -0
  105. data/lib/tasks/release.rake +84 -0
  106. data/public/404.html +8 -0
  107. data/public/500.html +8 -0
  108. data/public/dispatch.cgi +10 -0
  109. data/public/dispatch.fcgi +24 -0
  110. data/public/dispatch.rb +10 -0
  111. data/public/favicon.ico +0 -0
  112. data/public/images/add-child.png +0 -0
  113. data/public/images/brown-bottom-line.gif +0 -0
  114. data/public/images/clear-page-cache.png +0 -0
  115. data/public/images/collapse.png +0 -0
  116. data/public/images/expand.png +0 -0
  117. data/public/images/minus.png +0 -0
  118. data/public/images/new-homepage.png +0 -0
  119. data/public/images/new-layout.png +0 -0
  120. data/public/images/new-snippet.png +0 -0
  121. data/public/images/new-user.png +0 -0
  122. data/public/images/page.png +0 -0
  123. data/public/images/plus.png +0 -0
  124. data/public/images/remove-disabled.png +0 -0
  125. data/public/images/remove.png +0 -0
  126. data/public/images/snippet.png +0 -0
  127. data/public/images/spinner.gif +0 -0
  128. data/public/images/view-site.gif +0 -0
  129. data/public/images/virtual-page.png +0 -0
  130. data/public/javascripts/application.js +2 -0
  131. data/public/javascripts/controls.js +815 -0
  132. data/public/javascripts/dragdrop.js +913 -0
  133. data/public/javascripts/effects.js +958 -0
  134. data/public/javascripts/pngfix.js +78 -0
  135. data/public/javascripts/prototype.js +2006 -0
  136. data/public/javascripts/ruledtable.js +28 -0
  137. data/public/javascripts/string.js +23 -0
  138. data/public/javascripts/tabcontrol.js +140 -0
  139. data/public/robots.txt +1 -0
  140. data/public/stylesheets/admin.css +464 -0
  141. data/script/about +3 -0
  142. data/script/breakpointer +3 -0
  143. data/script/console +3 -0
  144. data/script/destroy +3 -0
  145. data/script/generate +3 -0
  146. data/script/performance/benchmarker +3 -0
  147. data/script/performance/profiler +3 -0
  148. data/script/plugin +3 -0
  149. data/script/process/reaper +3 -0
  150. data/script/process/spawner +3 -0
  151. data/script/process/spinner +3 -0
  152. data/script/runner +3 -0
  153. data/script/server +3 -0
  154. data/script/setup_database +297 -0
  155. data/test/fixtures/layouts.yml +26 -0
  156. data/test/fixtures/page_parts.yml +99 -0
  157. data/test/fixtures/pages.yml +359 -0
  158. data/test/fixtures/pages.yml.rej +28 -0
  159. data/test/fixtures/snippets.yml +18 -0
  160. data/test/fixtures/users.yml +30 -0
  161. data/test/functional/admin/export_controller_test.rb +22 -0
  162. data/test/functional/admin/layout_controller_test.rb +40 -0
  163. data/test/functional/admin/model_controller_test.rb +152 -0
  164. data/test/functional/admin/page_controller_test.rb +179 -0
  165. data/test/functional/admin/snippet_controller_test.rb +11 -0
  166. data/test/functional/admin/user_controller_test.rb +71 -0
  167. data/test/functional/admin/welcome_controller_test.rb +48 -0
  168. data/test/functional/application_controller_test.rb +44 -0
  169. data/test/functional/login_system_test.rb +155 -0
  170. data/test/functional/site_controller_test.rb +172 -0
  171. data/test/helpers/archive_index_test_helper.rb +35 -0
  172. data/test/helpers/behavior_render_test_helper.rb +34 -0
  173. data/test/helpers/behavior_test_helper.rb +47 -0
  174. data/test/helpers/caching_test_helper.rb +41 -0
  175. data/test/helpers/layout_test_helper.rb +35 -0
  176. data/test/helpers/page_part_test_helper.rb +49 -0
  177. data/test/helpers/page_test_helper.rb +36 -0
  178. data/test/helpers/snippet_test_helper.rb +32 -0
  179. data/test/helpers/user_test_helper.rb +34 -0
  180. data/test/helpers/validation_test_helper.rb +42 -0
  181. data/test/test_helper.rb +54 -0
  182. data/test/unit/behavior_test.rb +196 -0
  183. data/test/unit/behaviors/archive_behavior_test.rb +33 -0
  184. data/test/unit/behaviors/archive_day_index_behavior_test.rb +21 -0
  185. data/test/unit/behaviors/archive_month_index_behavior_test.rb +21 -0
  186. data/test/unit/behaviors/archive_year_index_behavior_test.rb +21 -0
  187. data/test/unit/behaviors/page_missing_behavior_test.rb +27 -0
  188. data/test/unit/filters/markdown_filter_test.rb +14 -0
  189. data/test/unit/filters/textile_filter_test.rb +14 -0
  190. data/test/unit/inheritable_class_attributes_test.rb +47 -0
  191. data/test/unit/layout_test.rb +29 -0
  192. data/test/unit/page_context_test.rb +375 -0
  193. data/test/unit/page_context_test.rb.rej +26 -0
  194. data/test/unit/page_part_test.rb +44 -0
  195. data/test/unit/page_test.rb +224 -0
  196. data/test/unit/radiant/config_test.rb +46 -0
  197. data/test/unit/radiant/exporter_test.rb +26 -0
  198. data/test/unit/registerable_test.rb +68 -0
  199. data/test/unit/response_cache_test.rb +133 -0
  200. data/test/unit/snippet_test.rb +47 -0
  201. data/test/unit/status_test.rb +43 -0
  202. data/test/unit/text_filter_test.rb +14 -0
  203. data/test/unit/user_action_observer_test.rb +40 -0
  204. data/test/unit/user_test.rb +138 -0
  205. metadata +355 -0
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/about'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/breakpointer'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/console'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/destroy'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/generate'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../../config/boot'
3
+ require 'commands/performance/benchmarker'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../../config/boot'
3
+ require 'commands/performance/profiler'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/plugin'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../../config/boot'
3
+ require 'commands/process/reaper'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../../config/boot'
3
+ require 'commands/process/spawner'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../../config/boot'
3
+ require 'commands/process/spinner'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/runner'
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require File.dirname(__FILE__) + '/../config/boot'
3
+ require 'commands/server'
@@ -0,0 +1,297 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ RAILS_ENV = 'development'
4
+
5
+ require 'optparse'
6
+
7
+ class DatabaseSetupApplication
8
+ def self.run(args = ARGV)
9
+ new.run(args)
10
+ end
11
+
12
+ attr_reader :params, :force, :help, :env
13
+
14
+ def run(args = [])
15
+ parse_args(args)
16
+ announce_additional_options
17
+ load_environment
18
+ overwrite_check
19
+ create_tables
20
+ create_admin_user
21
+ initialize_configuration
22
+ if @template_filename
23
+ @template = load_template(@template_filename)
24
+ else
25
+ select_template
26
+ end
27
+ create_records_from_template
28
+ announce_finished
29
+ end
30
+
31
+ def parse_args(args)
32
+ args = args.dup
33
+ @env = args.pop.downcase if args.last =~ /^(development|production|test)$/i
34
+ @env ||= 'development'
35
+ @overwrite_warning = true
36
+ @template_filename = nil
37
+
38
+ opts = OptionParser.new do |opts|
39
+ opts.banner = "Usage: #{File.basename($0)} [options] [environment]"
40
+ opts.separator "Setup Radiant database for the appropriate environment. Environment may be 'development', 'production', or 'test'."
41
+ opts.separator ""
42
+
43
+ opts.separator "Options:"
44
+
45
+ opts.on("-o", "--overwrite", "Overwrite all data in tables. Do not display the overwrite warning.") do
46
+ @overwrite_warning = false
47
+ end
48
+
49
+ opts.on("-t", "--template FILENAME", "Use the template specified in FILENAME.") do |filename|
50
+ @template_filename = filename
51
+ end
52
+
53
+ opts.on("-?", "--help") do
54
+ puts opts
55
+ exit
56
+ end
57
+ end
58
+
59
+ begin
60
+ opts.parse(args)
61
+ rescue OptionParser::ParseError => e
62
+ puts e.message.capitalize
63
+ puts
64
+ puts opts
65
+ exit
66
+ end
67
+
68
+ RAILS_ENV.replace(@env)
69
+ end
70
+
71
+ def announce_additional_options
72
+ puts "Run `#{File.basename($0)} --help` for information on additional options."
73
+ puts
74
+ end
75
+
76
+ def load_environment
77
+ announce "Loading #{env} environment" do
78
+ require File.join(File.dirname(__FILE__), '..', 'config', 'environment')
79
+ @templates_dir = File.join(RADIANT_ROOT, 'db', 'templates')
80
+ end
81
+ end
82
+
83
+ def overwrite_check
84
+ if @overwrite_warning
85
+ puts
86
+ if ask_yes_or_no "WARNING! This script will overwrite information currently stored in the\n" +
87
+ "database #{(ActiveRecord::Base.configurations[env]['database']).inspect}. " +
88
+ "Are you sure you want to continue"
89
+ puts
90
+ else
91
+ puts
92
+ puts "Setup canceled."
93
+ exit
94
+ end
95
+ end
96
+ end
97
+
98
+ def create_tables
99
+ announce "Creating tables" do
100
+ puts
101
+ ActiveRecord::Schema.define(:version => 9) do
102
+
103
+ drop_table "config" rescue nil
104
+ create_table "config", :force => true do |t|
105
+ t.column "key", :string, :limit => 40, :default => "", :null => false
106
+ t.column "value", :string, :default => ""
107
+ end
108
+ add_index "config", ["key"], :name => "key", :unique => true
109
+
110
+ drop_table "layouts" rescue nil
111
+ create_table "layouts", :force => true do |t|
112
+ t.column "name", :string, :limit => 100
113
+ t.column "content", :text
114
+ t.column "content_type", :string, :limit => 40
115
+ t.column "created_at", :datetime
116
+ t.column "updated_at", :datetime
117
+ t.column "created_by", :integer
118
+ t.column "updated_by", :integer
119
+ end
120
+
121
+ drop_table "page_parts" rescue nil
122
+ create_table "page_parts", :force => true do |t|
123
+ t.column "name", :string, :limit => 100
124
+ t.column "filter_id", :string, :limit => 25
125
+ t.column "content", :text
126
+ t.column "page_id", :integer
127
+ end
128
+
129
+ drop_table "pages" rescue nil
130
+ create_table "pages", :force => true do |t|
131
+ t.column "title", :string
132
+ t.column "slug", :string, :limit => 100
133
+ t.column "breadcrumb", :string, :limit => 160
134
+ t.column "parent_id", :integer
135
+ t.column "layout_id", :integer
136
+ t.column "behavior_id", :string, :limit => 25
137
+ t.column "status_id", :integer, :default => 1, :null => false
138
+ t.column "created_at", :datetime
139
+ t.column "updated_at", :datetime
140
+ t.column "published_at", :datetime
141
+ t.column "created_by", :integer
142
+ t.column "updated_by", :integer
143
+ t.column "virtual", :boolean, :default => false, :null => false
144
+ end
145
+
146
+ drop_table "snippets" rescue nil
147
+ create_table "snippets", :force => true do |t|
148
+ t.column "name", :string, :limit => 100, :default => "", :null => false
149
+ t.column "filter_id", :string, :limit => 25
150
+ t.column "content", :text
151
+ t.column "created_at", :datetime
152
+ t.column "updated_at", :datetime
153
+ t.column "created_by", :integer
154
+ t.column "updated_by", :integer
155
+ end
156
+ add_index "snippets", ["name"], :name => "name", :unique => true
157
+
158
+ drop_table "users" rescue nil
159
+ create_table "users", :force => true do |t|
160
+ t.column "name", :string, :limit => 100
161
+ t.column "email", :string
162
+ t.column "login", :string, :limit => 40, :default => "", :null => false
163
+ t.column "password", :string, :limit => 40
164
+ t.column "admin", :boolean, :default => false, :null => false
165
+ t.column "developer", :boolean, :default => false, :null => false
166
+ t.column "created_at", :datetime
167
+ t.column "updated_at", :datetime
168
+ t.column "created_by", :integer
169
+ t.column "updated_by", :integer
170
+ end
171
+ add_index "users", ["login"], :name => "login", :unique => true
172
+ end
173
+ end
174
+ end
175
+
176
+ def create_admin_user
177
+ announce "Creating user 'admin' with password 'radiant'" do
178
+ @admin = User.create :name => 'Administrator', :login => 'admin', :password => 'radiant', :password_confirmation => 'radiant', :admin => true
179
+ @admin = User.find(@admin.id)
180
+ UserActionObserver.current_user = @admin
181
+ @admin.created_by = @admin
182
+ @admin.save
183
+ end
184
+ end
185
+
186
+ def initialize_configuration
187
+ announce "Initializing configuration" do
188
+ config = Radiant::Config
189
+ config['admin.title' ] = 'Radiant CMS'
190
+ config['admin.subtitle'] = 'Publishing for Small Teams'
191
+ config['default.parts' ] = 'body, extended'
192
+ end
193
+ end
194
+
195
+ def select_template
196
+ templates = Dir[File.join(@templates_dir, '*.yml')]
197
+ templates.map! { |t| load_template(t) }
198
+ templates = templates.sort_by { |t| t['name'] }
199
+ loop do
200
+ puts
201
+ puts "Select a database template:"
202
+ templates.each_with_index do |t, i|
203
+ puts
204
+ puts " #{i + 1}) #{t['name']}"
205
+ t['description'].each_line { |line| puts " #{line.strip}" }
206
+ end
207
+ puts
208
+ print "[1-#{templates.size}] "
209
+ selection = $1.to_i if gets.strip =~ /^(\d+)$/
210
+ case selection
211
+ when (1..templates.size)
212
+ @template = templates[selection-1]
213
+ puts
214
+ break
215
+ else
216
+ puts
217
+ invalid_option
218
+ end
219
+ end
220
+ end
221
+
222
+ def load_template(template)
223
+ YAML.load_file(template)
224
+ end
225
+
226
+ def create_records_from_template
227
+ records = @template['records']
228
+ if records
229
+ records.keys.each do |key|
230
+ announce "Creating #{key.to_s.underscore.humanize}" do
231
+ const = Object.const_get(key.to_s.singularize)
232
+ record_pairs = records[key].map { |name, record| [record['id'], record] }.sort { |a, b| a[0] <=> b[0] }
233
+ record_pairs.each do |id, record|
234
+ const.new(record).save
235
+ end
236
+ end
237
+ end
238
+ end
239
+ end
240
+
241
+ def announce_finished
242
+ puts
243
+ puts "Finished."
244
+ end
245
+
246
+ def print(*args)
247
+ $defout << args
248
+ $defout.flush
249
+ end
250
+
251
+ def puts(*args)
252
+ args << '' if args.size == 0
253
+ print *(args.map { |a| "#{a}\n" })
254
+ end
255
+
256
+ def announce(something)
257
+ print "#{something}..."
258
+ yield
259
+ puts "OK"
260
+ rescue Exception => e
261
+ puts "FAILED"
262
+ raise e
263
+ end
264
+
265
+ def invalid_option
266
+ puts "Invalid option."
267
+ puts
268
+ end
269
+
270
+ def gets
271
+ $stdin.gets
272
+ end
273
+
274
+ def ask_yes_or_no(question, default = :yes)
275
+ prompt = (default == :yes) ? "[Yn]" : "[yN]"
276
+ loop do
277
+ print "#{question}? #{prompt} "
278
+ case gets.strip.downcase
279
+ when "yes", "y"
280
+ break true
281
+ when "no", "n"
282
+ break false
283
+ when ""
284
+ break default == :yes
285
+ else
286
+ puts
287
+ invalid_option
288
+ end
289
+ end
290
+ end
291
+ end
292
+
293
+ trap('INT') do
294
+ puts
295
+ exit
296
+ end
297
+ DatabaseSetupApplication.run
@@ -0,0 +1,26 @@
1
+ # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2
+ main:
3
+ id: 1
4
+ name: Home Page
5
+ content: |
6
+ <html>
7
+ <head>
8
+ <title><r:title /></title>
9
+ </head>
10
+ <body>
11
+ <r:content />
12
+ </body>
13
+ </html>
14
+ utf8:
15
+ id: 2
16
+ name: UTF-8 Layout
17
+ content_type: text/html;charset=utf8
18
+ content: |
19
+ <html>
20
+ <head>
21
+ <title><r:title /></title>
22
+ </head>
23
+ <body>
24
+ <r:content />
25
+ </body>
26
+ </html>
@@ -0,0 +1,99 @@
1
+ # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2
+ body:
3
+ id: 1
4
+ name: body
5
+ content: This is the body portion of the Ruby home page.
6
+ page_id: 1
7
+ extended:
8
+ id: 2
9
+ name: extended
10
+ content: This is an extended portion of the Ruby home page.
11
+ page_id: 1
12
+ summary:
13
+ id: 3
14
+ name: summary
15
+ content: This is a summary.
16
+ page_id: 1
17
+ sidebar:
18
+ id: 4
19
+ name: sidebar
20
+ content: <r:title /> sidebar.
21
+ page_id: 1
22
+ documentation_body:
23
+ id: 5
24
+ name: body
25
+ content: This is the documentation section.
26
+ page_id: 2
27
+ books_body:
28
+ id: 6
29
+ name: body
30
+ content: This is the books page.
31
+ page_id: 3
32
+ textile_body:
33
+ id: 7
34
+ name: body
35
+ content: Some *Textile* content.
36
+ filter_id: Textile
37
+ page_id: 4
38
+ radius_body:
39
+ id: 8
40
+ name: body
41
+ content: |
42
+ h1. <r:page:title />
43
+
44
+ <r:page:children:each>* <r:child:title />
45
+ </r:page:children:each>
46
+ filter_id: Textile
47
+ page_id: 5
48
+ radius__extended:
49
+ id: 9
50
+ name: extended
51
+ content: |
52
+ Just a test.
53
+ page_id: 5
54
+ <% for i in 1..3 %>
55
+ radius_child_<%= i %>_body:
56
+ id: <%= 9 + i %>
57
+ name: body
58
+ content: |
59
+ Radius test child <%= i %> body.
60
+ page_id: <%= 5 + i %>
61
+ <% end %>
62
+ radius_child_2_extended:
63
+ id: 13
64
+ name: extended
65
+ content: |
66
+ Extended content for Radius test.
67
+ page_id: 7
68
+ page_with_layout_body:
69
+ id: 14
70
+ name: body
71
+ content: <r:page:title />
72
+ page_id: 9
73
+ custom_tags_body:
74
+ id: 15
75
+ name: body
76
+ content: <r:test1 /> <r:test2 />
77
+ page_id: 35
78
+ custom_tags_child_body:
79
+ id: 16
80
+ name: body
81
+ content: <r:test />
82
+ page_id: 36
83
+ page_with_yaml_config_part:
84
+ id: 17
85
+ name: config
86
+ content: |
87
+ test: true
88
+ cool: beans
89
+ page_id: 37
90
+ small_test_part:
91
+ id: 18
92
+ name: body
93
+ content: test
94
+ page_id: 38
95
+ inheritance_test_part:
96
+ id: 19
97
+ name: body
98
+ content: <r:title /> inherited body.
99
+ page_id: 47