zen 0.3 → 0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (373) hide show
  1. data/.gems +3 -2
  2. data/.rvmrc +1 -1
  3. data/.travis.yml +5 -0
  4. data/.yardopts +2 -1
  5. data/LICENSE +1 -1
  6. data/README.md +28 -24
  7. data/Rakefile +5 -2
  8. data/guide/asset_management.md +6 -6
  9. data/guide/autosaving_forms.md +42 -0
  10. data/guide/changelog.md +41 -0
  11. data/guide/faq.md +49 -0
  12. data/guide/getting_started.md +24 -13
  13. data/guide/hacking.md +40 -9
  14. data/guide/images/categories/categories.png +0 -0
  15. data/guide/images/categories/category_groups.png +0 -0
  16. data/guide/images/categories/new_category.png +0 -0
  17. data/guide/images/categories/new_category_group.png +0 -0
  18. data/guide/images/comments/comments.png +0 -0
  19. data/guide/images/comments/edit_comment.png +0 -0
  20. data/guide/images/custom_fields/custom_field_groups.png +0 -0
  21. data/guide/images/custom_fields/custom_field_types.png +0 -0
  22. data/guide/images/custom_fields/custom_fields.png +0 -0
  23. data/guide/images/custom_fields/edit_custom_field_general.png +0 -0
  24. data/guide/images/custom_fields/edit_custom_field_group.png +0 -0
  25. data/guide/images/custom_fields/edit_custom_field_settings.png +0 -0
  26. data/guide/images/custom_fields/edit_custom_field_type.png +0 -0
  27. data/guide/images/dashboard/added.png +0 -0
  28. data/guide/images/dashboard/columns.png +0 -0
  29. data/guide/images/dashboard/dashboard.png +0 -0
  30. data/guide/images/dashboard/options.png +0 -0
  31. data/guide/images/menus/edit_menu.png +0 -0
  32. data/guide/images/menus/edit_menu_item.png +0 -0
  33. data/guide/images/menus/menu_item_hierarchy.png +0 -0
  34. data/guide/images/menus/menu_items.png +0 -0
  35. data/guide/images/menus/menus.png +0 -0
  36. data/guide/images/sections/edit_entry.png +0 -0
  37. data/guide/images/sections/edit_entry_categories.png +0 -0
  38. data/guide/images/sections/edit_entry_general.png +0 -0
  39. data/guide/images/sections/edit_entry_meta.png +0 -0
  40. data/guide/images/sections/edit_section_comments.png +0 -0
  41. data/guide/images/sections/edit_section_general.png +0 -0
  42. data/guide/images/sections/edit_section_groups.png +0 -0
  43. data/guide/images/sections/entries.png +0 -0
  44. data/guide/images/sections/sections.png +0 -0
  45. data/guide/images/settings/overview_general.png +0 -0
  46. data/guide/images/settings/overview_security.png +0 -0
  47. data/guide/images/settings/overview_user.png +0 -0
  48. data/guide/images/users/edit_user.png +0 -0
  49. data/guide/images/users/edit_user_group.png +0 -0
  50. data/guide/images/users/edit_user_group_permissions.png +0 -0
  51. data/guide/images/users/edit_user_permissions.png +0 -0
  52. data/guide/images/users/overview.png +0 -0
  53. data/guide/images/users/user_groups_overview.png +0 -0
  54. data/guide/installation.md +7 -1
  55. data/guide/javascript.md +36 -273
  56. data/guide/javascript/zen_autosave.md +26 -0
  57. data/guide/javascript/zen_editor.md +83 -0
  58. data/guide/javascript/zen_hash.md +34 -0
  59. data/guide/javascript/zen_htmltable.md +78 -0
  60. data/guide/javascript/zen_tabs.md +44 -0
  61. data/guide/javascript/zen_window.md +49 -0
  62. data/guide/zen_compared.md +201 -0
  63. data/lib/vendor/sequel_sluggable.rb +1 -1
  64. data/lib/zen.rb +64 -44
  65. data/lib/zen/asset_groups.rb +10 -10
  66. data/lib/zen/bin/create.rb +8 -1
  67. data/lib/zen/helper/breadcrumb.rb +4 -12
  68. data/lib/zen/helper/controller.rb +209 -6
  69. data/lib/zen/helper/locale.rb +19 -0
  70. data/lib/zen/helper/search.rb +1 -1
  71. data/lib/zen/helper/stacked_aspect.rb +7 -43
  72. data/lib/zen/helper/theme.rb +3 -3
  73. data/lib/zen/language.rb +5 -10
  74. data/lib/zen/language/translation.rb +1 -1
  75. data/lib/zen/layout/admin.xhtml +41 -25
  76. data/lib/zen/layout/login.xhtml +8 -3
  77. data/lib/zen/migrator.rb +54 -0
  78. data/lib/zen/model/helper.rb +20 -1
  79. data/lib/zen/model/init.rb +2 -0
  80. data/lib/zen/model/plugin/events.rb +158 -0
  81. data/lib/zen/package.rb +32 -6
  82. data/lib/zen/package/all.rb +1 -0
  83. data/lib/zen/package/categories/lib/categories.rb +6 -6
  84. data/lib/zen/package/categories/lib/categories/controller/categories.rb +20 -83
  85. data/lib/zen/package/categories/lib/categories/controller/category_groups.rb +23 -74
  86. data/lib/zen/package/categories/lib/categories/model/category.rb +58 -1
  87. data/lib/zen/package/categories/lib/categories/model/category_group.rb +62 -2
  88. data/lib/zen/package/categories/lib/categories/view/admin/categories/form.xhtml +46 -40
  89. data/lib/zen/package/categories/lib/categories/view/admin/categories/index.xhtml +74 -75
  90. data/lib/zen/package/categories/lib/categories/view/admin/category-groups/form.xhtml +27 -24
  91. data/lib/zen/package/categories/lib/categories/view/admin/category-groups/index.xhtml +83 -86
  92. data/lib/zen/package/comments/lib/comments.rb +5 -5
  93. data/lib/zen/package/comments/lib/comments/controller/comments.rb +12 -64
  94. data/lib/zen/package/comments/lib/comments/controller/comments_form.rb +4 -22
  95. data/lib/zen/package/comments/lib/comments/model/comment.rb +65 -16
  96. data/lib/zen/package/comments/lib/comments/view/admin/comments/form.xhtml +52 -49
  97. data/lib/zen/package/comments/lib/comments/view/admin/comments/index.xhtml +52 -60
  98. data/lib/zen/package/comments/migrations/1308774099_comment_status.rb +1 -1
  99. data/lib/zen/package/custom_fields/lib/custom_fields.rb +11 -13
  100. data/lib/zen/package/custom_fields/lib/custom_fields/blue_form_parameters.rb +29 -13
  101. data/lib/zen/package/custom_fields/lib/custom_fields/controller/custom_field_groups.rb +21 -50
  102. data/lib/zen/package/custom_fields/lib/custom_fields/controller/custom_field_types.rb +27 -71
  103. data/lib/zen/package/custom_fields/lib/custom_fields/controller/custom_fields.rb +25 -78
  104. data/lib/zen/package/custom_fields/lib/custom_fields/model/custom_field.rb +48 -1
  105. data/lib/zen/package/custom_fields/lib/custom_fields/model/custom_field_group.rb +35 -1
  106. data/lib/zen/package/custom_fields/lib/custom_fields/model/custom_field_method.rb +3 -0
  107. data/lib/zen/package/custom_fields/lib/custom_fields/model/custom_field_type.rb +40 -1
  108. data/lib/zen/package/custom_fields/lib/custom_fields/model/custom_field_value.rb +1 -0
  109. data/lib/zen/package/custom_fields/lib/custom_fields/view/admin/custom-field-groups/form.xhtml +29 -26
  110. data/lib/zen/package/custom_fields/lib/custom_fields/view/admin/custom-field-groups/index.xhtml +96 -100
  111. data/lib/zen/package/custom_fields/lib/custom_fields/view/admin/custom-field-types/form.xhtml +56 -53
  112. data/lib/zen/package/custom_fields/lib/custom_fields/view/admin/custom-field-types/index.xhtml +82 -82
  113. data/lib/zen/package/custom_fields/lib/custom_fields/view/admin/custom-fields/form.xhtml +88 -85
  114. data/lib/zen/package/custom_fields/lib/custom_fields/view/admin/custom-fields/index.xhtml +83 -80
  115. data/lib/zen/package/dashboard/lib/dashboard.rb +28 -0
  116. data/lib/zen/package/dashboard/lib/dashboard/controller/dashboard.rb +154 -0
  117. data/lib/zen/package/dashboard/lib/dashboard/language/en/dashboard.rb +35 -0
  118. data/lib/zen/package/dashboard/lib/dashboard/language/nl/dashboard.rb +36 -0
  119. data/lib/zen/package/dashboard/lib/dashboard/model/widget.rb +45 -0
  120. data/lib/zen/package/dashboard/lib/dashboard/public/admin/dashboard/css/dashboard.css +74 -0
  121. data/lib/zen/package/dashboard/lib/dashboard/public/admin/dashboard/js/dashboard.js +102 -0
  122. data/lib/zen/package/dashboard/lib/dashboard/view/admin/index.xhtml +29 -0
  123. data/lib/zen/package/dashboard/lib/dashboard/view/admin/widget/welcome.xhtml +28 -0
  124. data/lib/zen/package/dashboard/lib/dashboard/widget.rb +292 -0
  125. data/lib/zen/package/dashboard/lib/dashboard/widget/welcome.rb +9 -0
  126. data/lib/zen/package/dashboard/migrations/1326411254_create_schema.rb +28 -0
  127. data/lib/zen/package/extensions/lib/extensions.rb +5 -5
  128. data/lib/zen/package/extensions/lib/extensions/view/admin/extensions/index.xhtml +72 -67
  129. data/lib/zen/package/menu.rb +6 -1
  130. data/lib/zen/package/menus/lib/menus.rb +6 -4
  131. data/lib/zen/package/menus/lib/menus/controller/menu_items.rb +69 -104
  132. data/lib/zen/package/menus/lib/menus/controller/menus.rb +19 -76
  133. data/lib/zen/package/menus/lib/menus/helper/menu.rb +54 -38
  134. data/lib/zen/package/menus/lib/menus/helper/menu_frontend.rb +7 -13
  135. data/lib/zen/package/menus/lib/menus/model/menu.rb +158 -2
  136. data/lib/zen/package/menus/lib/menus/model/menu_item.rb +73 -10
  137. data/lib/zen/package/menus/lib/menus/public/admin/menus/css/menus.css +47 -0
  138. data/lib/zen/package/menus/lib/menus/public/admin/menus/js/lib/nested_sortables.js +549 -0
  139. data/lib/zen/package/menus/lib/menus/public/admin/menus/js/menu_items.js +38 -0
  140. data/lib/zen/package/menus/lib/menus/view/admin/menu-items/form.xhtml +51 -61
  141. data/lib/zen/package/menus/lib/menus/view/admin/menu-items/index.xhtml +18 -81
  142. data/lib/zen/package/menus/lib/menus/view/admin/menus/form.xhtml +49 -44
  143. data/lib/zen/package/menus/lib/menus/view/admin/menus/index.xhtml +81 -83
  144. data/lib/zen/package/sections/lib/sections.rb +9 -4
  145. data/lib/zen/package/sections/lib/sections/controller/section_entries.rb +80 -132
  146. data/lib/zen/package/sections/lib/sections/controller/sections.rb +27 -73
  147. data/lib/zen/package/sections/lib/sections/helper/section.rb +44 -1
  148. data/lib/zen/package/sections/lib/sections/language/en/section_entries.rb +2 -0
  149. data/lib/zen/package/sections/lib/sections/language/nl/section_entries.rb +2 -0
  150. data/lib/zen/package/sections/lib/sections/model/section.rb +48 -1
  151. data/lib/zen/package/sections/lib/sections/model/section_entry.rb +55 -5
  152. data/lib/zen/package/sections/lib/sections/model/section_entry_status.rb +2 -0
  153. data/lib/zen/package/sections/lib/sections/view/admin/section-entries/form.xhtml +76 -67
  154. data/lib/zen/package/sections/lib/sections/view/admin/section-entries/index.xhtml +74 -79
  155. data/lib/zen/package/sections/lib/sections/view/admin/section-entries/recent_entries.xhtml +45 -0
  156. data/lib/zen/package/sections/lib/sections/view/admin/sections/form.xhtml +119 -0
  157. data/lib/zen/package/sections/lib/sections/view/admin/sections/index.xhtml +96 -0
  158. data/lib/zen/package/sections/lib/sections/widget/recent_entries.rb +14 -0
  159. data/lib/zen/package/sections/migrations/1308813320_section_entry_statuses.rb +1 -1
  160. data/lib/zen/package/settings/lib/settings.rb +14 -5
  161. data/lib/zen/package/settings/lib/settings/controller/settings.rb +4 -4
  162. data/lib/zen/package/settings/lib/settings/language/nl/settings.rb +1 -1
  163. data/lib/zen/package/settings/lib/settings/setting.rb +1 -1
  164. data/lib/zen/package/settings/lib/settings/view/admin/settings/index.xhtml +21 -17
  165. data/lib/zen/package/users/lib/users.rb +18 -19
  166. data/lib/zen/package/users/lib/users/controller/user_groups.rb +23 -50
  167. data/lib/zen/package/users/lib/users/controller/users.rb +57 -89
  168. data/lib/zen/package/users/lib/users/helper/acl.rb +1 -0
  169. data/lib/zen/package/users/lib/users/language/en/user_groups.rb +1 -0
  170. data/lib/zen/package/users/lib/users/language/en/users.rb +2 -1
  171. data/lib/zen/package/users/lib/users/language/nl/user_groups.rb +1 -0
  172. data/lib/zen/package/users/lib/users/language/nl/users.rb +2 -1
  173. data/lib/zen/package/users/lib/users/model/permission.rb +13 -0
  174. data/lib/zen/package/users/lib/users/model/user.rb +57 -4
  175. data/lib/zen/package/users/lib/users/model/user_group.rb +37 -3
  176. data/lib/zen/package/users/lib/users/model/user_status.rb +4 -0
  177. data/lib/zen/package/users/lib/users/public/admin/{css/users/permissions.css → users/css/users.css} +0 -0
  178. data/lib/zen/package/users/lib/users/public/admin/{js/users/permissions.js → users/js/users.js} +4 -2
  179. data/lib/zen/package/users/lib/users/view/admin/user-groups/form.xhtml +51 -47
  180. data/lib/zen/package/users/lib/users/view/admin/user-groups/index.xhtml +62 -69
  181. data/lib/zen/package/users/lib/users/view/admin/users/form.xhtml +92 -82
  182. data/lib/zen/package/users/lib/users/view/admin/users/index.xhtml +68 -66
  183. data/lib/zen/package/users/lib/users/view/admin/users/login.xhtml +36 -28
  184. data/lib/zen/package/users/lib/users/view/admin/users/permissions.xhtml +5 -7
  185. data/lib/zen/package/users/lib/users/view/admin/users/register.xhtml +47 -41
  186. data/lib/zen/package/users/migrations/1320272365_status_ids.rb +1 -1
  187. data/lib/zen/public/admin/{js/vendor/mootools → mootools/js}/core.js +113 -108
  188. data/lib/zen/public/admin/{js/vendor/mootools → mootools/js}/more.js +99 -6
  189. data/lib/zen/public/admin/zen/css/buttons.css +106 -0
  190. data/lib/zen/public/admin/{css/zen → zen/css}/datepicker.css +45 -30
  191. data/lib/zen/public/admin/zen/css/editor.css +69 -0
  192. data/lib/zen/public/admin/{css/zen → zen/css}/forms.css +28 -30
  193. data/lib/zen/public/admin/zen/css/general.css +183 -0
  194. data/lib/zen/public/admin/zen/css/layout.css +224 -0
  195. data/lib/zen/public/admin/zen/css/messages.css +34 -0
  196. data/lib/zen/public/admin/{css/zen → zen/css}/reset.css +4 -9
  197. data/lib/zen/public/admin/zen/css/tables.css +57 -0
  198. data/lib/zen/public/admin/zen/css/tabs.css +84 -0
  199. data/lib/zen/public/admin/zen/css/window.css +74 -0
  200. data/lib/zen/public/admin/{images/zen → zen/images}/icons/asc.png +0 -0
  201. data/lib/zen/public/admin/{images/zen → zen/images}/icons/bold.png +0 -0
  202. data/lib/zen/public/admin/zen/images/icons/box.png +0 -0
  203. data/lib/zen/public/admin/zen/images/icons/categories.png +0 -0
  204. data/lib/zen/public/admin/{images/zen → zen/images}/icons/close.png +0 -0
  205. data/lib/zen/public/admin/zen/images/icons/comment.png +0 -0
  206. data/lib/zen/public/admin/{images/zen → zen/images}/icons/desc.png +0 -0
  207. data/lib/zen/public/admin/{images/zen → zen/images}/icons/edit.png +0 -0
  208. data/lib/zen/public/admin/{images/zen → zen/images}/icons/error.png +0 -0
  209. data/lib/zen/public/admin/zen/images/icons/external.png +0 -0
  210. data/lib/zen/public/admin/zen/images/icons/globe.png +0 -0
  211. data/lib/zen/public/admin/{images/zen → zen/images}/icons/italic.png +0 -0
  212. data/lib/zen/public/admin/{images/zen → zen/images}/icons/link.png +0 -0
  213. data/lib/zen/public/admin/zen/images/icons/lock.png +0 -0
  214. data/lib/zen/public/admin/{images/zen → zen/images}/icons/ol.png +0 -0
  215. data/lib/zen/public/admin/zen/images/icons/pages.png +0 -0
  216. data/lib/zen/public/admin/{images/zen → zen/images}/icons/preview.png +0 -0
  217. data/lib/zen/public/admin/zen/images/icons/relation.png +0 -0
  218. data/lib/zen/public/admin/zen/images/icons/settings.png +0 -0
  219. data/lib/zen/public/admin/zen/images/icons/template.png +0 -0
  220. data/lib/zen/public/admin/{images/zen → zen/images}/icons/ul.png +0 -0
  221. data/lib/zen/public/admin/{images/zen → zen/images}/icons/user.png +0 -0
  222. data/lib/zen/public/admin/zen/images/icons/user_group.png +0 -0
  223. data/lib/zen/public/admin/{js/zen → zen/js}/index.js +21 -9
  224. data/lib/zen/public/admin/zen/js/lib/autosave.js +185 -0
  225. data/lib/zen/public/admin/zen/js/lib/base.js +60 -0
  226. data/lib/zen/public/admin/{js/vendor → zen/js/lib}/datepicker.js +52 -28
  227. data/lib/zen/public/admin/{js/zen → zen/js}/lib/editor.js +23 -34
  228. data/lib/zen/public/admin/{js/zen → zen/js}/lib/editor/markdown.js +5 -1
  229. data/lib/zen/public/admin/{js/zen → zen/js}/lib/editor/textile.js +4 -0
  230. data/lib/zen/public/admin/zen/js/lib/hash.js +218 -0
  231. data/lib/zen/public/admin/{js/zen → zen/js}/lib/html_table.js +5 -0
  232. data/lib/zen/public/admin/zen/js/lib/tabs.js +194 -0
  233. data/lib/zen/public/admin/{js/zen → zen/js}/lib/window.js +54 -29
  234. data/lib/zen/security.rb +50 -0
  235. data/lib/zen/spec/helper.rb +5 -120
  236. data/lib/zen/spec/helper/capybara.rb +75 -0
  237. data/lib/zen/spec/helper/general.rb +75 -0
  238. data/lib/zen/spec/simplecov.rb +1 -0
  239. data/lib/zen/task/build.rake +2 -21
  240. data/lib/zen/task/clean.rake +1 -10
  241. data/lib/zen/task/db.rake +4 -10
  242. data/lib/zen/task/package.rake +2 -5
  243. data/lib/zen/task/setup.rake +1 -1
  244. data/lib/zen/task/test.rake +6 -6
  245. data/lib/zen/task/theme.rake +2 -5
  246. data/lib/zen/theme.rb +26 -22
  247. data/lib/zen/version.rb +1 -1
  248. data/lib/zen/view/bottom.xhtml +2 -3
  249. data/lib/zen/view/search.xhtml +3 -5
  250. data/proto/app/config/config.rb.erb +1 -1
  251. data/proto/app/theme/default/index.xhtml +116 -20
  252. data/proto/app/theme/partials/head.xhtml +9 -0
  253. data/proto/app/theme/partials/sidebar.xhtml +40 -0
  254. data/proto/app/theme/theme.rb +3 -0
  255. data/spec/Rakefile +1 -2
  256. data/spec/fixtures/zen/helper/stacked_aspect.rb +54 -0
  257. data/spec/fixtures/zen/package/dashboard/controller/widget.rb +15 -0
  258. data/spec/fixtures/zen/package/dashboard/widget.rb +5 -0
  259. data/spec/fixtures/zen/theme/theme.rb +2 -2
  260. data/spec/helper.rb +19 -10
  261. data/spec/zen/controller/admin_controller.rb +3 -3
  262. data/spec/zen/controller/main_controller.rb +7 -7
  263. data/spec/zen/controller/preview.rb +3 -3
  264. data/spec/zen/event.rb +4 -4
  265. data/spec/zen/helper/breadcrumb.rb +4 -8
  266. data/spec/zen/helper/controller.rb +47 -4
  267. data/spec/zen/helper/locale.rb +3 -3
  268. data/spec/zen/helper/message.rb +4 -4
  269. data/spec/zen/helper/stacked_aspect.rb +40 -0
  270. data/spec/zen/helper/theme.rb +9 -9
  271. data/spec/zen/language.rb +8 -8
  272. data/spec/zen/markup.rb +6 -6
  273. data/spec/zen/package.rb +11 -9
  274. data/spec/zen/package/categories/controller/categories.rb +56 -24
  275. data/spec/zen/package/categories/controller/category_groups.rb +55 -23
  276. data/spec/zen/package/categories/helper/category.rb +5 -5
  277. data/spec/zen/package/categories/helper/category_frontend.rb +5 -5
  278. data/spec/zen/package/comments/anti_spam.rb +4 -4
  279. data/spec/zen/package/comments/controller/comments.rb +95 -24
  280. data/spec/zen/package/comments/controller/comments_form.rb +31 -26
  281. data/spec/zen/package/comments/helper/comment.rb +3 -3
  282. data/spec/zen/package/comments/helper/comment_frontend.rb +6 -6
  283. data/spec/zen/package/custom_fields/blue_form_parameters.rb +8 -8
  284. data/spec/zen/package/custom_fields/controller/custom_field_groups.rb +58 -27
  285. data/spec/zen/package/custom_fields/controller/custom_field_types.rb +57 -27
  286. data/spec/zen/package/custom_fields/controller/custom_fields.rb +58 -27
  287. data/spec/zen/package/custom_fields/helper/custom_field.rb +7 -7
  288. data/spec/zen/package/dashboard/controller/dashboard.rb +147 -0
  289. data/spec/zen/package/dashboard/widget.rb +56 -0
  290. data/spec/zen/package/extensions/controller/extensions.rb +4 -4
  291. data/spec/zen/package/menus/controller/menu_items.rb +48 -39
  292. data/spec/zen/package/menus/controller/menus.rb +55 -24
  293. data/spec/zen/package/menus/helper/menu.rb +6 -14
  294. data/spec/zen/package/menus/helper/menu_frontend.rb +7 -7
  295. data/spec/zen/package/menus/model/menu.rb +121 -0
  296. data/spec/zen/package/menus/model/menu_item.rb +34 -0
  297. data/spec/zen/package/sections/controller/section_entries.rb +104 -39
  298. data/spec/zen/package/sections/controller/sections.rb +60 -27
  299. data/spec/zen/package/sections/helper/section.rb +5 -5
  300. data/spec/zen/package/sections/helper/section_frontend.rb +9 -9
  301. data/spec/zen/package/sections/widget.rb +44 -0
  302. data/spec/zen/package/settings/controller/settings.rb +18 -16
  303. data/spec/zen/package/settings/settings.rb +12 -12
  304. data/spec/zen/package/users/controller/user_groups.rb +61 -29
  305. data/spec/zen/package/users/controller/users.rb +118 -39
  306. data/spec/zen/package/users/helper/access.rb +3 -3
  307. data/spec/zen/package/users/helper/acl.rb +4 -4
  308. data/spec/zen/package/users/helper/users.rb +5 -5
  309. data/spec/zen/security.rb +25 -0
  310. data/spec/zen/theme.rb +20 -18
  311. data/spec/zen/validation.rb +5 -5
  312. data/spec/zen/vendor/sequel_sluggable.rb +12 -0
  313. data/zen.gemspec +27 -4
  314. metadata +182 -124
  315. data/AUTHORS +0 -4
  316. data/guide/_static/categories/categories.png +0 -0
  317. data/guide/_static/categories/category_groups.png +0 -0
  318. data/guide/_static/categories/new_category.png +0 -0
  319. data/guide/_static/categories/new_category_group.png +0 -0
  320. data/guide/_static/comments/comments.png +0 -0
  321. data/guide/_static/comments/edit_comment.png +0 -0
  322. data/guide/_static/custom_fields/custom_field_groups.png +0 -0
  323. data/guide/_static/custom_fields/custom_field_types.png +0 -0
  324. data/guide/_static/custom_fields/custom_fields.png +0 -0
  325. data/guide/_static/custom_fields/edit_custom_field_general.png +0 -0
  326. data/guide/_static/custom_fields/edit_custom_field_group.png +0 -0
  327. data/guide/_static/custom_fields/edit_custom_field_settings.png +0 -0
  328. data/guide/_static/custom_fields/edit_custom_field_type.png +0 -0
  329. data/guide/_static/menus/edit_menu.png +0 -0
  330. data/guide/_static/menus/edit_menu_item.png +0 -0
  331. data/guide/_static/menus/menu_items.png +0 -0
  332. data/guide/_static/menus/menus.png +0 -0
  333. data/guide/_static/sections/edit_entry.png +0 -0
  334. data/guide/_static/sections/edit_entry_categories.png +0 -0
  335. data/guide/_static/sections/edit_entry_general.png +0 -0
  336. data/guide/_static/sections/edit_entry_meta.png +0 -0
  337. data/guide/_static/sections/edit_section_comments.png +0 -0
  338. data/guide/_static/sections/edit_section_general.png +0 -0
  339. data/guide/_static/sections/edit_section_groups.png +0 -0
  340. data/guide/_static/sections/entries.png +0 -0
  341. data/guide/_static/sections/sections.png +0 -0
  342. data/guide/_static/settings/overview_general.png +0 -0
  343. data/guide/_static/settings/overview_security.png +0 -0
  344. data/guide/_static/settings/overview_user.png +0 -0
  345. data/guide/_static/users/edit_user.png +0 -0
  346. data/guide/_static/users/edit_user_group.png +0 -0
  347. data/guide/_static/users/edit_user_group_permissions.png +0 -0
  348. data/guide/_static/users/edit_user_permissions.png +0 -0
  349. data/guide/_static/users/overview.png +0 -0
  350. data/guide/_static/users/user_groups_overview.png +0 -0
  351. data/lib/zen/controller/translations.rb +0 -49
  352. data/lib/zen/package/sections/lib/sections/view/admin/form.xhtml +0 -113
  353. data/lib/zen/package/sections/lib/sections/view/admin/index.xhtml +0 -97
  354. data/lib/zen/public/admin/css/zen/buttons.css +0 -46
  355. data/lib/zen/public/admin/css/zen/editor.css +0 -88
  356. data/lib/zen/public/admin/css/zen/general.css +0 -109
  357. data/lib/zen/public/admin/css/zen/grid.css +0 -100
  358. data/lib/zen/public/admin/css/zen/layout.css +0 -184
  359. data/lib/zen/public/admin/css/zen/messages.css +0 -54
  360. data/lib/zen/public/admin/css/zen/tables.css +0 -97
  361. data/lib/zen/public/admin/css/zen/tabs.css +0 -47
  362. data/lib/zen/public/admin/css/zen/window.css +0 -73
  363. data/lib/zen/public/admin/images/zen/icons/accept.png +0 -0
  364. data/lib/zen/public/admin/images/zen/icons/add.png +0 -0
  365. data/lib/zen/public/admin/images/zen/icons/back.png +0 -0
  366. data/lib/zen/public/admin/images/zen/icons/delete.png +0 -0
  367. data/lib/zen/public/admin/images/zen/icons/help.png +0 -0
  368. data/lib/zen/public/admin/images/zen/icons/info.png +0 -0
  369. data/lib/zen/public/admin/images/zen/icons/logout.png +0 -0
  370. data/lib/zen/public/admin/images/zen/icons/pdf.png +0 -0
  371. data/lib/zen/public/admin/images/zen/icons/view.png +0 -0
  372. data/lib/zen/public/admin/js/zen/lib/tabs.js +0 -207
  373. data/lib/zen/view/main.xhtml +0 -19
data/.gems CHANGED
@@ -1,12 +1,13 @@
1
- # Production dependencies.
1
+ # Production.
2
2
  ramaze
3
3
  sequel
4
4
  bcrypt-ruby
5
5
  loofah
6
6
  shebang
7
7
  ramaze-asset
8
+ rake
8
9
 
9
- # Development dependencies, no need for specific versions.
10
+ # Development.
10
11
  rdiscount
11
12
  bacon
12
13
  yard
data/.rvmrc CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env bash
2
- rvm use --create 1.9.3@zen
2
+ rvm use --install --create 1.9.3@zen
@@ -16,7 +16,12 @@ env:
16
16
  - 'ADAPTER=sqlite'
17
17
  - 'ADAPTER=mysql2 DATABASE=zen_dev'
18
18
  - 'ADAPTER=postgres DATABASE=zen_dev USERNAME=postgres'
19
+ - 'LRU=1 ADAPTER=sqlite'
20
+ - 'LRU=1 ADAPTER=mysql2 DATABASE=zen_dev'
21
+ - 'LRU=1 ADAPTER=postgres DATABASE=zen_dev USERNAME=postgres'
19
22
 
20
23
  before_script:
21
24
  - "mysql -e 'CREATE DATABASE zen_dev;'"
22
25
  - "psql -c 'CREATE DATABASE zen_dev;' -U postgres"
26
+ - "export DISPLAY=:99.0"
27
+ - "sh -e /etc/init.d/xvfb start"
data/.yardopts CHANGED
@@ -6,8 +6,9 @@
6
6
  -e ./lib/yard/tags.rb
7
7
  --private
8
8
  --protected
9
- --asset ./guide/_static:_static
9
+ --asset ./guide/images:images
10
10
  --asset ./guide/css/common.css:css/common.css
11
11
  -
12
12
  ./guide/*.md
13
+ ./guide/javascript/*.md
13
14
  LICENSE
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010 - 2011, Yorick Peterse
1
+ Copyright (c) 2010 - 2012, Yorick Peterse
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -38,12 +38,25 @@ small portion of what it can do.
38
38
  * A well documented, tested and easy to understand API.
39
39
  * A database structure that doesn't make you cry.
40
40
 
41
- ## Chapters
41
+ ## Requirements
42
+
43
+ * Ruby (YARV) 1.9.2 or newer (Rubinius, jruby and others are not supported).
44
+ * Ramaze 2011.10.23 or newer.
45
+ * A SQL database supported by Sequel. Zen has been tested and confirmed to
46
+ work on MySQL, SQLite3 and PostgreSQL. You'll also need the required gems for
47
+ these DBMS' such as "mysql2" for MySQL and "pg" for PostgreSQL.
48
+ * A Rack compatible server such as Thin or Unicorn.
49
+ * A library to convert your markup of choice to HTML. Zen by default has support
50
+ for Textile using Redcloth and Markdown using RDiscount. RDiscount and
51
+ RedCloth are installed automatically when needed.
52
+
53
+ ## User Guide
42
54
 
43
55
  * {file:installation Installation}
44
56
  * {file:getting_started Getting Started}
45
- * {file:hacking Hacking/Contributing}
46
- * {file:changelog Changelog}
57
+ * {file:zen_compared Comparing Zen with Others}
58
+ * {file:faq Frequently Asked Questions}
59
+ * {Dashboard::Controller::Dashboard Dashboard}
47
60
  * {Categories Categories}
48
61
  * {Categories::Controller::CategoryGroups Managing Category Groups}
49
62
  * {Categories::Controller::Categories Managing Categories}
@@ -72,47 +85,38 @@ small portion of what it can do.
72
85
  * {Users Users, User Groups and Permissions}
73
86
  * {Users::Controller::Users Managing Users}
74
87
  * {Users::Controller::UserGroups Managing User Groups}
88
+
89
+ ## Developers Guide
90
+
91
+ * {file:hacking Hacking/Contributing}
92
+ * {file:changelog Changelog}
75
93
  * {Zen::Package Packages}
76
94
  * {Zen::Theme Themes}
77
95
  * {Zen::Language Localization}
78
96
  * {Zen::Event Events}
79
97
  * {Zen::Validation Validating Objects}
98
+ * {Zen::Security.sanitize Sanitizing User Input}
99
+ * {file:autosaving_forms Automatically Saving Form Data}
100
+ * {Ramaze::Helper::Locale Working With Dates}
80
101
  * {file:asset_management Asset Management}
102
+ * {Zen::Markup Converting Markup}
81
103
  * {file:javascript Javascript API}
82
104
 
83
- ## Requirements
84
-
85
- * Ruby >= 1.9.2 (Rubinius, jruby and others are not supported).
86
- * Ramaze 2011.10.23 or newer.
87
- * A SQL database supported by Sequel. Zen has been tested and confirmed to
88
- work on MySQL, SQLite3 and PostgreSQL. You'll also need the required gems for
89
- these DBMS' such as "mysql2" for MySQL and "pg" for PostgreSQL.
90
- * A Rack compatible server such as Thin or Unicorn.
91
- * A library to convert your markup of choice to HTML. Zen by default has support
92
- for Textile using Redcloth and Markdown using RDiscount. RDiscount and
93
- RedCloth are installed automatically when needed.
94
-
95
105
  ## Community
96
106
 
97
107
  * [Website][zen website]
98
108
  * [Mailing list][mailing list]
99
-
100
- Zen does not have it's own IRC channel at this time but you can usually find me
101
- in any of the following channels on Freenode:
102
-
103
- * \#forrst-chat
104
- * \#ramaze
105
- * \#ruby-lang
109
+ * IRC channel: \#zen-cms on Freenode
106
110
 
107
111
  ## Websites Using Zen
108
112
 
109
113
  * http://yorickpeterse.com/
110
114
  * http://ramaze.net/
111
115
  * http://zen-cms.com/
116
+ * http://aplusm.me/
112
117
 
113
118
  If you've built a website using Zen and you'd like to have it listed here sent
114
- an Email to me (yorickpeterse [at] gmail [dot] com) or send an Email to the
115
- mailing list.
119
+ an Email to me (yorickpeterse@gmail.com) or send an Email to the mailing list.
116
120
 
117
121
  ## Special Thanks
118
122
 
data/Rakefile CHANGED
@@ -4,6 +4,9 @@ Zen::Gemspec = Gem::Specification::load(
4
4
  File.expand_path('../zen.gemspec', __FILE__)
5
5
  )
6
6
 
7
- Dir.glob(File.expand_path('../lib/zen/task/*.rake', __FILE__)).each do |task|
8
- import(task)
7
+ task_path = File.expand_path('../lib/zen/task', __FILE__)
8
+ tasks = ['build', 'clean', 'proto', 'setup', 'test']
9
+
10
+ tasks.each do |task|
11
+ import File.join(task_path, "#{task}.rake")
9
12
  end
@@ -17,7 +17,7 @@ The asset helper is loaded in the admin controller and therefor available to all
17
17
  controllers that extend it. Loading assets using the first method works as
18
18
  following:
19
19
 
20
- Zen.asset.serve(:javascript, ['admin/js/vendor/mootools/core'])
20
+ Zen.asset.serve(:javascript, ['admin/mootools/js/core'])
21
21
 
22
22
  The first parameter is the type of files to load. Out of the box you can use
23
23
  ``:javascript`` and ``:css``. The second parameter is an array of paths relative
@@ -34,7 +34,7 @@ following:
34
34
  class Posts < Zen::Controller::AdminController
35
35
  map '/admin/posts'
36
36
 
37
- serve(:javascript, ['admin/js/vendor/mootools/core'])
37
+ serve(:javascript, ['admin/mootools/js/core'])
38
38
  end
39
39
 
40
40
  The ``serve()`` method has the same syntax as ``Zen.asset.serve()``, it just
@@ -45,7 +45,7 @@ package):
45
45
 
46
46
  serve(
47
47
  :javascript,
48
- ['admin/js/users/lib/access_rules', 'admin/js/users/access_rules'],
48
+ ['admin/users/js/lib/access_rules', 'admin/users/js/access_rules'],
49
49
  :methods => [:edit, :new],
50
50
  :name => 'users'
51
51
  )
@@ -73,7 +73,7 @@ asset groups to know for what controller they should be loaded:
73
73
  Zen.asset.register_asset_group(:my_asset_group) do |asset, controller|
74
74
  asset.serve(
75
75
  :javascript,
76
- ['admin/js/vendor/mootools/core'],
76
+ ['admin/mootools/js/core'],
77
77
  :controller => controller
78
78
  )
79
79
  end
@@ -110,8 +110,8 @@ entire layout. These files are called "global.css" and "global.js" and (in order
110
110
  to use them) should be placed in the following directories (where ROOT is the
111
111
  root directory of the application):
112
112
 
113
- * ROOT/admin/css/global.css
114
- * ROOT/admin/js/global.js
113
+ * ROOT/admin/zen/css/global.css
114
+ * ROOT/admin/zen/js/global.js
115
115
 
116
116
  [ramaze-asset]: https://github.com/yorickpeterse/ramaze-asset
117
117
  [ramaze-env]: https://github.com/YorickPeterse/ramaze-asset/blob/master/lib/ramaze/asset/environment.rb
@@ -0,0 +1,42 @@
1
+ # Automatically Saving Form Data
2
+
3
+ To make it easier for users to work with their data Zen allows developers to
4
+ easily implement a system that makes it possible for form data to be saved
5
+ automatically. It is recommended that all forms that create or update data
6
+ automatically save their data.
7
+
8
+ For this to work you must first make it possible for your controllers to respond
9
+ to these auto saving actions. This can be done by calling
10
+ {Ramaze::Helper::Controller::ClassMethods#autosave} in your controller
11
+ declaration. The first parameter is the model to save the data with, the second
12
+ an array of columns to save and the third a permission required to perform the
13
+ action. For example, the controller {Categories::Controller::CategoryGroups}
14
+ calls this method as following:
15
+
16
+ autosave Model::CategoryGroup,
17
+ Model::CategoryGroup::COLUMNS,
18
+ :edit_category_group
19
+
20
+ The array {Categories::Model::CategoryGroup::COLUMNS} contains a list of column
21
+ names that can be set by the user.
22
+
23
+ Once the controller has been prepared you must update your forms so that they
24
+ include a ``data-autosave-url`` attribute. This attribute should contain a
25
+ string that points to the URL that will receive the form data. If you're using
26
+ the autosave method discussed above you should call ``.r(:autosave)`` on your
27
+ controller. For category groups this is done as following:
28
+
29
+ :'data-autosave-url' => Categories::Controller::CategoryGroups.r(:autosave)
30
+
31
+ The last step is to make sure that your form has a hidden field with the name
32
+ "id", usually this field contains the primary value of an object (the ID). If
33
+ this field is empty Zen will **not** save the form automatically, this is to
34
+ prevent it from trying to save forms related to non existing objects. Adding
35
+ this field is as simple as the following (assuming you're using the BlueForm
36
+ helper, which you should):
37
+
38
+ f.input_hidden(:id)
39
+
40
+ And that's it, Zen will take care of the rest for you from this point on. Every
41
+ 10 minutes Zen will automatically save the form for you and take care of the
42
+ logic related to retrieving error messages, updating CSRF tokens and so on.
@@ -1,5 +1,46 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4 - March 7th, 2012
4
+
5
+ * Packages can contain multiple menus.
6
+ * New UI for the backend.
7
+ * All Javascript code is executed in strict mode.
8
+ * Added a new Javascript class for parsing hash fragments: Zen.Hash.
9
+ * Active tabs "persist" by changing URL hash fragments.
10
+ * Slugs are generated less aggressively, allowing the use of characters such as
11
+ hyphens.
12
+ * Various documentation improvements and numerous bug fixes.
13
+ * Datepickers can be customized using HTML attributes.
14
+ * Etanni template tags are escaped when dealing with user input.
15
+ * Added a new package: "Dashboard". This package shows various widgets and
16
+ replaces the "Sections" package as the landing page after logging in.
17
+ * Performance improvements for ``Ramaze::Helper::MenuFrontend#render_menu()``.
18
+ These improvements mean that only two queries are needed to retrieve a menu
19
+ and build the hierarchy of menu items (regardless of the amount).
20
+ * Fixed an issue that would incorrectly generate application names when creating
21
+ a new application using ``zen create``.
22
+ * Full stack traces are logged in case of errors rather than just the message.
23
+ * Model related events (e.g. before_new_section_entry) have been moved into
24
+ their corresponding models.
25
+ * Menu item manager has been re-written so that menu items can be organized
26
+ using a drop and drag interface.
27
+ * The various assets used by Zen have been re-organized.
28
+ * Custom data can be stored in themes and packages in the ``env`` attribute.
29
+ * Forms are automatically saved every 10 minutes. This only happens for forms
30
+ that contain data of existing objects.
31
+ * The controller Zen::Controller::Translations has been removed. Instead of
32
+ using a controller translations are simply dumped as a JSON string in a view.
33
+ * Fixed an issue that would cause Zen to crash when trying to store certain data
34
+ using Ramaze::Cache::LRU.
35
+ * Custom fields are re-filled with their values whenever a user tries to
36
+ save/create a section entry with invalid/missing data.
37
+ * CSRF errors no longer show a plain text message but instead redirect users
38
+ back to the previous page. In case of such an error forms will be re-filled to
39
+ prevent data loss.
40
+ * The sort order of menu items increments automatically unless a custom order
41
+ has been specified.
42
+ * Various dependencies have been updated.
43
+
3
44
  ## 0.3 - November 27th, 2011
4
45
 
5
46
  * Fixed slug generation.
@@ -0,0 +1,49 @@
1
+ # Frequently Asked Questions
2
+
3
+ ## When starting I get the warning "Failed to migrate the settings..."
4
+
5
+ This warning appears when Zen failed to insert/update the various settings
6
+ stored in the database. In almost all cases this warning is caused because the
7
+ settings table doesn't exist. This issue can be solved by simply running the
8
+ following command:
9
+
10
+ $ rake db:migrate
11
+
12
+ ## I get errors such as "no such table: X"
13
+
14
+ Similar to the issue above this error is caused by missing database tables and
15
+ again this can be fixed by simply migrating the database:
16
+
17
+ $ rake db:migrate
18
+
19
+ ## Users are randomly logged out and settings are lost
20
+
21
+ This happens when you're running your Zen application using a Rack server that
22
+ uses multiple processes (e.g. Unicorn) in combination with memory based caches
23
+ for the session and settings data. The easiest fix for this problem is to simply
24
+ use an external cache for the settings and session data.
25
+
26
+ It's recommended to either use Memcached using ``Ramaze::Cache::MemCache`` or
27
+ Redis using ``Ramaze::Cache::Redis``. These caches can be set as following in
28
+ ``config/config.rb``:
29
+
30
+ Ramaze::Cache.options.session = Ramaze::Cache::MemCache
31
+ Ramaze::Cache.options.settings = Ramaze::Cache::MemCache
32
+
33
+ For Redis you'd do the following:
34
+
35
+ Ramaze::Cache.options.session = Ramaze::Cache::Redis
36
+ Ramaze::Cache.options.settings = Ramaze::Cache::Redis
37
+
38
+ ## Can I use Zen for non open source projects?
39
+
40
+ Yes. Zen is licensed under the MIT license which is a very flexible license. As
41
+ long as you keep the license intact and include it in your projects that use Zen
42
+ you're free to do whatever you like. For more information see the "LICENSE"
43
+ file, you can find this file in the Git repository as well as in the "File list"
44
+ dropdown at the top right of this page.
45
+
46
+ ## Can I contact you personally via Email or IRC?
47
+
48
+ Yes, as long as any messages are written in decent English so that I can
49
+ understand them you're more than welcome to contact me directly.
@@ -2,9 +2,8 @@
2
2
 
3
3
  Once installed (see {file:installation Installation}) you can use the ``zen``
4
4
  executable to create new applications. Keep in mind that this command is not a
5
- wrapper for the ``ramaze`` executable. This means that you still have to type
6
- ``ramaze console`` or ``ramaze start`` if you want to open up a console or start
7
- your application.
5
+ wrapper for the ``ramaze`` executable, you still have to type ``ramaze console``
6
+ or ``ramaze start`` if you want to open up a console or start your application.
8
7
 
9
8
  In order to create a new application based on Zen you'll need to execute the
10
9
  following command:
@@ -15,7 +14,7 @@ This command will start an interactive installer that walks you through the
15
14
  process of creating a new project. Using this installer you can specify the
16
15
  project name, database settings and various other settings.
17
16
 
18
- The prototype applications generated by the zen command are pretty basic but
17
+ The prototype applications generated by the Zen executable are pretty basic but
19
18
  should be enough for most users. If you want to change anything of it you're
20
19
  free to do so just make sure that all paths and such are updated correctly.
21
20
 
@@ -30,15 +29,28 @@ This creates all the database tables and inserts a default user with a random
30
29
  password.
31
30
 
32
31
  When creating the database tables for the first time you'll see one or two
33
- yellow warnings telling you certain tables might be missing. These can be safely
34
- ignored.
32
+ yellow warnings telling you certain tables might be missing. These warnings are
33
+ triggered whenever Zen fails to automatically insert/update the settings table.
34
+ These warnings can be safely ignored the first time you create a new
35
+ application.
35
36
 
36
- You can now start the application using your server of choice and start using
37
- it.
37
+ Once an application has been created and the database tables have been put in
38
+ place you can start using it. Starting a Zen application (during development)
39
+ can be done using the following command:
40
+
41
+ $ ramaze start
42
+
43
+ This will start the application using WEBRick, if you want to use an alternative
44
+ server instead (such as Thin) you can do this by setting the ``-s`` option:
45
+
46
+ $ ramaze start -s thin
47
+
48
+ For more information on the available commands and options execute ``zen
49
+ --help`` or ``ramaze --help``.
38
50
 
39
51
  ## Updating Applications
40
52
 
41
- Updating Zen in general is quite easy and requires the following two commands::
53
+ Updating Zen in general is quite easy and requires the following two commands:
42
54
 
43
55
  $ gem update zen
44
56
  $ rake db:migrate
@@ -47,10 +59,9 @@ However, with some releases there may be some extra steps that are required in
47
59
  order to properly update your installation so it's always wise to check the
48
60
  release notes before updating an installation.
49
61
 
50
- When updating the database schema I always try to write my migrations in such a
51
- way that existing data is migrated as well. However, because there may be some
52
- cases where this isn't possible it's recommended that you **always** make a
53
- backup of your database before updating.
62
+ While the database migrations written for Zen will always try to migrate your
63
+ existing content (unless this simply isn't possible) I **highly** recommend you
64
+ to make database backups before migrating the database.
54
65
 
55
66
  ## Logging In
56
67
 
@@ -5,16 +5,46 @@ Zen doesn't degrade developers should stick with the guidelines described in
5
5
  this document. Zen also follows the [Ramaze guidelines][ramaze guidelines] as
6
6
  much as possible.
7
7
 
8
- ## General Standards
8
+ ## Coding Standards
9
9
 
10
- * 2 spaces per indentation level for Ruby code.
11
- * 4 spaces per indentation level for Javascript, CSS and HTML.
12
- * Document your code, that includes CSS (when dealing with complex selectors)
13
- and Javascript files.
14
- * No tabs at all times.
15
- * Markdown is used for all markup.
16
- * The maximum width of each line should be no more than 80 characters, this
17
- makes it easier to read code in terminals or when using split view modes.
10
+ Zen follows a rather strict set of coding guidelines that developers should
11
+ follow if they wish to contribute to Zen. Write your code like the next
12
+ developer looking at it is a psychopath with an axe and knows where you live.
13
+
14
+ ### Indentation
15
+
16
+ For Ruby 2 spaces per indentation level is used. The use of tabs is not
17
+ allowed at all times and pull requests containing incorrectly indented code will
18
+ not be accepted until the indentation has been fixed.
19
+
20
+ For Javascript, CSS and HTML 4 spaces per indentation level is used instead of
21
+ 2 spaces. This is because I personally find 4 spaces to be far easier to read in
22
+ these languages. Again no tabs are allowed.
23
+
24
+ ### Documentation
25
+
26
+ The same rule about the psychopath with the axe applies to documentation. Proper
27
+ documentation is very, *very* important. Documentation should be written
28
+ following the YARD syntax and by using Markdown where needed. If you need any
29
+ examples just look at the source code of {Zen::Package} or {Zen::Theme}.
30
+
31
+ ### Line Width
32
+
33
+ The maximum amount of characters per line should be no greater than 80
34
+ characters whenever possible. Sometimes it's simply not possible (e.g. when
35
+ adding a URL) but try to stick to this as much as possible.
36
+
37
+ Limiting the amount of characters per line to 80 ensures that everybody will be
38
+ able to read it, whether they're using Vim with multiple split windows or
39
+ reading a file in their terminal.
40
+
41
+ ### CSS
42
+
43
+ When writing CSS the properties of a selector (background-image, color, etc)
44
+ should be sorted alphabetically. There are a few exceptions to this. For
45
+ example, the CSS file buttons.css contains a set of background-image properties
46
+ that are grouped together for better readability. As long as it's readable I'm
47
+ ok with it.
18
48
 
19
49
  ## Comitting
20
50
 
@@ -50,3 +80,4 @@ The test ouput is displayed using [TAP][tap protocol].
50
80
  [commit guidelines]: http://ramaze.net/documentation/file.contributing.html#Commit_Messages
51
81
  [bacon]: https://github.com/chneukirchen/bacon
52
82
  [tap protocol]: https://en.wikipedia.org/wiki/Test_Anything_Protocol
83
+ [allman style]: https://en.wikipedia.org/wiki/Indent_style#Allman_style