radiant 0.9.1 → 1.0.0.rc1

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 (1514) hide show
  1. data/.gitignore +19 -0
  2. data/CHANGELOG +26 -0
  3. data/CONTRIBUTORS +18 -0
  4. data/Gemfile +3 -0
  5. data/app/controllers/admin/configuration_controller.rb +50 -0
  6. data/app/controllers/admin/page_fields_controller.rb +9 -0
  7. data/app/controllers/admin/pages_controller.rb +39 -8
  8. data/app/controllers/admin/preferences_controller.rb +1 -1
  9. data/app/controllers/admin/resource_controller.rb +10 -2
  10. data/app/controllers/admin/welcome_controller.rb +6 -1
  11. data/app/controllers/application_controller.rb +0 -1
  12. data/app/controllers/site_controller.rb +1 -1
  13. data/app/helpers/admin/configuration_helper.rb +80 -0
  14. data/app/helpers/admin/node_helper.rb +47 -1
  15. data/app/helpers/admin/pages_helper.rb +5 -7
  16. data/app/helpers/admin/preferences_helper.rb +1 -0
  17. data/app/helpers/admin/references_helper.rb +2 -3
  18. data/app/helpers/application_helper.rb +4 -3
  19. data/app/models/deprecated_tags.rb +77 -0
  20. data/app/models/file_not_found_page.rb +4 -0
  21. data/app/models/page.rb +75 -24
  22. data/app/models/page_field.rb +3 -0
  23. data/app/models/page_part.rb +0 -1
  24. data/app/models/radiant/config.rb +239 -38
  25. data/app/models/snippet.rb +4 -0
  26. data/app/models/standard_tags.rb +202 -156
  27. data/app/models/status.rb +9 -1
  28. data/app/models/text_filter.rb +12 -1
  29. data/app/models/user.rb +1 -2
  30. data/app/models/user_action_observer.rb +9 -3
  31. data/app/views/admin/configuration/edit.html.haml +38 -0
  32. data/app/views/admin/configuration/show.html.haml +58 -0
  33. data/app/views/admin/extensions/index.html.haml +2 -2
  34. data/app/views/admin/layouts/_form.html.haml +2 -2
  35. data/app/views/admin/layouts/index.html.haml +10 -10
  36. data/app/views/admin/layouts/remove.html.haml +1 -1
  37. data/app/views/admin/page_fields/_page_field.html.haml +12 -0
  38. data/app/views/admin/pages/_fields.html.haml +22 -5
  39. data/app/views/admin/pages/_meta_row.html.haml +5 -1
  40. data/app/views/admin/pages/_node.html.haml +10 -9
  41. data/app/views/admin/pages/_popups.html.haml +17 -4
  42. data/app/views/admin/pages/edit.html.haml +1 -1
  43. data/app/views/admin/pages/index.html.haml +5 -5
  44. data/app/views/admin/pages/remove.html.haml +1 -1
  45. data/app/views/admin/preferences/edit.html.haml +1 -1
  46. data/app/views/admin/references/filters.haml +1 -1
  47. data/app/views/admin/references/tags.haml +1 -1
  48. data/app/views/admin/snippets/_form.html.haml +2 -2
  49. data/app/views/admin/snippets/index.html.haml +11 -11
  50. data/app/views/admin/snippets/remove.html.haml +1 -1
  51. data/app/views/admin/users/_avatar.html.haml +3 -1
  52. data/app/views/admin/users/_form.html.haml +3 -3
  53. data/app/views/admin/users/_password_fields.html.haml +2 -2
  54. data/app/views/admin/users/index.html.haml +11 -11
  55. data/app/views/admin/users/remove.html.haml +1 -1
  56. data/app/views/admin/welcome/login.html.haml +1 -1
  57. data/app/views/layouts/application.html.haml +9 -14
  58. data/config/boot.rb +28 -11
  59. data/config/compass.config +18 -0
  60. data/config/environment.rb +10 -5
  61. data/config/environments/cucumber.rb +5 -5
  62. data/config/environments/test.rb +5 -5
  63. data/config/initializers/compass.rb +3 -0
  64. data/config/initializers/radiant_config.rb +17 -0
  65. data/config/locales/en.yml +61 -13
  66. data/config/locales/en_available_tags.yml +131 -39
  67. data/config/routes.rb +4 -6
  68. data/db/migrate/20100805154952_add_page_fields.rb +15 -0
  69. data/db/migrate/20100805155020_convert_page_metas.rb +15 -0
  70. data/db/migrate/20100810151922_add_field_name_index.rb +11 -0
  71. data/db/schema.rb +32 -7
  72. data/features/admin/configuration.feature +38 -0
  73. data/features/admin/pages_management.feature +2 -9
  74. data/features/admin/resource_pagination.feature +1 -1
  75. data/features/admin/snippets_management.feature +2 -1
  76. data/features/admin/user_permissions.feature +3 -4
  77. data/features/admin/user_preferences.feature +1 -1
  78. data/features/step_definitions/admin/admin_steps.rb +1 -1
  79. data/features/step_definitions/admin/content_negotiation_steps.rb +4 -0
  80. data/features/step_definitions/admin/pages_management_steps.rb +5 -1
  81. data/features/step_definitions/admin/pagination_steps.rb +2 -4
  82. data/features/step_definitions/page_serving_steps.rb +16 -0
  83. data/features/support/dataset.rb +7 -3
  84. data/features/support/datasets_loader.rb +3 -0
  85. data/features/support/env.rb +2 -0
  86. data/features/support/matchers.rb +3 -0
  87. data/features/support/paths.rb +2 -0
  88. data/lib/generators/extension/extension_generator.rb +6 -0
  89. data/lib/generators/extension/templates/README +4 -1
  90. data/lib/generators/extension/templates/RSpecRakefile +1 -28
  91. data/lib/generators/extension/templates/Rakefile +0 -17
  92. data/lib/generators/extension/templates/cucumber_datasets_loader.rb +3 -0
  93. data/lib/generators/extension/templates/cucumber_env.rb +1 -10
  94. data/lib/generators/extension/templates/extension.rb +3 -3
  95. data/lib/generators/extension/templates/gemspec.rb +24 -0
  96. data/lib/generators/extension/templates/lib.rb +2 -0
  97. data/lib/generators/extension/templates/radiant_config.rb +3 -0
  98. data/lib/generators/extension/templates/version.rb +3 -0
  99. data/lib/generators/instance/instance_generator.rb +3 -2
  100. data/lib/generators/instance/templates/instance_boot.rb +28 -10
  101. data/lib/generators/instance/templates/instance_environment.rb +10 -5
  102. data/lib/generators/instance/templates/instance_radiant_config.rb +16 -0
  103. data/lib/generators/language_extension/templates/lang.yml +11 -11
  104. data/lib/plugins/active_record_extensions/lib/active_record_extensions.rb +10 -0
  105. data/lib/plugins/object_extensions/lib/object_extensions.rb +3 -0
  106. data/lib/radiant.rb +4 -4
  107. data/lib/radiant/admin_ui.rb +58 -41
  108. data/lib/radiant/available_locales.rb +8 -8
  109. data/lib/radiant/cache.rb +1 -0
  110. data/lib/radiant/config/definition.rb +142 -0
  111. data/lib/radiant/extension.rb +20 -4
  112. data/lib/radiant/extension/script.rb +15 -15
  113. data/lib/radiant/extension_gem.rb +12 -0
  114. data/lib/radiant/extension_loader.rb +12 -5
  115. data/lib/radiant/extension_locator.rb +25 -0
  116. data/lib/radiant/extension_migrator.rb +3 -2
  117. data/lib/radiant/gem_dependency_fix.rb +21 -0
  118. data/lib/radiant/gem_locator.rb +28 -0
  119. data/lib/radiant/initializer.rb +74 -7
  120. data/lib/radiant/pagination/controller.rb +1 -0
  121. data/lib/radiant/setup.rb +19 -11
  122. data/lib/task_support.rb +14 -8
  123. data/lib/tasks/database.rake +2 -0
  124. data/lib/tasks/framework.rake +32 -15
  125. data/lib/tasks/prototype.rake +8 -11
  126. data/lib/tasks/release.rake +1 -0
  127. data/public/assets/1/2375_1115822414591_1197894784_30347214_1109_n.jpg +0 -0
  128. data/public/assets/1/2375_1115822414591_1197894784_30347214_1109_n_icon.png +0 -0
  129. data/public/assets/1/2375_1115822414591_1197894784_30347214_1109_n_normal.jpg +0 -0
  130. data/public/assets/1/2375_1115822414591_1197894784_30347214_1109_n_thumbnail.png +0 -0
  131. data/public/flash/ZeroClipboard.swf +0 -0
  132. data/public/images/admin/assets/add.png +0 -0
  133. data/public/images/admin/assets/archive_icon.png +0 -0
  134. data/public/images/admin/assets/audio_icon.png +0 -0
  135. data/public/images/admin/assets/audio_thumbnail.png +0 -0
  136. data/public/images/admin/assets/c_icon.png +0 -0
  137. data/public/images/admin/assets/copy.png +0 -0
  138. data/public/images/admin/assets/css_icon.png +0 -0
  139. data/public/images/admin/assets/database_icon.png +0 -0
  140. data/public/images/admin/assets/delete.png +0 -0
  141. data/public/images/admin/assets/document_icon.png +0 -0
  142. data/public/images/admin/assets/document_thumbnail.png +0 -0
  143. data/public/images/admin/assets/flash_icon.png +0 -0
  144. data/public/images/admin/assets/flash_thumbnail.png +0 -0
  145. data/public/images/admin/assets/font_icon.png +0 -0
  146. data/public/images/admin/assets/gzip_icon.png +0 -0
  147. data/public/images/admin/assets/html_icon.png +0 -0
  148. data/public/images/admin/assets/image_icon.png +0 -0
  149. data/public/images/admin/assets/image_thumbnail.png +0 -0
  150. data/public/images/admin/assets/java_icon.png +0 -0
  151. data/public/images/admin/assets/page_edit.png +0 -0
  152. data/public/images/admin/assets/perl_icon.png +0 -0
  153. data/public/images/admin/assets/php_icon.png +0 -0
  154. data/public/images/admin/assets/presentation_icon.png +0 -0
  155. data/public/images/admin/assets/python_icon.png +0 -0
  156. data/public/images/admin/assets/reorder_assets.png +0 -0
  157. data/public/images/admin/assets/ruby_icon.png +0 -0
  158. data/public/images/admin/assets/script_icon.png +0 -0
  159. data/public/images/admin/assets/spreadsheet_icon.png +0 -0
  160. data/public/images/admin/assets/tar_icon.png +0 -0
  161. data/public/images/admin/assets/unknown_icon.png +0 -0
  162. data/public/images/admin/assets/unknown_thumbnail.png +0 -0
  163. data/public/images/admin/assets/video_icon.png +0 -0
  164. data/public/images/admin/assets/video_thumbnail.png +0 -0
  165. data/public/images/admin/assets/xml_icon.png +0 -0
  166. data/public/images/admin/assets/zip_icon.png +0 -0
  167. data/public/images/admin/avatar_64x64.png +0 -0
  168. data/public/images/admin/image.png +0 -0
  169. data/public/images/admin/javascript.png +0 -0
  170. data/public/images/admin/navigation_secondary_separator.gif +0 -0
  171. data/public/images/admin/plus_disabled.png +0 -0
  172. data/public/images/admin/search.png +0 -0
  173. data/public/images/admin/status_spinner.gif +0 -0
  174. data/public/images/admin/stylesheet.png +0 -0
  175. data/public/images/admin/upload.png +0 -0
  176. data/public/images/{radiant-badge-color.png → radiant/radiant-badge-color.png} +0 -0
  177. data/public/images/roasters/banner.jpg +0 -0
  178. data/public/images/roasters/closelabel.gif +0 -0
  179. data/public/images/roasters/comment.png +0 -0
  180. data/public/images/roasters/gallery1.jpg +0 -0
  181. data/public/images/roasters/gallery2.jpg +0 -0
  182. data/public/images/roasters/gallery3.jpg +0 -0
  183. data/public/images/roasters/gallery4.jpg +0 -0
  184. data/public/images/roasters/gift.gif +0 -0
  185. data/public/images/roasters/green.gif +0 -0
  186. data/public/images/roasters/nav-background.gif +0 -0
  187. data/public/images/roasters/nav-divider.gif +0 -0
  188. data/public/images/roasters/nextlabel.gif +0 -0
  189. data/public/images/roasters/open.gif +0 -0
  190. data/public/images/roasters/preview-1.jpg +0 -0
  191. data/public/images/roasters/preview.jpg +0 -0
  192. data/public/images/roasters/prevlabel.gif +0 -0
  193. data/public/images/roasters/prize.gif +0 -0
  194. data/public/images/roasters/recycle.gif +0 -0
  195. data/public/images/roasters/rss.gif +0 -0
  196. data/public/images/roasters/thumb-grinder.jpg +0 -0
  197. data/public/images/roasters/thumb-grower.jpg +0 -0
  198. data/public/images/roasters/thumb-roaster.jpg +0 -0
  199. data/public/images/roasters/truck.gif +0 -0
  200. data/public/javascripts/admin/application.js +11 -2
  201. data/public/javascripts/admin/codearea.js +4 -4
  202. data/public/javascripts/admin/cookie.js +1 -1
  203. data/public/javascripts/admin/dateinput.js +5 -5
  204. data/public/javascripts/admin/dropdown.js +216 -0
  205. data/public/javascripts/admin/page_preview.js +41 -0
  206. data/public/javascripts/admin/pagefield.js +54 -0
  207. data/public/javascripts/admin/popup.js +187 -64
  208. data/public/javascripts/admin/sitemap.js +2 -2
  209. data/public/javascripts/admin/status.js +13 -13
  210. data/public/javascripts/admin/tabcontrol.js +9 -7
  211. data/public/javascripts/admin/toggle.js +18 -18
  212. data/public/javascripts/admin/utility.js +5 -4
  213. data/public/loading-iframe.html +11 -0
  214. data/public/stylesheets/admin/base.css +1 -0
  215. data/public/stylesheets/admin/main.css +1 -1213
  216. data/public/stylesheets/admin/overrides.css +0 -1
  217. data/public/stylesheets/sass/admin/_base.sass +17 -0
  218. data/public/stylesheets/sass/admin/main.sass +21 -21
  219. data/public/stylesheets/sass/admin/modules/_boxes.sass +6 -0
  220. data/public/stylesheets/sass/admin/modules/_links.sass +6 -3
  221. data/public/stylesheets/sass/admin/partials/_actions.sass +51 -38
  222. data/public/stylesheets/sass/admin/partials/_avatars.sass +4 -4
  223. data/public/stylesheets/sass/admin/partials/_content.sass +41 -182
  224. data/public/stylesheets/sass/admin/partials/_dateinput.sass +5 -5
  225. data/public/stylesheets/sass/admin/partials/_deprecated.sass +31 -2
  226. data/public/stylesheets/sass/admin/partials/_dropdown.sass +28 -0
  227. data/public/stylesheets/sass/admin/partials/_forms.sass +40 -27
  228. data/public/stylesheets/sass/admin/partials/_header.sass +78 -76
  229. data/public/stylesheets/sass/admin/partials/_index.sass +147 -0
  230. data/public/stylesheets/sass/admin/partials/_popup.sass +116 -20
  231. data/public/stylesheets/sass/admin/partials/_tabcontrol.sass +5 -3
  232. data/public/stylesheets/sass/admin/partials/{_base.sass → _typography.sass} +4 -3
  233. data/public/stylesheets/sass/admin/partials/_validations.sass +16 -18
  234. data/radiant.gemspec +42 -0
  235. data/spec/controllers/admin/page_fields_controller_spec.rb +17 -0
  236. data/spec/controllers/admin/pages_controller_spec.rb +87 -6
  237. data/spec/controllers/admin/preferences_controller_spec.rb +1 -1
  238. data/spec/controllers/site_controller_spec.rb +4 -4
  239. data/spec/datasets/config_dataset.rb +3 -1
  240. data/spec/datasets/home_page_dataset.rb +1 -3
  241. data/spec/datasets/pages_dataset.rb +1 -1
  242. data/spec/datasets/users_dataset.rb +1 -1
  243. data/spec/fixtures/bad_settings.rb +5 -0
  244. data/spec/fixtures/invalid_config.yml +11 -0
  245. data/spec/fixtures/more_settings.rb +8 -0
  246. data/spec/fixtures/radiant_config.yml +2 -2
  247. data/spec/fixtures/settings.rb +5 -0
  248. data/spec/generators/extension_controller_generator_spec.rb +20 -18
  249. data/spec/generators/extension_generator_spec.rb +39 -17
  250. data/spec/generators/extension_generators_spec_helper.rb +10 -12
  251. data/spec/generators/extension_mailer_generator_spec.rb +15 -13
  252. data/spec/generators/extension_migration_generator_spec.rb +6 -5
  253. data/spec/generators/extension_model_generator_spec.rb +16 -14
  254. data/spec/generators/instance_generator_spec.rb +27 -20
  255. data/spec/helpers/admin/node_helper_spec.rb +57 -2
  256. data/spec/helpers/admin/pages_helper_spec.rb +4 -1
  257. data/spec/helpers/admin/references_helper_spec.rb +10 -1
  258. data/spec/helpers/application_helper_spec.rb +7 -2
  259. data/spec/lib/locator_spec.rb +41 -0
  260. data/spec/lib/login_system_spec.rb +6 -0
  261. data/spec/lib/radiant/admin_ui_spec.rb +12 -11
  262. data/spec/lib/radiant/config/definition_spec.rb +160 -0
  263. data/spec/lib/radiant/extension_loader_spec.rb +29 -6
  264. data/spec/lib/radiant/extension_migrator_spec.rb +11 -0
  265. data/spec/lib/radiant/extension_spec.rb +24 -4
  266. data/spec/lib/radiant/initializer_spec.rb +10 -0
  267. data/spec/lib/task_support_spec.rb +6 -0
  268. data/spec/matchers/render_matcher.rb +4 -4
  269. data/spec/models/deprecated_tags_spec.rb +85 -0
  270. data/spec/models/file_not_found_page_spec.rb +15 -11
  271. data/spec/models/page_part_spec.rb +0 -7
  272. data/spec/models/page_spec.rb +230 -174
  273. data/spec/models/radiant/config_spec.rb +38 -3
  274. data/spec/models/snippet_spec.rb +18 -0
  275. data/spec/models/standard_tags_spec.rb +175 -154
  276. data/spec/models/status_spec.rb +11 -0
  277. data/spec/models/text_filter_spec.rb +6 -2
  278. data/spec/models/user_spec.rb +0 -7
  279. data/test/fixtures/extensions/basic/basic_extension.rb +1 -6
  280. data/test/fixtures/extensions/basic/config/routes.rb +3 -0
  281. data/test/fixtures/extensions/unrouted/unrouted_extension.rb +2 -0
  282. data/{log/.keep → test/fixtures/gems/radiant-gem_ext-extension-0.0.0/app/views/dummy.haml} +0 -0
  283. data/vendor/extensions/archive/Rakefile +13 -24
  284. data/vendor/extensions/archive/app/models/archive_day_index_page.rb +4 -0
  285. data/vendor/extensions/archive/app/models/archive_finder.rb +2 -2
  286. data/vendor/extensions/archive/app/models/archive_month_index_page.rb +4 -0
  287. data/vendor/extensions/archive/app/models/archive_page.rb +50 -9
  288. data/vendor/extensions/archive/app/models/archive_year_index_page.rb +4 -0
  289. data/vendor/extensions/archive/archive_extension.rb +13 -12
  290. data/vendor/extensions/archive/config/initializers/radiant_config.rb +3 -0
  291. data/vendor/extensions/archive/config/locales/en.yml +3 -0
  292. data/vendor/extensions/archive/config/routes.rb +5 -0
  293. data/vendor/extensions/archive/cucumber.yml +1 -0
  294. data/vendor/extensions/archive/features/archive_content.feature +51 -0
  295. data/vendor/extensions/archive/features/step_definitions/web_steps.rb +7 -0
  296. data/vendor/extensions/archive/features/support/datasets_loader.rb +3 -0
  297. data/vendor/extensions/archive/features/support/env.rb +7 -0
  298. data/vendor/extensions/archive/features/support/matchers.rb +3 -0
  299. data/vendor/extensions/archive/features/support/paths.rb +14 -0
  300. data/vendor/extensions/archive/lib/archive_index_tags_and_methods.rb +28 -8
  301. data/vendor/extensions/archive/lib/radiant-archive-extension.rb +2 -0
  302. data/vendor/extensions/archive/lib/radiant-archive-extension/version.rb +3 -0
  303. data/vendor/extensions/archive/lib/tasks/archive_extension_tasks.rake +30 -3
  304. data/vendor/extensions/archive/radiant-archive-extension.gemspec +24 -0
  305. data/vendor/extensions/archive/spec/datasets/archive_dataset.rb +10 -6
  306. data/vendor/extensions/archive/spec/models/archive_day_index_page_spec.rb +13 -3
  307. data/vendor/extensions/archive/spec/models/archive_month_index_page_spec.rb +17 -3
  308. data/vendor/extensions/archive/spec/models/archive_page_spec.rb +31 -8
  309. data/vendor/extensions/archive/spec/models/archive_year_index_page_spec.rb +14 -3
  310. data/vendor/extensions/archive/spec/models/page_spec.rb +6 -0
  311. data/vendor/extensions/archive/tmp/cache/entity/d0/580097d24f3e7cfc7bf9706a0a3a3729a9de3e +6 -0
  312. data/vendor/extensions/archive/tmp/cache/meta/0e/da69d02186242cdfda62e46044566f2bc50f3a +0 -0
  313. data/vendor/extensions/assets/HELP_admin.markdown +69 -0
  314. data/vendor/extensions/assets/LICENSE +22 -0
  315. data/vendor/extensions/assets/README.md +230 -0
  316. data/vendor/extensions/assets/Rakefile +111 -0
  317. data/vendor/extensions/assets/VERSION +1 -0
  318. data/vendor/extensions/assets/app/controllers/admin/assets_controller.rb +54 -0
  319. data/vendor/extensions/assets/app/controllers/admin/page_attachments_controller.rb +45 -0
  320. data/vendor/extensions/assets/app/helpers/admin/assets_helper.rb +11 -0
  321. data/vendor/extensions/assets/app/models/asset.rb +161 -0
  322. data/vendor/extensions/assets/app/models/asset_tags.rb +378 -0
  323. data/vendor/extensions/assets/app/models/asset_type.rb +160 -0
  324. data/vendor/extensions/assets/app/models/old_page_attachment.rb +26 -0
  325. data/vendor/extensions/assets/app/models/page_attachment.rb +14 -0
  326. data/vendor/extensions/assets/app/views/admin/assets/_asset.html.haml +12 -0
  327. data/vendor/extensions/assets/app/views/admin/assets/_asset_table.html.haml +30 -0
  328. data/vendor/extensions/assets/app/views/admin/assets/_errors.html.haml +3 -0
  329. data/vendor/extensions/assets/app/views/admin/assets/_form.html.haml +20 -0
  330. data/vendor/extensions/assets/app/views/admin/assets/_page_assets.html.haml +12 -0
  331. data/vendor/extensions/assets/app/views/admin/assets/_search.html.haml +17 -0
  332. data/vendor/extensions/assets/app/views/admin/assets/_search_results.html.haml +17 -0
  333. data/vendor/extensions/assets/app/views/admin/assets/edit.html.haml +41 -0
  334. data/vendor/extensions/assets/app/views/admin/assets/index.html.haml +18 -0
  335. data/vendor/extensions/assets/app/views/admin/assets/new.html.haml +24 -0
  336. data/vendor/extensions/assets/app/views/admin/assets/remove.html.haml +16 -0
  337. data/vendor/extensions/assets/app/views/admin/configuration/_edit.html.haml +8 -0
  338. data/vendor/extensions/assets/app/views/admin/configuration/_show.html.haml +12 -0
  339. data/vendor/extensions/assets/app/views/admin/page_attachments/_attachment.html.haml +22 -0
  340. data/vendor/extensions/assets/app/views/admin/page_attachments/_new_attachment.html.haml +18 -0
  341. data/vendor/extensions/assets/app/views/admin/page_parts/_page_part.html.haml +20 -0
  342. data/vendor/extensions/assets/app/views/admin/pages/_asset_popups.html.haml +42 -0
  343. data/vendor/extensions/assets/app/views/admin/pages/_assets.html.haml +13 -0
  344. data/vendor/extensions/assets/app/views/admin/removed/_assets_bucket.html.haml +8 -0
  345. data/vendor/extensions/assets/app/views/admin/removed/_assets_container.html.haml +58 -0
  346. data/vendor/extensions/assets/app/views/admin/removed/_bucket.html.haml +11 -0
  347. data/vendor/extensions/assets/app/views/admin/removed/_bucket_asset.html.haml +9 -0
  348. data/vendor/extensions/assets/app/views/admin/removed/_show_bucket_link.html.haml +4 -0
  349. data/vendor/extensions/assets/app/views/admin/removed/_upload_to_page.html.haml +12 -0
  350. data/vendor/extensions/assets/app/views/admin/removed/bucket/_iframe.html.haml +1 -0
  351. data/vendor/extensions/assets/artwork/icons.png +0 -0
  352. data/vendor/extensions/assets/assets_extension.rb +86 -0
  353. data/vendor/extensions/assets/config/initializers/interpolation.rb +6 -0
  354. data/vendor/extensions/assets/config/initializers/radiant_config.rb +37 -0
  355. data/vendor/extensions/assets/config/locales/en.yml +105 -0
  356. data/vendor/extensions/assets/config/locales/nl.yml +105 -0
  357. data/vendor/extensions/assets/config/routes.rb +8 -0
  358. data/vendor/extensions/assets/db/migrate/001_create_assets.rb +12 -0
  359. data/vendor/extensions/assets/db/migrate/002_create_paperclip_attributes.rb +13 -0
  360. data/vendor/extensions/assets/db/migrate/003_create_user_observer.rb +13 -0
  361. data/vendor/extensions/assets/db/migrate/004_create_page_attachments.rb +19 -0
  362. data/vendor/extensions/assets/db/migrate/005_rename_users.rb +13 -0
  363. data/vendor/extensions/assets/db/migrate/20090316132151_disable_file_types.rb +20 -0
  364. data/vendor/extensions/assets/db/migrate/20110513205050_asset_uuid.rb +11 -0
  365. data/vendor/extensions/assets/lib/assets_admin_ui.rb +32 -0
  366. data/vendor/extensions/assets/lib/page_asset_associations.rb +13 -0
  367. data/vendor/extensions/assets/lib/paperclip/frame_grab.rb +39 -0
  368. data/vendor/extensions/assets/lib/tag_deprecation.rb +73 -0
  369. data/vendor/extensions/assets/lib/tasks/assets_extension_tasks.rake +123 -0
  370. data/vendor/extensions/assets/lib/tasks/paperclip_tasks.rake +79 -0
  371. data/vendor/extensions/assets/public/flash/ZeroClipboard.swf +0 -0
  372. data/vendor/extensions/assets/public/images/admin/assets/add.png +0 -0
  373. data/vendor/extensions/assets/public/images/admin/assets/archive_icon.png +0 -0
  374. data/vendor/extensions/assets/public/images/admin/assets/audio_icon.png +0 -0
  375. data/vendor/extensions/assets/public/images/admin/assets/audio_thumbnail.png +0 -0
  376. data/vendor/extensions/assets/public/images/admin/assets/c_icon.png +0 -0
  377. data/vendor/extensions/assets/public/images/admin/assets/copy.png +0 -0
  378. data/vendor/extensions/assets/public/images/admin/assets/css_icon.png +0 -0
  379. data/vendor/extensions/assets/public/images/admin/assets/database_icon.png +0 -0
  380. data/vendor/extensions/assets/public/images/admin/assets/delete.png +0 -0
  381. data/vendor/extensions/assets/public/images/admin/assets/document_icon.png +0 -0
  382. data/vendor/extensions/assets/public/images/admin/assets/document_thumbnail.png +0 -0
  383. data/vendor/extensions/assets/public/images/admin/assets/flash_icon.png +0 -0
  384. data/vendor/extensions/assets/public/images/admin/assets/flash_thumbnail.png +0 -0
  385. data/vendor/extensions/assets/public/images/admin/assets/font_icon.png +0 -0
  386. data/vendor/extensions/assets/public/images/admin/assets/gzip_icon.png +0 -0
  387. data/vendor/extensions/assets/public/images/admin/assets/html_icon.png +0 -0
  388. data/vendor/extensions/assets/public/images/admin/assets/image_icon.png +0 -0
  389. data/vendor/extensions/assets/public/images/admin/assets/image_thumbnail.png +0 -0
  390. data/vendor/extensions/assets/public/images/admin/assets/java_icon.png +0 -0
  391. data/vendor/extensions/assets/public/images/admin/assets/page_edit.png +0 -0
  392. data/vendor/extensions/assets/public/images/admin/assets/perl_icon.png +0 -0
  393. data/vendor/extensions/assets/public/images/admin/assets/php_icon.png +0 -0
  394. data/vendor/extensions/assets/public/images/admin/assets/presentation_icon.png +0 -0
  395. data/vendor/extensions/assets/public/images/admin/assets/python_icon.png +0 -0
  396. data/vendor/extensions/assets/public/images/admin/assets/reorder_assets.png +0 -0
  397. data/vendor/extensions/assets/public/images/admin/assets/ruby_icon.png +0 -0
  398. data/vendor/extensions/assets/public/images/admin/assets/script_icon.png +0 -0
  399. data/vendor/extensions/assets/public/images/admin/assets/spreadsheet_icon.png +0 -0
  400. data/vendor/extensions/assets/public/images/admin/assets/tar_icon.png +0 -0
  401. data/vendor/extensions/assets/public/images/admin/assets/unknown_icon.png +0 -0
  402. data/vendor/extensions/assets/public/images/admin/assets/unknown_thumbnail.png +0 -0
  403. data/vendor/extensions/assets/public/images/admin/assets/video_icon.png +0 -0
  404. data/vendor/extensions/assets/public/images/admin/assets/video_thumbnail.png +0 -0
  405. data/vendor/extensions/assets/public/images/admin/assets/xml_icon.png +0 -0
  406. data/vendor/extensions/assets/public/images/admin/assets/zip_icon.png +0 -0
  407. data/vendor/extensions/assets/public/javascripts/admin/assets.js +238 -0
  408. data/vendor/extensions/assets/public/stylesheets/sass/admin/assets.sass +203 -0
  409. data/vendor/extensions/assets/spec/controllers/admin/assets_controller_spec.rb +50 -0
  410. data/vendor/extensions/assets/spec/controllers/admin/page_attachment_controller_spec.rb +51 -0
  411. data/vendor/extensions/assets/spec/datasets/assets_dataset.rb +31 -0
  412. data/vendor/extensions/assets/spec/lib/asset_tags_spec.rb +9 -0
  413. data/vendor/extensions/assets/spec/lib/tag_deprecation_spec.rb +49 -0
  414. data/vendor/extensions/assets/spec/models/asset_spec.rb +71 -0
  415. data/vendor/extensions/assets/spec/models/asset_type_spec.rb +49 -0
  416. data/vendor/extensions/assets/spec/spec.opts +6 -0
  417. data/vendor/extensions/assets/spec/spec_helper.rb +36 -0
  418. data/vendor/extensions/assets/wireframes/edit-page-assets-2.bmml +453 -0
  419. data/vendor/extensions/assets/wireframes/edit-page-assets-2.png +0 -0
  420. data/vendor/extensions/assets/wireframes/edit-page-assets-3.bmml +454 -0
  421. data/vendor/extensions/assets/wireframes/edit-page-assets-3.png +0 -0
  422. data/vendor/extensions/assets/wireframes/edit-page-assets.bmml +433 -0
  423. data/vendor/extensions/assets/wireframes/edit-page-assets.png +0 -0
  424. data/vendor/extensions/assets/wireframes/edit-page.bmml +174 -0
  425. data/vendor/extensions/assets/wireframes/edit-page.png +0 -0
  426. data/vendor/extensions/debug/README +3 -0
  427. data/vendor/extensions/debug/Rakefile +136 -0
  428. data/{app → vendor/extensions/debug/app}/models/env_dump_page.rb +0 -0
  429. data/vendor/extensions/debug/config/locales/en.yml +3 -0
  430. data/vendor/extensions/debug/config/routes.rb +5 -0
  431. data/vendor/extensions/debug/debug_extension.rb +11 -0
  432. data/vendor/extensions/debug/lib/tasks/debug_extension_tasks.rake +55 -0
  433. data/{spec → vendor/extensions/debug/spec}/models/env_dump_page_spec.rb +0 -0
  434. data/vendor/extensions/debug/spec/spec.opts +6 -0
  435. data/vendor/extensions/debug/spec/spec_helper.rb +36 -0
  436. data/vendor/extensions/dutch_language_pack/config/locales/nl.yml +80 -29
  437. data/vendor/extensions/exporter/README +5 -0
  438. data/vendor/extensions/exporter/Rakefile +116 -0
  439. data/vendor/extensions/exporter/app/controllers/admin/export_controller.rb +5 -0
  440. data/vendor/extensions/exporter/app/models/radiant/exporter.rb +41 -0
  441. data/vendor/extensions/exporter/config/locales/en.yml +3 -0
  442. data/vendor/extensions/exporter/config/routes.rb +6 -0
  443. data/vendor/extensions/exporter/cucumber.yml +1 -0
  444. data/vendor/extensions/exporter/exporter_extension.rb +8 -0
  445. data/vendor/extensions/exporter/features/support/env.rb +16 -0
  446. data/vendor/extensions/exporter/features/support/paths.rb +14 -0
  447. data/vendor/extensions/exporter/lib/tasks/exporter_extension_tasks.rake +55 -0
  448. data/{spec → vendor/extensions/exporter/spec}/controllers/admin/export_controller_spec.rb +1 -1
  449. data/vendor/extensions/exporter/spec/models/radiant/exporter_spec.rb +29 -0
  450. data/vendor/extensions/exporter/spec/spec.opts +6 -0
  451. data/vendor/extensions/exporter/spec/spec_helper.rb +36 -0
  452. data/vendor/extensions/german_language_pack/config/locales/de.yml +52 -0
  453. data/vendor/extensions/japanese_language_pack/README +40 -1
  454. data/vendor/extensions/japanese_language_pack/config/locales/ja.yml +107 -71
  455. data/vendor/extensions/japanese_language_pack/config/locales/ja_available_tags.yml +327 -347
  456. data/vendor/extensions/japanese_language_pack/japanese_language_pack_extension.rb +3 -3
  457. data/vendor/extensions/markdown_filter/vendor/kramdown/CONTRIBUTERS +2 -1
  458. data/vendor/extensions/markdown_filter/vendor/kramdown/ChangeLog +1250 -0
  459. data/vendor/extensions/markdown_filter/vendor/kramdown/README +1 -1
  460. data/vendor/extensions/markdown_filter/vendor/kramdown/Rakefile +2 -2
  461. data/vendor/extensions/markdown_filter/vendor/kramdown/VERSION +1 -1
  462. data/vendor/extensions/markdown_filter/vendor/kramdown/bin/kramdown +5 -4
  463. data/vendor/extensions/markdown_filter/vendor/kramdown/data/kramdown/document.html +11 -2
  464. data/vendor/extensions/markdown_filter/vendor/kramdown/doc/{default.less.css → default.scss.css} +18 -9
  465. data/vendor/extensions/markdown_filter/vendor/kramdown/doc/default.template +11 -2
  466. data/vendor/extensions/markdown_filter/vendor/kramdown/doc/documentation.page +1 -1
  467. data/vendor/extensions/markdown_filter/vendor/kramdown/doc/index.page +37 -4
  468. data/vendor/extensions/markdown_filter/vendor/kramdown/doc/quickref.page +2 -2
  469. data/vendor/extensions/markdown_filter/vendor/kramdown/doc/syntax.page +281 -187
  470. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/converter.rb +1 -0
  471. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/converter/html.rb +92 -90
  472. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/converter/kramdown.rb +421 -0
  473. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/converter/latex.rb +311 -289
  474. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/document.rb +10 -6
  475. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/options.rb +29 -15
  476. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/base.rb +0 -1
  477. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/html.rb +153 -41
  478. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown.rb +21 -3
  479. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/abbreviation.rb +1 -0
  480. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/attribute_list.rb +20 -12
  481. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/autolink.rb +11 -4
  482. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/block_boundary.rb +46 -0
  483. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/blockquote.rb +7 -3
  484. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/codeblock.rb +5 -3
  485. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/escaped_chars.rb +1 -1
  486. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/extension.rb +23 -8
  487. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/footnote.rb +3 -2
  488. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/header.rb +11 -11
  489. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/html.rb +18 -16
  490. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/html_entity.rb +2 -1
  491. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/link.rb +13 -10
  492. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/list.rb +48 -37
  493. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/math.rb +15 -4
  494. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/paragraph.rb +14 -3
  495. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/table.rb +17 -9
  496. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/parser/kramdown/typographic_symbol.rb +4 -4
  497. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/utils.rb +37 -0
  498. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/utils/entities.rb +335 -0
  499. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/utils/html.rb +75 -0
  500. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/utils/ordered_hash.rb +79 -0
  501. data/vendor/extensions/markdown_filter/vendor/kramdown/lib/kramdown/version.rb +1 -1
  502. data/vendor/extensions/markdown_filter/vendor/kramdown/man/man1/kramdown.1 +60 -36
  503. data/vendor/extensions/markdown_filter/vendor/kramdown/test/run_tests.rb +1 -1
  504. data/vendor/extensions/markdown_filter/vendor/kramdown/test/test_files.rb +66 -4
  505. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/02_eob/middle.html +0 -1
  506. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/04_header/atx_header.html +5 -2
  507. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/04_header/atx_header.text +3 -1
  508. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/04_header/setext_header.html +4 -5
  509. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/04_header/setext_header.html.19 +30 -0
  510. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/05_blockquote/lazy.html +34 -0
  511. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/05_blockquote/lazy.text +20 -0
  512. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/05_blockquote/nested.html +1 -0
  513. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/05_blockquote/nested.text +1 -0
  514. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/05_blockquote/with_code_blocks.html +2 -2
  515. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/06_codeblock/lazy.html +4 -0
  516. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/06_codeblock/lazy.text +5 -0
  517. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/06_codeblock/no_newline_at_end_1.html +2 -0
  518. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/06_codeblock/no_newline_at_end_1.text +2 -0
  519. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/06_codeblock/whitespace.html +2 -2
  520. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/06_codeblock/with_ial.html +6 -0
  521. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/06_codeblock/with_ial.text +5 -0
  522. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/07_horizontal_rule/error.html.19 +7 -0
  523. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/07_horizontal_rule/normal.html +0 -2
  524. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/07_horizontal_rule/normal.text +0 -2
  525. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/item_ial.html +1 -3
  526. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/lazy.html +39 -0
  527. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/lazy.text +29 -0
  528. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/list_and_others.html +5 -3
  529. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/list_and_others.text +1 -0
  530. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/other_first_element.html +2 -2
  531. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/other_first_element.text +1 -1
  532. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/simple_ul.html +0 -13
  533. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/simple_ul.text +0 -7
  534. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/special_cases.html +8 -31
  535. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/08_list/special_cases.text +2 -15
  536. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/comment.html +2 -2
  537. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/code.html +1 -1
  538. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/code.text +1 -1
  539. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/emphasis.html +2 -0
  540. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/emphasis.text +2 -0
  541. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/table_normal.html +2 -1
  542. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/table_simple.html +40 -2
  543. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/table_simple.text +42 -0
  544. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/html_to_native/typography.html.19 +1 -0
  545. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/invalid_html_1.html +2 -0
  546. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/parse_as_raw.html +2 -2
  547. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/parse_as_span.html +1 -1
  548. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/simple.html +2 -0
  549. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/simple.html.19 +64 -0
  550. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/simple.text +2 -0
  551. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/11_ial/auto_id_and_ial.html +1 -1
  552. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/11_ial/simple.html +4 -4
  553. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/comment.html +6 -3
  554. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/comment.text +2 -1
  555. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/ignored.html +5 -1
  556. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/ignored.text +1 -1
  557. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/nomarkdown.html +5 -1
  558. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/nomarkdown.kramdown +20 -0
  559. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/nomarkdown.latex +13 -0
  560. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/nomarkdown.text +11 -1
  561. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/options.html +0 -3
  562. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/12_extension/options.text +0 -6
  563. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/13_definition_list/item_ial.html +12 -0
  564. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/13_definition_list/item_ial.text +8 -0
  565. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/13_definition_list/simple.html +2 -2
  566. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/14_table/errors.html +5 -0
  567. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/14_table/errors.text +6 -0
  568. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/14_table/header.text +1 -1
  569. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/14_table/no_table.text +1 -1
  570. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/14_table/simple.html +78 -0
  571. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/14_table/simple.text +22 -0
  572. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/15_math/normal.html +11 -4
  573. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/15_math/normal.text +10 -0
  574. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/16_toc/no_toc_depth.html +33 -0
  575. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/16_toc/no_toc_depth.options +1 -0
  576. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/16_toc/no_toc_depth.text +16 -0
  577. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/16_toc/toc_depth_2.html +24 -0
  578. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/16_toc/toc_depth_2.options +1 -0
  579. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/16_toc/toc_depth_2.text +16 -0
  580. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/encoding.html +1 -1
  581. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/01_link/empty.html +2 -0
  582. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/01_link/empty.text +2 -0
  583. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/01_link/image_in_a.html +3 -3
  584. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/01_link/imagelinks.html +8 -6
  585. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/01_link/imagelinks.text +2 -0
  586. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/01_link/inline.html +11 -5
  587. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/01_link/inline.html.19 +46 -0
  588. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/01_link/inline.text +11 -5
  589. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/01_link/link_defs.html +2 -1
  590. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/01_link/link_defs.text +4 -0
  591. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/01_link/reference.html +3 -0
  592. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/01_link/reference.html.19 +35 -0
  593. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/01_link/reference.text +5 -0
  594. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/03_codespan/highlighting.html +1 -0
  595. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/03_codespan/highlighting.text +1 -0
  596. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/04_footnote/definitions.html +3 -0
  597. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/04_footnote/definitions.latex +3 -4
  598. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/04_footnote/definitions.text +6 -0
  599. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/04_footnote/footnote_nr.latex +1 -5
  600. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/04_footnote/markers.latex +5 -14
  601. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/05_html/markdown_attr.html +1 -1
  602. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/05_html/markdown_attr.text +1 -1
  603. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/05_html/normal.html +5 -3
  604. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/05_html/normal.text +2 -0
  605. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/escaped_chars/normal.html +2 -0
  606. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/escaped_chars/normal.text +2 -0
  607. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/extension/comment.html +5 -5
  608. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/extension/ignored.html +1 -1
  609. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/line_breaks/normal.latex +12 -0
  610. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/text_substitutions/entities.html +1 -1
  611. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/text_substitutions/entities.options +1 -0
  612. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/text_substitutions/entities_as_char.html +1 -0
  613. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/text_substitutions/entities_as_char.html.19 +1 -0
  614. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/text_substitutions/entities_as_char.options +1 -0
  615. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/text_substitutions/entities_as_char.text +1 -0
  616. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/text_substitutions/entities_as_input.html +1 -0
  617. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/text_substitutions/entities_as_input.options +1 -0
  618. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/text_substitutions/entities_as_input.text +1 -0
  619. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/text_substitutions/entities_numeric.html +1 -0
  620. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/text_substitutions/entities_numeric.options +1 -0
  621. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/text_substitutions/entities_numeric.text +1 -0
  622. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/text_substitutions/entities_symbolic.html +1 -0
  623. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/text_substitutions/entities_symbolic.options +1 -0
  624. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/text_substitutions/entities_symbolic.text +1 -0
  625. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/text_substitutions/typography.html +1 -1
  626. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/text_substitutions/typography.html.19 +18 -0
  627. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/span/text_substitutions/typography.text +1 -1
  628. data/vendor/extensions/russian_language_pack/README +3 -1
  629. data/vendor/extensions/russian_language_pack/config/locales/ru.yml +28 -19
  630. data/vendor/extensions/russian_language_pack/config/locales/ru_available_tags.yml +6 -8
  631. data/vendor/extensions/russian_language_pack/lib/tasks/i18n_ru_extension_tasks.rake +4 -4
  632. data/vendor/extensions/russian_language_pack/russian_language_pack_extension.rb +4 -4
  633. data/vendor/extensions/sheets/LICENSE +21 -0
  634. data/vendor/extensions/sheets/README.md +33 -0
  635. data/vendor/extensions/sheets/Rakefile +117 -0
  636. data/vendor/extensions/sheets/app/controllers/admin/scripts_controller.rb +13 -0
  637. data/vendor/extensions/sheets/app/controllers/admin/sheet_resource_controller.rb +54 -0
  638. data/vendor/extensions/sheets/app/controllers/admin/styles_controller.rb +13 -0
  639. data/vendor/extensions/sheets/app/helpers/admin/scripts_helper.rb +5 -0
  640. data/vendor/extensions/sheets/app/helpers/admin/styles_helper.rb +5 -0
  641. data/vendor/extensions/sheets/app/models/javascript_page.rb +16 -0
  642. data/vendor/extensions/sheets/app/models/sheet.rb +89 -0
  643. data/vendor/extensions/sheets/app/models/stylesheet_page.rb +16 -0
  644. data/vendor/extensions/sheets/app/views/admin/scripts/edit.html.haml +30 -0
  645. data/vendor/extensions/sheets/app/views/admin/scripts/index.html.haml +27 -0
  646. data/vendor/extensions/sheets/app/views/admin/scripts/new.html.haml +30 -0
  647. data/vendor/extensions/sheets/app/views/admin/sheets/_edit_scripts.html.haml +40 -0
  648. data/vendor/extensions/sheets/app/views/admin/sheets/_upload_script.html.haml +16 -0
  649. data/vendor/extensions/sheets/app/views/admin/styles/edit.html.haml +30 -0
  650. data/vendor/extensions/sheets/app/views/admin/styles/index.html.haml +31 -0
  651. data/vendor/extensions/sheets/app/views/admin/styles/new.html.haml +30 -0
  652. data/vendor/extensions/sheets/config/locales/en.yml +15 -0
  653. data/vendor/extensions/sheets/config/routes.rb +6 -0
  654. data/vendor/extensions/sheets/cucumber.yml +1 -0
  655. data/vendor/extensions/sheets/features/support/env.rb +16 -0
  656. data/vendor/extensions/sheets/features/support/paths.rb +14 -0
  657. data/vendor/extensions/sheets/lib/javascript_tags.rb +58 -0
  658. data/vendor/extensions/sheets/lib/radiant-sheets-extension.rb +2 -0
  659. data/vendor/extensions/sheets/lib/radiant-sheets-extension/version.rb +3 -0
  660. data/vendor/extensions/sheets/lib/sass_filter.rb +16 -0
  661. data/vendor/extensions/sheets/lib/stylesheet_tags.rb +61 -0
  662. data/vendor/extensions/sheets/lib/tasks/sheets_extension_tasks.rake +79 -0
  663. data/vendor/extensions/sheets/public/images/admin/javascript.png +0 -0
  664. data/vendor/extensions/sheets/public/images/admin/stylesheet.png +0 -0
  665. data/vendor/extensions/sheets/radiant-sheets-extension.gemspec +24 -0
  666. data/vendor/extensions/sheets/sass.html +82 -0
  667. data/vendor/extensions/sheets/sheets_extension.rb +88 -0
  668. data/vendor/extensions/sheets/spec/controllers/admin/scripts_controller_spec.rb +123 -0
  669. data/vendor/extensions/sheets/spec/controllers/admin/styles_controller_spec.rb +124 -0
  670. data/vendor/extensions/sheets/spec/datasets/javascripts_dataset.rb +10 -0
  671. data/vendor/extensions/sheets/spec/datasets/stylesheets_dataset.rb +15 -0
  672. data/vendor/extensions/sheets/spec/helpers/admin/scripts_helper_spec.rb +5 -0
  673. data/vendor/extensions/sheets/spec/helpers/admin/styles_helper_spec.rb +5 -0
  674. data/vendor/extensions/sheets/spec/lib/javascript_tags_spec.rb +36 -0
  675. data/vendor/extensions/sheets/spec/lib/stylesheet_tags_spec.rb +41 -0
  676. data/vendor/extensions/sheets/spec/models/javascript_page_spec.rb +80 -0
  677. data/vendor/extensions/sheets/spec/models/page_spec.rb +5 -0
  678. data/vendor/extensions/sheets/spec/models/stylesheet_page_spec.rb +80 -0
  679. data/vendor/extensions/sheets/spec/spec.opts +6 -0
  680. data/vendor/extensions/sheets/spec/spec_helper.rb +36 -0
  681. data/vendor/extensions/site_templates/README +3 -0
  682. data/vendor/extensions/site_templates/Rakefile +136 -0
  683. data/{db → vendor/extensions/site_templates/db}/templates/empty.yml +0 -0
  684. data/vendor/extensions/site_templates/db/templates/roasters.yml +7826 -0
  685. data/vendor/extensions/site_templates/db/templates/simple-blog.yml +251 -0
  686. data/vendor/extensions/site_templates/db/templates/styled-blog.yml +535 -0
  687. data/vendor/extensions/site_templates/lib/tasks/site_templates_extension_tasks.rake +55 -0
  688. data/vendor/extensions/site_templates/public/images/roasters/banner.jpg +0 -0
  689. data/vendor/extensions/site_templates/public/images/roasters/closelabel.gif +0 -0
  690. data/vendor/extensions/site_templates/public/images/roasters/comment.png +0 -0
  691. data/vendor/extensions/site_templates/public/images/roasters/gallery1.jpg +0 -0
  692. data/vendor/extensions/site_templates/public/images/roasters/gallery2.jpg +0 -0
  693. data/vendor/extensions/site_templates/public/images/roasters/gallery3.jpg +0 -0
  694. data/vendor/extensions/site_templates/public/images/roasters/gallery4.jpg +0 -0
  695. data/vendor/extensions/site_templates/public/images/roasters/gift.gif +0 -0
  696. data/vendor/extensions/site_templates/public/images/roasters/green.gif +0 -0
  697. data/vendor/extensions/site_templates/public/images/roasters/nav-background.gif +0 -0
  698. data/vendor/extensions/site_templates/public/images/roasters/nav-divider.gif +0 -0
  699. data/vendor/extensions/site_templates/public/images/roasters/nextlabel.gif +0 -0
  700. data/vendor/extensions/site_templates/public/images/roasters/open.gif +0 -0
  701. data/vendor/extensions/site_templates/public/images/roasters/preview-1.jpg +0 -0
  702. data/vendor/extensions/site_templates/public/images/roasters/preview.jpg +0 -0
  703. data/vendor/extensions/site_templates/public/images/roasters/prevlabel.gif +0 -0
  704. data/vendor/extensions/site_templates/public/images/roasters/prize.gif +0 -0
  705. data/vendor/extensions/site_templates/public/images/roasters/recycle.gif +0 -0
  706. data/vendor/extensions/site_templates/public/images/roasters/rss.gif +0 -0
  707. data/vendor/extensions/site_templates/public/images/roasters/thumb-grinder.jpg +0 -0
  708. data/vendor/extensions/site_templates/public/images/roasters/thumb-grower.jpg +0 -0
  709. data/vendor/extensions/site_templates/public/images/roasters/thumb-roaster.jpg +0 -0
  710. data/vendor/extensions/site_templates/public/images/roasters/truck.gif +0 -0
  711. data/vendor/extensions/site_templates/site_templates_extension.rb +8 -0
  712. data/vendor/extensions/textile_filter/textile.html +2 -2
  713. data/vendor/plugins/dataset/lib/dataset.rb +2 -2
  714. data/vendor/plugins/dataset/plugit/descriptor.rb +25 -0
  715. data/vendor/plugins/haml/README.md +95 -154
  716. data/vendor/plugins/haml/Rakefile +104 -91
  717. data/vendor/plugins/haml/TODO +26 -20
  718. data/vendor/plugins/haml/VERSION +1 -1
  719. data/vendor/plugins/haml/VERSION_NAME +1 -1
  720. data/vendor/plugins/haml/bin/css2sass +7 -1
  721. data/vendor/plugins/haml/bin/sass-convert +7 -0
  722. data/vendor/plugins/haml/doc-src/FAQ.md +16 -4
  723. data/vendor/plugins/haml/doc-src/HAML_CHANGELOG.md +536 -1
  724. data/vendor/plugins/haml/doc-src/HAML_REFERENCE.md +176 -16
  725. data/vendor/plugins/haml/doc-src/INDENTED_SYNTAX.md +210 -0
  726. data/vendor/plugins/haml/doc-src/SASS_CHANGELOG.md +1159 -0
  727. data/vendor/plugins/haml/doc-src/SASS_REFERENCE.md +1163 -633
  728. data/vendor/plugins/haml/doc-src/SCSS_FOR_SASS_USERS.md +155 -0
  729. data/vendor/plugins/haml/ext/extconf.rb +10 -0
  730. data/vendor/plugins/haml/extra/haml-mode.el +36 -34
  731. data/vendor/plugins/haml/extra/sass-mode.el +10 -9
  732. data/vendor/plugins/haml/haml.gemspec +8 -33
  733. data/vendor/plugins/haml/init.rbc +404 -0
  734. data/vendor/plugins/haml/lib/haml.rb +5 -2
  735. data/vendor/plugins/haml/lib/haml.rbc +569 -0
  736. data/vendor/plugins/haml/lib/haml/buffer.rb +22 -4
  737. data/vendor/plugins/haml/lib/haml/buffer.rbc +4048 -0
  738. data/vendor/plugins/haml/lib/haml/engine.rb +13 -4
  739. data/vendor/plugins/haml/lib/haml/engine.rbc +3852 -0
  740. data/vendor/plugins/haml/lib/haml/error.rbc +339 -0
  741. data/vendor/plugins/haml/lib/haml/exec.rb +456 -64
  742. data/vendor/plugins/haml/lib/haml/filters.rb +19 -1
  743. data/vendor/plugins/haml/lib/haml/filters.rbc +5617 -0
  744. data/vendor/plugins/haml/lib/haml/helpers.rb +40 -19
  745. data/vendor/plugins/haml/lib/haml/helpers.rbc +7086 -0
  746. data/vendor/plugins/haml/lib/haml/helpers/action_view_extensions.rbc +522 -0
  747. data/vendor/plugins/haml/lib/haml/helpers/action_view_mods.rb +38 -12
  748. data/vendor/plugins/haml/lib/haml/helpers/action_view_mods.rbc +5515 -0
  749. data/vendor/plugins/haml/lib/haml/helpers/xss_mods.rb +13 -2
  750. data/vendor/plugins/haml/lib/haml/html.rb +209 -49
  751. data/vendor/plugins/haml/lib/haml/html/erb.rb +141 -0
  752. data/vendor/plugins/haml/lib/haml/precompiler.rb +130 -89
  753. data/vendor/plugins/haml/lib/haml/precompiler.rbc +22247 -0
  754. data/vendor/plugins/haml/lib/haml/railtie.rb +16 -13
  755. data/vendor/plugins/haml/lib/haml/railtie.rbc +409 -0
  756. data/vendor/plugins/haml/lib/haml/root.rb +7 -0
  757. data/vendor/plugins/haml/lib/haml/root.rbc +160 -0
  758. data/vendor/plugins/haml/lib/haml/shared.rbc +1137 -0
  759. data/vendor/plugins/haml/lib/haml/template.rb +13 -12
  760. data/vendor/plugins/haml/lib/haml/template.rbc +1838 -0
  761. data/vendor/plugins/haml/lib/haml/template/options.rb +16 -0
  762. data/vendor/plugins/haml/lib/haml/template/options.rbc +235 -0
  763. data/vendor/plugins/haml/lib/haml/template/plugin.rb +18 -6
  764. data/vendor/plugins/haml/lib/haml/template/plugin.rbc +2720 -0
  765. data/vendor/plugins/haml/lib/haml/util.rb +483 -44
  766. data/vendor/plugins/haml/lib/haml/util.rbc +12059 -0
  767. data/vendor/plugins/haml/lib/haml/util/subset_map.rb +101 -0
  768. data/vendor/plugins/haml/lib/haml/util/subset_map.rbc +1316 -0
  769. data/vendor/plugins/haml/lib/haml/version.rb +25 -2
  770. data/vendor/plugins/haml/lib/haml/version.rbc +1671 -0
  771. data/vendor/plugins/haml/lib/sass.rb +7 -2
  772. data/vendor/plugins/haml/lib/sass.rbc +492 -0
  773. data/vendor/plugins/haml/lib/sass/callbacks.rb +52 -0
  774. data/vendor/plugins/haml/lib/sass/callbacks.rbc +388 -0
  775. data/vendor/plugins/haml/lib/sass/css.rb +86 -196
  776. data/vendor/plugins/haml/lib/sass/engine.rb +304 -99
  777. data/vendor/plugins/haml/lib/sass/engine.rbc +17020 -0
  778. data/vendor/plugins/haml/lib/sass/environment.rb +67 -3
  779. data/vendor/plugins/haml/lib/sass/environment.rbc +1751 -0
  780. data/vendor/plugins/haml/lib/sass/error.rb +166 -25
  781. data/vendor/plugins/haml/lib/sass/error.rbc +2801 -0
  782. data/vendor/plugins/haml/lib/sass/files.rb +43 -38
  783. data/vendor/plugins/haml/lib/sass/files.rbc +3118 -0
  784. data/vendor/plugins/haml/lib/sass/less.rb +382 -0
  785. data/vendor/plugins/haml/lib/sass/plugin.rb +198 -150
  786. data/vendor/plugins/haml/lib/sass/plugin.rbc +4356 -0
  787. data/vendor/plugins/haml/lib/sass/plugin/configuration.rb +221 -0
  788. data/vendor/plugins/haml/lib/sass/plugin/configuration.rbc +1343 -0
  789. data/vendor/plugins/haml/lib/sass/plugin/generic.rb +15 -0
  790. data/vendor/plugins/haml/lib/sass/plugin/merb.rb +8 -20
  791. data/vendor/plugins/haml/lib/sass/plugin/rack.rb +2 -20
  792. data/vendor/plugins/haml/lib/sass/plugin/rack.rbc +446 -0
  793. data/vendor/plugins/haml/lib/sass/plugin/rails.rb +16 -9
  794. data/vendor/plugins/haml/lib/sass/plugin/rails.rbc +879 -0
  795. data/vendor/plugins/haml/lib/sass/plugin/staleness_checker.rb +123 -0
  796. data/vendor/plugins/haml/lib/sass/plugin/staleness_checker.rbc +2019 -0
  797. data/vendor/plugins/haml/lib/sass/repl.rb +1 -1
  798. data/vendor/plugins/haml/lib/sass/script.rb +32 -31
  799. data/vendor/plugins/haml/lib/sass/script.rbc +1188 -0
  800. data/vendor/plugins/haml/lib/sass/script/bool.rb +2 -1
  801. data/vendor/plugins/haml/lib/sass/script/bool.rbc +366 -0
  802. data/vendor/plugins/haml/lib/sass/script/color.rb +295 -26
  803. data/vendor/plugins/haml/lib/sass/script/color.rbc +8148 -0
  804. data/vendor/plugins/haml/lib/sass/script/css_lexer.rb +29 -0
  805. data/vendor/plugins/haml/lib/sass/script/css_lexer.rbc +809 -0
  806. data/vendor/plugins/haml/lib/sass/script/css_parser.rb +31 -0
  807. data/vendor/plugins/haml/lib/sass/script/css_parser.rbc +628 -0
  808. data/vendor/plugins/haml/lib/sass/script/funcall.rb +33 -6
  809. data/vendor/plugins/haml/lib/sass/script/funcall.rbc +1805 -0
  810. data/vendor/plugins/haml/lib/sass/script/functions.rb +637 -33
  811. data/vendor/plugins/haml/lib/sass/script/functions.rbc +8418 -0
  812. data/vendor/plugins/haml/lib/sass/script/interpolation.rb +70 -0
  813. data/vendor/plugins/haml/lib/sass/script/interpolation.rbc +1225 -0
  814. data/vendor/plugins/haml/lib/sass/script/lexer.rb +200 -57
  815. data/vendor/plugins/haml/lib/sass/script/lexer.rbc +7231 -0
  816. data/vendor/plugins/haml/lib/sass/script/literal.rb +69 -10
  817. data/vendor/plugins/haml/lib/sass/script/literal.rbc +3365 -0
  818. data/vendor/plugins/haml/lib/sass/script/node.rb +99 -1
  819. data/vendor/plugins/haml/lib/sass/script/node.rbc +1418 -0
  820. data/vendor/plugins/haml/lib/sass/script/number.rb +64 -24
  821. data/vendor/plugins/haml/lib/sass/script/number.rbc +6024 -0
  822. data/vendor/plugins/haml/lib/sass/script/operation.rb +53 -3
  823. data/vendor/plugins/haml/lib/sass/script/operation.rbc +1856 -0
  824. data/vendor/plugins/haml/lib/sass/script/parser.rb +229 -50
  825. data/vendor/plugins/haml/lib/sass/script/parser.rbc +8418 -0
  826. data/vendor/plugins/haml/lib/sass/script/string.rb +57 -2
  827. data/vendor/plugins/haml/lib/sass/script/string.rbc +1357 -0
  828. data/vendor/plugins/haml/lib/sass/script/string_interpolation.rb +93 -0
  829. data/vendor/plugins/haml/lib/sass/script/string_interpolation.rbc +1643 -0
  830. data/vendor/plugins/haml/lib/sass/script/unary_operation.rb +25 -2
  831. data/vendor/plugins/haml/lib/sass/script/unary_operation.rbc +1144 -0
  832. data/vendor/plugins/haml/lib/sass/script/variable.rb +22 -5
  833. data/vendor/plugins/haml/lib/sass/script/variable.rbc +844 -0
  834. data/vendor/plugins/haml/lib/sass/scss.rb +17 -0
  835. data/vendor/plugins/haml/lib/sass/scss.rbc +242 -0
  836. data/vendor/plugins/haml/lib/sass/scss/css_parser.rb +46 -0
  837. data/vendor/plugins/haml/lib/sass/scss/css_parser.rbc +1106 -0
  838. data/vendor/plugins/haml/lib/sass/scss/parser.rb +846 -0
  839. data/vendor/plugins/haml/lib/sass/scss/parser.rbc +19348 -0
  840. data/vendor/plugins/haml/lib/sass/scss/rx.rb +126 -0
  841. data/vendor/plugins/haml/lib/sass/scss/rx.rbc +2849 -0
  842. data/vendor/plugins/haml/lib/sass/scss/sass_parser.rb +11 -0
  843. data/vendor/plugins/haml/lib/sass/scss/sass_parser.rbc +287 -0
  844. data/vendor/plugins/haml/lib/sass/scss/script_lexer.rb +15 -0
  845. data/vendor/plugins/haml/lib/sass/scss/script_lexer.rbc +439 -0
  846. data/vendor/plugins/haml/lib/sass/scss/script_parser.rb +25 -0
  847. data/vendor/plugins/haml/lib/sass/scss/script_parser.rbc +482 -0
  848. data/vendor/plugins/haml/lib/sass/scss/static_parser.rb +40 -0
  849. data/vendor/plugins/haml/lib/sass/scss/static_parser.rbc +971 -0
  850. data/vendor/plugins/haml/lib/sass/selector.rb +361 -0
  851. data/vendor/plugins/haml/lib/sass/selector.rbc +4193 -0
  852. data/vendor/plugins/haml/lib/sass/selector/abstract_sequence.rb +62 -0
  853. data/vendor/plugins/haml/lib/sass/selector/abstract_sequence.rbc +798 -0
  854. data/vendor/plugins/haml/lib/sass/selector/comma_sequence.rb +82 -0
  855. data/vendor/plugins/haml/lib/sass/selector/comma_sequence.rbc +1814 -0
  856. data/vendor/plugins/haml/lib/sass/selector/sequence.rb +237 -0
  857. data/vendor/plugins/haml/lib/sass/selector/sequence.rbc +4928 -0
  858. data/vendor/plugins/haml/lib/sass/selector/simple.rb +113 -0
  859. data/vendor/plugins/haml/lib/sass/selector/simple.rbc +1553 -0
  860. data/vendor/plugins/haml/lib/sass/selector/simple_sequence.rb +136 -0
  861. data/vendor/plugins/haml/lib/sass/selector/simple_sequence.rbc +2346 -0
  862. data/vendor/plugins/haml/lib/sass/tree/charset_node.rb +37 -0
  863. data/vendor/plugins/haml/lib/sass/tree/charset_node.rbc +606 -0
  864. data/vendor/plugins/haml/lib/sass/tree/comment_node.rb +71 -27
  865. data/vendor/plugins/haml/lib/sass/tree/comment_node.rbc +2397 -0
  866. data/vendor/plugins/haml/lib/sass/tree/debug_node.rb +8 -2
  867. data/vendor/plugins/haml/lib/sass/tree/debug_node.rbc +740 -0
  868. data/vendor/plugins/haml/lib/sass/tree/directive_node.rb +44 -37
  869. data/vendor/plugins/haml/lib/sass/tree/directive_node.rbc +1302 -0
  870. data/vendor/plugins/haml/lib/sass/tree/extend_node.rb +65 -0
  871. data/vendor/plugins/haml/lib/sass/tree/extend_node.rbc +1276 -0
  872. data/vendor/plugins/haml/lib/sass/tree/for_node.rb +19 -0
  873. data/vendor/plugins/haml/lib/sass/tree/for_node.rbc +1145 -0
  874. data/vendor/plugins/haml/lib/sass/tree/if_node.rb +26 -0
  875. data/vendor/plugins/haml/lib/sass/tree/if_node.rbc +1119 -0
  876. data/vendor/plugins/haml/lib/sass/tree/import_node.rb +64 -27
  877. data/vendor/plugins/haml/lib/sass/tree/import_node.rbc +2242 -0
  878. data/vendor/plugins/haml/lib/sass/tree/mixin_def_node.rb +31 -0
  879. data/vendor/plugins/haml/lib/sass/tree/mixin_def_node.rbc +1001 -0
  880. data/vendor/plugins/haml/lib/sass/tree/mixin_node.rb +82 -7
  881. data/vendor/plugins/haml/lib/sass/tree/mixin_node.rbc +3355 -0
  882. data/vendor/plugins/haml/lib/sass/tree/node.rb +291 -77
  883. data/vendor/plugins/haml/lib/sass/tree/node.rbc +5533 -0
  884. data/vendor/plugins/haml/lib/sass/tree/prop_node.rb +157 -58
  885. data/vendor/plugins/haml/lib/sass/tree/prop_node.rbc +3949 -0
  886. data/vendor/plugins/haml/lib/sass/tree/root_node.rb +157 -0
  887. data/vendor/plugins/haml/lib/sass/tree/root_node.rbc +3112 -0
  888. data/vendor/plugins/haml/lib/sass/tree/rule_node.rb +178 -137
  889. data/vendor/plugins/haml/lib/sass/tree/rule_node.rbc +5636 -0
  890. data/vendor/plugins/haml/lib/sass/tree/variable_node.rb +10 -5
  891. data/vendor/plugins/haml/lib/sass/tree/variable_node.rbc +845 -0
  892. data/vendor/plugins/haml/lib/sass/tree/warn_node.rb +42 -0
  893. data/vendor/plugins/haml/lib/sass/tree/warn_node.rbc +1043 -0
  894. data/vendor/plugins/haml/lib/sass/tree/while_node.rb +17 -0
  895. data/vendor/plugins/haml/lib/sass/tree/while_node.rbc +722 -0
  896. data/vendor/plugins/haml/test/benchmark.rb +5 -5
  897. data/vendor/plugins/haml/test/haml/engine_test.rb +530 -19
  898. data/vendor/plugins/haml/test/haml/{rhtml/_av_partial_1.rhtml → erb/_av_partial_1.erb} +1 -1
  899. data/vendor/plugins/haml/test/haml/{rhtml/_av_partial_2.rhtml → erb/_av_partial_2.erb} +1 -1
  900. data/vendor/plugins/haml/test/haml/{rhtml/action_view.rhtml → erb/action_view.erb} +1 -1
  901. data/vendor/plugins/haml/test/haml/{rhtml/standard.rhtml → erb/standard.erb} +0 -0
  902. data/vendor/plugins/haml/test/haml/helper_test.rb +124 -7
  903. data/vendor/plugins/haml/test/haml/html2haml/erb_tests.rb +426 -0
  904. data/vendor/plugins/haml/test/haml/html2haml_test.rb +250 -66
  905. data/vendor/plugins/haml/test/haml/results/filters.xhtml +1 -1
  906. data/vendor/plugins/haml/test/haml/results/helpers.xhtml +0 -23
  907. data/vendor/plugins/haml/test/haml/results/just_stuff.xhtml +2 -0
  908. data/vendor/plugins/haml/test/haml/spec/LICENSE +14 -0
  909. data/vendor/plugins/haml/test/haml/spec/README.md +106 -0
  910. data/vendor/plugins/haml/test/haml/spec/lua_haml_spec.lua +38 -0
  911. data/vendor/plugins/haml/test/haml/spec/perl_haml_test.pl +81 -0
  912. data/vendor/plugins/haml/test/haml/spec/ruby_haml_test.rb +19 -0
  913. data/vendor/plugins/haml/test/haml/spec/tests.json +603 -0
  914. data/vendor/plugins/haml/test/haml/spec_test.rb +44 -0
  915. data/vendor/plugins/haml/test/haml/template_test.rb +33 -3
  916. data/vendor/plugins/haml/test/haml/templates/helpers.haml +0 -66
  917. data/vendor/plugins/haml/test/haml/templates/just_stuff.haml +2 -0
  918. data/vendor/plugins/haml/test/haml/util/subset_map_test.rb +91 -0
  919. data/vendor/plugins/haml/test/haml/util_test.rb +161 -0
  920. data/vendor/plugins/haml/test/linked_rails.rb +22 -1
  921. data/vendor/plugins/haml/test/sass/callbacks_test.rb +61 -0
  922. data/vendor/plugins/haml/test/sass/conversion_test.rb +1218 -0
  923. data/vendor/plugins/haml/test/sass/css2sass_test.rb +130 -18
  924. data/vendor/plugins/haml/test/sass/data/hsl-rgb.txt +319 -0
  925. data/vendor/plugins/haml/test/sass/engine_test.rb +1427 -139
  926. data/vendor/plugins/haml/test/sass/extend_test.rb +1348 -0
  927. data/vendor/plugins/haml/test/sass/functions_test.rb +429 -47
  928. data/vendor/plugins/haml/test/sass/less_conversion_test.rb +653 -0
  929. data/vendor/plugins/haml/test/sass/more_results/more_import.css +1 -1
  930. data/vendor/plugins/haml/test/sass/more_templates/more_import.sass +3 -3
  931. data/vendor/plugins/haml/test/sass/plugin_test.rb +246 -56
  932. data/vendor/plugins/haml/test/sass/results/compact.css +1 -1
  933. data/vendor/plugins/haml/test/sass/results/complex.css +5 -6
  934. data/vendor/plugins/haml/test/sass/results/compressed.css +1 -1
  935. data/vendor/plugins/haml/test/sass/results/expanded.css +1 -1
  936. data/vendor/plugins/haml/test/sass/results/import.css +3 -1
  937. data/vendor/plugins/haml/test/sass/results/import_charset.css +4 -0
  938. data/vendor/plugins/haml/test/sass/results/import_charset_1_8.css +4 -0
  939. data/vendor/plugins/haml/test/sass/results/import_charset_ibm866.css +4 -0
  940. data/vendor/plugins/haml/test/sass/results/mixins.css +12 -12
  941. data/vendor/plugins/haml/test/sass/results/nested.css +1 -1
  942. data/vendor/plugins/haml/test/sass/results/options.css +1 -0
  943. data/vendor/plugins/haml/test/sass/results/parent_ref.css +4 -4
  944. data/vendor/plugins/haml/test/sass/results/script.css +4 -4
  945. data/vendor/plugins/haml/test/sass/results/scss_import.css +31 -0
  946. data/vendor/plugins/haml/test/sass/results/scss_importee.css +2 -0
  947. data/vendor/plugins/haml/test/sass/results/warn.css +0 -0
  948. data/vendor/plugins/haml/test/sass/results/warn_imported.css +0 -0
  949. data/vendor/plugins/haml/test/sass/script_conversion_test.rb +314 -0
  950. data/vendor/plugins/haml/test/sass/script_test.rb +281 -78
  951. data/vendor/plugins/haml/test/sass/scss/css_test.rb +916 -0
  952. data/vendor/plugins/haml/test/sass/scss/rx_test.rb +156 -0
  953. data/vendor/plugins/haml/test/sass/scss/scss_test.rb +1088 -0
  954. data/vendor/plugins/haml/test/sass/scss/test_helper.rb +37 -0
  955. data/vendor/plugins/haml/test/sass/templates/_imported_charset_ibm866.sass +4 -0
  956. data/vendor/plugins/haml/test/sass/templates/_imported_charset_utf8.sass +4 -0
  957. data/vendor/plugins/haml/test/sass/templates/alt.sass +2 -2
  958. data/vendor/plugins/haml/test/sass/templates/basic.sass +1 -1
  959. data/vendor/plugins/haml/test/sass/templates/bork1.sass +2 -0
  960. data/vendor/plugins/haml/test/sass/templates/bork3.sass +2 -0
  961. data/vendor/plugins/haml/test/sass/templates/bork4.sass +2 -0
  962. data/vendor/plugins/haml/test/sass/templates/complex.sass +0 -2
  963. data/vendor/plugins/haml/test/sass/templates/import.sass +5 -4
  964. data/vendor/plugins/haml/test/sass/templates/import_charset.sass +7 -0
  965. data/vendor/plugins/haml/test/sass/templates/import_charset_1_8.sass +4 -0
  966. data/vendor/plugins/haml/test/sass/templates/import_charset_ibm866.sass +9 -0
  967. data/vendor/plugins/haml/test/sass/templates/importee.less +2 -0
  968. data/vendor/plugins/haml/test/sass/templates/importee.sass +3 -3
  969. data/vendor/plugins/haml/test/sass/templates/line_numbers.sass +1 -1
  970. data/vendor/plugins/haml/test/sass/templates/mixin_bork.sass +5 -0
  971. data/vendor/plugins/haml/test/sass/templates/mixins.sass +2 -2
  972. data/vendor/plugins/haml/test/sass/templates/nested_bork1.sass +2 -0
  973. data/vendor/plugins/haml/test/sass/templates/nested_bork2.sass +2 -0
  974. data/vendor/plugins/haml/test/sass/templates/nested_bork3.sass +2 -0
  975. data/vendor/plugins/haml/test/sass/templates/nested_bork4.sass +2 -0
  976. data/vendor/plugins/haml/test/sass/templates/nested_mixin_bork.sass +6 -0
  977. data/vendor/plugins/haml/test/sass/templates/options.sass +2 -0
  978. data/vendor/plugins/haml/test/sass/templates/parent_ref.sass +2 -2
  979. data/vendor/plugins/haml/test/sass/templates/script.sass +69 -69
  980. data/vendor/plugins/haml/test/sass/templates/scss_import.scss +11 -0
  981. data/vendor/plugins/haml/test/sass/templates/scss_importee.scss +1 -0
  982. data/vendor/plugins/haml/test/sass/templates/units.sass +10 -10
  983. data/vendor/plugins/haml/test/sass/templates/warn.sass +3 -0
  984. data/vendor/plugins/haml/test/sass/templates/warn_imported.sass +4 -0
  985. data/vendor/plugins/haml/test/test_helper.rb +52 -4
  986. data/vendor/plugins/haml/vendor/fssm/LICENSE +20 -0
  987. data/vendor/plugins/haml/vendor/fssm/README.markdown +55 -0
  988. data/vendor/plugins/haml/vendor/fssm/Rakefile +59 -0
  989. data/vendor/plugins/haml/vendor/fssm/VERSION.yml +5 -0
  990. data/vendor/plugins/haml/vendor/fssm/example.rb +9 -0
  991. data/vendor/plugins/haml/vendor/fssm/fssm.gemspec +77 -0
  992. data/vendor/plugins/haml/vendor/fssm/lib/fssm.rb +33 -0
  993. data/vendor/plugins/haml/vendor/fssm/lib/fssm/backends/fsevents.rb +36 -0
  994. data/vendor/plugins/haml/vendor/fssm/lib/fssm/backends/inotify.rb +26 -0
  995. data/vendor/plugins/haml/vendor/fssm/lib/fssm/backends/polling.rb +25 -0
  996. data/vendor/plugins/haml/vendor/fssm/lib/fssm/backends/rubycocoa/fsevents.rb +131 -0
  997. data/vendor/plugins/haml/vendor/fssm/lib/fssm/monitor.rb +26 -0
  998. data/vendor/plugins/haml/vendor/fssm/lib/fssm/path.rb +91 -0
  999. data/vendor/plugins/haml/vendor/fssm/lib/fssm/pathname.rb +502 -0
  1000. data/vendor/plugins/haml/vendor/fssm/lib/fssm/state/directory.rb +57 -0
  1001. data/vendor/plugins/haml/vendor/fssm/lib/fssm/state/file.rb +24 -0
  1002. data/vendor/plugins/haml/vendor/fssm/lib/fssm/support.rb +63 -0
  1003. data/vendor/plugins/haml/vendor/fssm/lib/fssm/tree.rb +176 -0
  1004. data/vendor/plugins/haml/vendor/fssm/profile/prof-cache.rb +40 -0
  1005. data/vendor/plugins/haml/vendor/fssm/profile/prof-fssm-pathname.html +1231 -0
  1006. data/vendor/plugins/haml/vendor/fssm/profile/prof-pathname.rb +68 -0
  1007. data/vendor/plugins/haml/vendor/fssm/profile/prof-plain-pathname.html +988 -0
  1008. data/vendor/plugins/haml/vendor/fssm/profile/prof.html +2379 -0
  1009. data/vendor/plugins/haml/vendor/fssm/spec/path_spec.rb +75 -0
  1010. data/vendor/plugins/haml/vendor/fssm/spec/root/duck/quack.txt +0 -0
  1011. data/vendor/plugins/haml/vendor/fssm/spec/root/file.css +0 -0
  1012. data/vendor/plugins/haml/vendor/fssm/spec/root/file.rb +0 -0
  1013. data/vendor/plugins/haml/vendor/fssm/spec/root/file.yml +0 -0
  1014. data/vendor/plugins/haml/vendor/fssm/spec/root/moo/cow.txt +0 -0
  1015. data/vendor/plugins/haml/vendor/fssm/spec/spec_helper.rb +14 -0
  1016. data/vendor/plugins/haml/yard/callbacks.rb +29 -0
  1017. data/vendor/plugins/haml/yard/default/fulldoc/html/css/common.sass +5 -1
  1018. data/vendor/rails/Rakefile +83 -0
  1019. data/vendor/rails/actionmailer/CHANGELOG +3 -4
  1020. data/vendor/rails/actionmailer/Rakefile +1 -1
  1021. data/vendor/rails/actionmailer/lib/action_mailer/base.rb +34 -1
  1022. data/vendor/rails/actionmailer/lib/action_mailer/helpers.rb +1 -1
  1023. data/vendor/rails/actionmailer/lib/action_mailer/version.rb +1 -1
  1024. data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.rhtml.bak +1 -0
  1025. data/vendor/rails/actionmailer/test/fixtures/test_mailer/implicitly_multipart_example.text.html.erb~ +10 -0
  1026. data/vendor/rails/actionpack/CHANGELOG +11 -0
  1027. data/vendor/rails/actionpack/Rakefile +1 -1
  1028. data/vendor/rails/actionpack/lib/action_controller/base.rb +4 -2
  1029. data/vendor/rails/actionpack/lib/action_controller/caching/fragments.rb +1 -1
  1030. data/vendor/rails/actionpack/lib/action_controller/cookies.rb +8 -2
  1031. data/vendor/rails/actionpack/lib/action_controller/integration.rb +19 -7
  1032. data/vendor/rails/actionpack/lib/action_controller/request.rb +2 -2
  1033. data/vendor/rails/actionpack/lib/action_controller/request_forgery_protection.rb +9 -6
  1034. data/vendor/rails/actionpack/lib/action_controller/rescue.rb +2 -2
  1035. data/vendor/rails/actionpack/lib/action_controller/resources.rb +1 -1
  1036. data/vendor/rails/actionpack/lib/action_controller/routing.rb +1 -1
  1037. data/vendor/rails/actionpack/lib/action_controller/routing/route.rb +3 -3
  1038. data/vendor/rails/actionpack/lib/action_controller/session/abstract_store.rb +143 -55
  1039. data/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb +48 -35
  1040. data/vendor/rails/actionpack/lib/action_controller/session/mem_cache_store.rb +10 -1
  1041. data/vendor/rails/actionpack/lib/action_controller/test_process.rb +1 -1
  1042. data/vendor/rails/actionpack/lib/action_controller/url_rewriter.rb +11 -1
  1043. data/vendor/rails/actionpack/lib/action_pack/version.rb +1 -1
  1044. data/vendor/rails/actionpack/lib/action_view/helpers.rb +2 -0
  1045. data/vendor/rails/actionpack/lib/action_view/helpers/asset_tag_helper.rb +1 -0
  1046. data/vendor/rails/actionpack/lib/action_view/helpers/csrf_helper.rb +14 -0
  1047. data/vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb +21 -14
  1048. data/vendor/rails/actionpack/lib/action_view/helpers/form_options_helper.rb +1 -1
  1049. data/vendor/rails/actionpack/lib/action_view/helpers/form_tag_helper.rb +1 -1
  1050. data/vendor/rails/actionpack/lib/action_view/helpers/prototype_helper.rb +3 -3
  1051. data/vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb +27 -17
  1052. data/vendor/rails/actionpack/lib/action_view/helpers/url_helper.rb +2 -1
  1053. data/vendor/rails/actionpack/lib/action_view/locale/en.yml +14 -14
  1054. data/vendor/rails/actionpack/lib/action_view/renderable_partial.rb +7 -1
  1055. data/vendor/rails/actionpack/lib/action_view/template.rb +2 -2
  1056. data/vendor/rails/actionpack/test/abstract_unit.rb +17 -0
  1057. data/vendor/rails/actionpack/test/activerecord/active_record_store_test.rb +65 -18
  1058. data/vendor/rails/actionpack/test/controller/cookie_test.rb +38 -0
  1059. data/vendor/rails/actionpack/test/controller/integration_test.rb +44 -0
  1060. data/vendor/rails/actionpack/test/controller/reloader_test.rb +1 -0
  1061. data/vendor/rails/actionpack/test/controller/render_test.rb +12 -0
  1062. data/vendor/rails/actionpack/test/controller/request/multipart_params_parsing_test.rb +15 -0
  1063. data/vendor/rails/actionpack/test/controller/request_forgery_protection_test.rb +92 -124
  1064. data/vendor/rails/actionpack/test/controller/rescue_test.rb +5 -6
  1065. data/vendor/rails/actionpack/test/controller/session/cookie_store_test.rb +101 -7
  1066. data/vendor/rails/actionpack/test/controller/session/mem_cache_store_test.rb +71 -11
  1067. data/vendor/rails/actionpack/test/controller/url_rewriter_test.rb +9 -3
  1068. data/vendor/rails/actionpack/test/fixtures/session_autoload_test/session_autoload_test/foo.rb +10 -0
  1069. data/vendor/rails/actionpack/test/fixtures/test/hello_world.erb~ +1 -0
  1070. data/vendor/rails/actionpack/test/fixtures/test/malformed/malformed.en.html.erb~ +1 -0
  1071. data/vendor/rails/actionpack/test/fixtures/test/malformed/malformed.erb~ +1 -0
  1072. data/vendor/rails/actionpack/test/fixtures/test/malformed/malformed.html.erb~ +1 -0
  1073. data/vendor/rails/actionpack/test/template/form_options_helper_test.rb +4 -0
  1074. data/vendor/rails/actionpack/test/template/text_helper_test.rb +47 -18
  1075. data/vendor/rails/actionpack/test/template/url_helper_test.rb +4 -4
  1076. data/vendor/rails/activemodel/CHANGES +12 -0
  1077. data/vendor/rails/activemodel/README +21 -0
  1078. data/vendor/rails/activemodel/Rakefile +24 -0
  1079. data/vendor/rails/activemodel/lib/active_model.rb +5 -0
  1080. data/vendor/rails/activemodel/lib/active_model/base.rb +8 -0
  1081. data/vendor/rails/activemodel/lib/active_model/callbacks.rb +7 -0
  1082. data/vendor/rails/activemodel/lib/active_model/core.rb +7 -0
  1083. data/vendor/rails/activemodel/lib/active_model/deprecated_error_methods.rb +38 -0
  1084. data/vendor/rails/activemodel/lib/active_model/errors.rb +82 -0
  1085. data/vendor/rails/activemodel/lib/active_model/observing.rb +98 -0
  1086. data/vendor/rails/activemodel/lib/active_model/state_machine.rb +68 -0
  1087. data/vendor/rails/activemodel/lib/active_model/state_machine/event.rb +64 -0
  1088. data/vendor/rails/activemodel/lib/active_model/state_machine/machine.rb +78 -0
  1089. data/vendor/rails/activemodel/lib/active_model/state_machine/state.rb +47 -0
  1090. data/vendor/rails/activemodel/lib/active_model/state_machine/state_transition.rb +40 -0
  1091. data/vendor/rails/activemodel/lib/active_model/validations.rb +126 -0
  1092. data/vendor/rails/activemodel/lib/active_model/validations/acceptance.rb +45 -0
  1093. data/vendor/rails/activemodel/lib/active_model/validations/associated.rb +46 -0
  1094. data/vendor/rails/activemodel/lib/active_model/validations/confirmation.rb +44 -0
  1095. data/vendor/rails/activemodel/lib/active_model/validations/exclusion.rb +37 -0
  1096. data/vendor/rails/activemodel/lib/active_model/validations/format.rb +39 -0
  1097. data/vendor/rails/activemodel/lib/active_model/validations/inclusion.rb +37 -0
  1098. data/vendor/rails/activemodel/lib/active_model/validations/length.rb +95 -0
  1099. data/vendor/rails/activemodel/lib/active_model/validations/numericality.rb +80 -0
  1100. data/vendor/rails/activemodel/lib/active_model/validations/presence.rb +42 -0
  1101. data/vendor/rails/activemodel/lib/active_model/validations/uniqueness.rb +104 -0
  1102. data/vendor/rails/activemodel/test/observing_test.rb +121 -0
  1103. data/vendor/rails/activemodel/test/state_machine/event_test.rb +49 -0
  1104. data/vendor/rails/activemodel/test/state_machine/machine_test.rb +43 -0
  1105. data/vendor/rails/activemodel/test/state_machine/state_test.rb +72 -0
  1106. data/vendor/rails/activemodel/test/state_machine/state_transition_test.rb +84 -0
  1107. data/vendor/rails/activemodel/test/state_machine_test.rb +312 -0
  1108. data/vendor/rails/activemodel/test/test_helper.rb +21 -0
  1109. data/vendor/rails/activerecord/CHANGELOG +5 -2
  1110. data/vendor/rails/activerecord/MIT-LICENSE +20 -0
  1111. data/vendor/rails/activerecord/Rakefile +1 -1
  1112. data/vendor/rails/activerecord/examples/performance.rb +39 -3
  1113. data/vendor/rails/activerecord/lib/active_record/association_preload.rb +12 -2
  1114. data/vendor/rails/activerecord/lib/active_record/associations.rb +1 -1
  1115. data/vendor/rails/activerecord/lib/active_record/associations/association_collection.rb +60 -6
  1116. data/vendor/rails/activerecord/lib/active_record/attribute_methods.rb +0 -4
  1117. data/vendor/rails/activerecord/lib/active_record/autosave_association.rb +2 -2
  1118. data/vendor/rails/activerecord/lib/active_record/base.rb +28 -16
  1119. data/vendor/rails/activerecord/lib/active_record/calculations.rb +19 -12
  1120. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_specification.rb +1 -1
  1121. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +3 -1
  1122. data/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +6 -0
  1123. data/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +2 -0
  1124. data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb +1 -1
  1125. data/vendor/rails/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb +2 -1
  1126. data/vendor/rails/activerecord/lib/active_record/dirty.rb +1 -1
  1127. data/vendor/rails/activerecord/lib/active_record/locale/en.yml +11 -11
  1128. data/vendor/rails/activerecord/lib/active_record/locking/optimistic.rb +1 -0
  1129. data/vendor/rails/activerecord/lib/active_record/migration.rb +1 -1
  1130. data/vendor/rails/activerecord/lib/active_record/named_scope.rb +15 -10
  1131. data/vendor/rails/activerecord/lib/active_record/serialization.rb +1 -1
  1132. data/vendor/rails/activerecord/lib/active_record/session_store.rb +9 -1
  1133. data/vendor/rails/activerecord/lib/active_record/validations.rb +12 -12
  1134. data/vendor/rails/activerecord/lib/active_record/version.rb +1 -1
  1135. data/vendor/rails/activerecord/test/cases/adapter_test.rb +7 -8
  1136. data/vendor/rails/activerecord/test/cases/associations/eager_load_nested_include_test.rb +7 -7
  1137. data/vendor/rails/activerecord/test/cases/associations/eager_load_nested_polymorphic_include.rb +19 -0
  1138. data/vendor/rails/activerecord/test/cases/associations/eager_test.rb +12 -0
  1139. data/vendor/rails/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb +5 -0
  1140. data/vendor/rails/activerecord/test/cases/associations/has_many_associations_test.rb +108 -4
  1141. data/vendor/rails/activerecord/test/cases/associations/has_many_through_associations_test.rb +14 -0
  1142. data/vendor/rails/activerecord/test/cases/associations_test.rb +10 -0
  1143. data/vendor/rails/activerecord/test/cases/base_test.rb +35 -75
  1144. data/vendor/rails/activerecord/test/cases/calculations_test.rb +13 -0
  1145. data/vendor/rails/activerecord/test/cases/connection_test_mysql.rb +1 -0
  1146. data/vendor/rails/activerecord/test/cases/counter_cache_test.rb +84 -0
  1147. data/vendor/rails/activerecord/test/cases/locking_test.rb +2 -1
  1148. data/vendor/rails/activerecord/test/cases/migration_test.rb +11 -0
  1149. data/vendor/rails/activerecord/test/cases/named_scope_test.rb +12 -1
  1150. data/vendor/rails/activerecord/test/cases/nested_attributes_test.rb +28 -1
  1151. data/vendor/rails/activerecord/test/cases/reflection_test.rb +5 -5
  1152. data/vendor/rails/activerecord/test/cases/sp_test_mysql.rb +16 -0
  1153. data/vendor/rails/activerecord/test/cases/transactions_test.rb +22 -1
  1154. data/vendor/rails/activerecord/test/cases/validations_i18n_test.rb +12 -12
  1155. data/vendor/rails/activerecord/test/cases/validations_test.rb +42 -30
  1156. data/vendor/rails/activerecord/test/fixtures/polymorphic_designs.yml +19 -0
  1157. data/vendor/rails/activerecord/test/fixtures/polymorphic_prices.yml +19 -0
  1158. data/vendor/rails/activerecord/test/fixtures/tees.yml +4 -0
  1159. data/vendor/rails/activerecord/test/fixtures/ties.yml +4 -0
  1160. data/vendor/rails/activerecord/test/models/author.rb +2 -0
  1161. data/vendor/rails/activerecord/test/models/company.rb +2 -0
  1162. data/vendor/rails/activerecord/test/models/event_author.rb +3 -0
  1163. data/vendor/rails/activerecord/test/models/pirate.rb +2 -2
  1164. data/vendor/rails/activerecord/test/models/polymorphic_design.rb +3 -0
  1165. data/vendor/rails/activerecord/test/models/polymorphic_price.rb +3 -0
  1166. data/vendor/rails/activerecord/test/models/post.rb +2 -0
  1167. data/vendor/rails/activerecord/test/models/tee.rb +4 -0
  1168. data/vendor/rails/activerecord/test/models/tie.rb +4 -0
  1169. data/vendor/rails/activerecord/test/schema/mysql_specific_schema.rb +7 -0
  1170. data/vendor/rails/activerecord/test/schema/schema.rb +16 -0
  1171. data/vendor/rails/activeresource/CHANGELOG +3 -4
  1172. data/vendor/rails/activeresource/MIT-LICENSE +20 -0
  1173. data/vendor/rails/activeresource/Rakefile +1 -1
  1174. data/vendor/rails/activeresource/lib/active_resource/http_mock.rb +104 -9
  1175. data/vendor/rails/activeresource/lib/active_resource/version.rb +1 -1
  1176. data/vendor/rails/activeresource/test/http_mock_test.rb +155 -0
  1177. data/vendor/rails/activesupport/CHANGELOG +16 -0
  1178. data/vendor/rails/activesupport/MIT-LICENSE +20 -0
  1179. data/vendor/rails/activesupport/Rakefile +175 -0
  1180. data/vendor/rails/activesupport/bin/generate_tables +147 -0
  1181. data/vendor/rails/activesupport/install.rb +30 -0
  1182. data/vendor/rails/activesupport/lib/active_support/basic_object.rb +7 -10
  1183. data/vendor/rails/activesupport/lib/active_support/buffered_logger.rb +2 -0
  1184. data/vendor/rails/activesupport/lib/active_support/core_ext/array/grouping.rb +1 -1
  1185. data/vendor/rails/activesupport/lib/active_support/core_ext/array/random_access.rb +24 -4
  1186. data/vendor/rails/activesupport/lib/active_support/core_ext/class.rb +1 -0
  1187. data/vendor/rails/activesupport/lib/active_support/core_ext/class/attribute.rb +67 -0
  1188. data/vendor/rails/activesupport/lib/active_support/core_ext/enumerable.rb +1 -1
  1189. data/vendor/rails/activesupport/lib/active_support/core_ext/kernel/singleton_class.rb +13 -0
  1190. data/vendor/rails/activesupport/lib/active_support/core_ext/module/remove_method.rb +6 -0
  1191. data/vendor/rails/activesupport/lib/active_support/core_ext/object/misc.rb +3 -0
  1192. data/vendor/rails/activesupport/lib/active_support/core_ext/range/blockless_step.rb +1 -1
  1193. data/vendor/rails/activesupport/lib/active_support/core_ext/string/output_safety.rb +0 -11
  1194. data/vendor/rails/activesupport/lib/active_support/dependencies.rb +38 -12
  1195. data/vendor/rails/activesupport/lib/active_support/deprecation.rb +7 -0
  1196. data/vendor/rails/activesupport/lib/active_support/json/backends/yajl.rb +1 -1
  1197. data/vendor/rails/activesupport/lib/active_support/locale/en.yml +4 -1
  1198. data/vendor/rails/activesupport/lib/active_support/memoizable.rb +2 -0
  1199. data/vendor/rails/activesupport/lib/active_support/ordered_hash.rb +6 -0
  1200. data/vendor/rails/activesupport/lib/active_support/testing/performance.rb +1 -1
  1201. data/vendor/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb +2 -2
  1202. data/vendor/rails/activesupport/lib/active_support/values/time_zone.rb +5 -1
  1203. data/vendor/rails/activesupport/lib/active_support/vendor.rb +2 -2
  1204. data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n.rb +92 -105
  1205. data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/backend.rb +5 -4
  1206. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/active_record.rb +61 -0
  1207. data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/backend/active_record/missing.rb +4 -6
  1208. data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/backend/active_record/store_procs.rb +0 -0
  1209. data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/backend/active_record/translation.rb +8 -3
  1210. data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/backend/base.rb +55 -84
  1211. data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/backend/cache.rb +1 -0
  1212. data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/backend/cascade.rb +0 -1
  1213. data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/backend/chain.rb +3 -1
  1214. data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/backend/cldr.rb +0 -0
  1215. data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/backend/fallbacks.rb +0 -0
  1216. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/flatten.rb +113 -0
  1217. data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/backend/gettext.rb +0 -0
  1218. data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/backend/interpolation_compiler.rb +8 -4
  1219. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/key_value.rb +102 -0
  1220. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/memoize.rb +48 -0
  1221. data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/backend/metadata.rb +5 -13
  1222. data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/backend/pluralization.rb +0 -0
  1223. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/simple.rb +87 -0
  1224. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/backend/transliterator.rb +98 -0
  1225. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/config.rb +84 -0
  1226. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/core_ext/hash.rb +28 -0
  1227. data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/core_ext/string/interpolate.rb +3 -4
  1228. data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/exceptions.rb +0 -0
  1229. data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/gettext.rb +2 -0
  1230. data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.3.7/i18n/helpers/gettext.rb → i18n-0.4.1/i18n/gettext/helpers.rb} +2 -2
  1231. data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/gettext/po_parser.rb +7 -7
  1232. data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/locale.rb +0 -0
  1233. data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/locale/fallbacks.rb +0 -0
  1234. data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/locale/tag.rb +0 -0
  1235. data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/locale/tag/parents.rb +0 -0
  1236. data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/locale/tag/rfc4646.rb +0 -0
  1237. data/vendor/rails/activesupport/lib/active_support/vendor/{i18n-0.3.7 → i18n-0.4.1}/i18n/locale/tag/simple.rb +0 -0
  1238. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.4.1/i18n/version.rb +3 -0
  1239. data/vendor/rails/activesupport/lib/active_support/version.rb +1 -1
  1240. data/vendor/rails/activesupport/lib/active_support/whiny_nil.rb +1 -1
  1241. data/vendor/rails/activesupport/test/abstract_unit.rb +37 -0
  1242. data/vendor/rails/activesupport/test/autoloading_fixtures/a/b.rb +2 -0
  1243. data/vendor/rails/activesupport/test/autoloading_fixtures/a/c/d.rb +2 -0
  1244. data/vendor/rails/activesupport/test/autoloading_fixtures/a/c/e/f.rb +2 -0
  1245. data/vendor/rails/activesupport/test/autoloading_fixtures/application.rb +1 -0
  1246. data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder.rb +3 -0
  1247. data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder/class_folder_subclass.rb +3 -0
  1248. data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder/inline_class.rb +2 -0
  1249. data/vendor/rails/activesupport/test/autoloading_fixtures/class_folder/nested_class.rb +7 -0
  1250. data/vendor/rails/activesupport/test/autoloading_fixtures/conflict.rb +1 -0
  1251. data/vendor/rails/activesupport/test/autoloading_fixtures/counting_loader.rb +5 -0
  1252. data/vendor/rails/activesupport/test/autoloading_fixtures/cross_site_dependency.rb +2 -0
  1253. data/vendor/rails/activesupport/test/autoloading_fixtures/e.rb +2 -0
  1254. data/vendor/rails/activesupport/test/autoloading_fixtures/module_folder/inline_class.rb +2 -0
  1255. data/vendor/rails/activesupport/test/autoloading_fixtures/module_folder/nested_class.rb +4 -0
  1256. data/vendor/rails/activesupport/test/autoloading_fixtures/module_folder/nested_sibling.rb +2 -0
  1257. data/vendor/rails/activesupport/test/autoloading_fixtures/module_with_custom_const_missing/a/b.rb +1 -0
  1258. data/vendor/rails/activesupport/test/autoloading_fixtures/multiple_constant_file.rb +2 -0
  1259. data/vendor/rails/activesupport/test/autoloading_fixtures/raises_name_error.rb +3 -0
  1260. data/vendor/rails/activesupport/test/autoloading_fixtures/raises_no_method_error.rb +3 -0
  1261. data/vendor/rails/activesupport/test/buffered_logger_test.rb +146 -0
  1262. data/vendor/rails/activesupport/test/caching_test.rb +355 -0
  1263. data/vendor/rails/activesupport/test/callbacks_test.rb +188 -0
  1264. data/vendor/rails/activesupport/test/clean_backtrace_test.rb +47 -0
  1265. data/vendor/rails/activesupport/test/clean_logger_test.rb +57 -0
  1266. data/vendor/rails/activesupport/test/core_ext/array_ext_test.rb +394 -0
  1267. data/vendor/rails/activesupport/test/core_ext/base64_ext_test.rb +8 -0
  1268. data/vendor/rails/activesupport/test/core_ext/bigdecimal.rb +10 -0
  1269. data/vendor/rails/activesupport/test/core_ext/blank_test.rb +21 -0
  1270. data/vendor/rails/activesupport/test/core_ext/cgi_ext_test.rb +14 -0
  1271. data/vendor/rails/activesupport/test/core_ext/class/attribute_accessor_test.rb +38 -0
  1272. data/vendor/rails/activesupport/test/core_ext/class/class_inheritable_attributes_test.rb +224 -0
  1273. data/vendor/rails/activesupport/test/core_ext/class/delegating_attributes_test.rb +115 -0
  1274. data/vendor/rails/activesupport/test/core_ext/class_test.rb +46 -0
  1275. data/vendor/rails/activesupport/test/core_ext/date_ext_test.rb +286 -0
  1276. data/vendor/rails/activesupport/test/core_ext/date_time_ext_test.rb +363 -0
  1277. data/vendor/rails/activesupport/test/core_ext/duplicable_test.rb +22 -0
  1278. data/vendor/rails/activesupport/test/core_ext/duration_test.rb +121 -0
  1279. data/vendor/rails/activesupport/test/core_ext/enumerable_test.rb +102 -0
  1280. data/vendor/rails/activesupport/test/core_ext/exception_test.rb +68 -0
  1281. data/vendor/rails/activesupport/test/core_ext/file_test.rb +67 -0
  1282. data/vendor/rails/activesupport/test/core_ext/float_ext_test.rb +25 -0
  1283. data/vendor/rails/activesupport/test/core_ext/hash_ext_test.rb +1016 -0
  1284. data/vendor/rails/activesupport/test/core_ext/integer_ext_test.rb +37 -0
  1285. data/vendor/rails/activesupport/test/core_ext/kernel_test.rb +43 -0
  1286. data/vendor/rails/activesupport/test/core_ext/load_error_test.rb +16 -0
  1287. data/vendor/rails/activesupport/test/core_ext/module/attr_accessor_with_default_test.rb +30 -0
  1288. data/vendor/rails/activesupport/test/core_ext/module/attr_internal_test.rb +52 -0
  1289. data/vendor/rails/activesupport/test/core_ext/module/attribute_accessor_test.rb +39 -0
  1290. data/vendor/rails/activesupport/test/core_ext/module/attribute_aliasing_test.rb +58 -0
  1291. data/vendor/rails/activesupport/test/core_ext/module/model_naming_test.rb +27 -0
  1292. data/vendor/rails/activesupport/test/core_ext/module/synchronization_test.rb +86 -0
  1293. data/vendor/rails/activesupport/test/core_ext/module_test.rb +363 -0
  1294. data/vendor/rails/activesupport/test/core_ext/name_error_test.rb +20 -0
  1295. data/vendor/rails/activesupport/test/core_ext/numeric_ext_test.rb +168 -0
  1296. data/vendor/rails/activesupport/test/core_ext/object_and_class_ext_test.rb +294 -0
  1297. data/vendor/rails/activesupport/test/core_ext/object_ext_test.rb +8 -0
  1298. data/vendor/rails/activesupport/test/core_ext/pathname_test.rb +9 -0
  1299. data/vendor/rails/activesupport/test/core_ext/proc_test.rb +11 -0
  1300. data/vendor/rails/activesupport/test/core_ext/range_ext_test.rb +63 -0
  1301. data/vendor/rails/activesupport/test/core_ext/string_ext_test.rb +402 -0
  1302. data/vendor/rails/activesupport/test/core_ext/symbol_test.rb +9 -0
  1303. data/vendor/rails/activesupport/test/core_ext/time_ext_test.rb +771 -0
  1304. data/vendor/rails/activesupport/test/core_ext/time_with_zone_test.rb +851 -0
  1305. data/vendor/rails/activesupport/test/core_ext/uri_ext_test.rb +12 -0
  1306. data/vendor/rails/activesupport/test/dependencies/check_warnings.rb +2 -0
  1307. data/vendor/rails/activesupport/test/dependencies/conflict.rb +1 -0
  1308. data/vendor/rails/activesupport/test/dependencies/cross_site_depender.rb +3 -0
  1309. data/vendor/rails/activesupport/test/dependencies/mutual_one.rb +4 -0
  1310. data/vendor/rails/activesupport/test/dependencies/mutual_two.rb +4 -0
  1311. data/vendor/rails/activesupport/test/dependencies/raises_exception.rb +3 -0
  1312. data/vendor/rails/activesupport/test/dependencies/requires_nonexistent0.rb +1 -0
  1313. data/vendor/rails/activesupport/test/dependencies/requires_nonexistent1.rb +1 -0
  1314. data/vendor/rails/activesupport/test/dependencies/service_one.rb +5 -0
  1315. data/vendor/rails/activesupport/test/dependencies/service_two.rb +2 -0
  1316. data/vendor/rails/activesupport/test/dependencies_test.rb +789 -0
  1317. data/vendor/rails/activesupport/test/deprecation/proxy_wrappers_test.rb +22 -0
  1318. data/vendor/rails/activesupport/test/deprecation_test.rb +167 -0
  1319. data/vendor/rails/activesupport/test/empty_bool.rb +7 -0
  1320. data/vendor/rails/activesupport/test/flush_cache_on_private_memoization_test.rb +43 -0
  1321. data/vendor/rails/activesupport/test/gzip_test.rb +7 -0
  1322. data/vendor/rails/activesupport/test/i18n_test.rb +98 -0
  1323. data/vendor/rails/activesupport/test/inflector_test.rb +298 -0
  1324. data/vendor/rails/activesupport/test/inflector_test_cases.rb +262 -0
  1325. data/vendor/rails/activesupport/test/json/decoding_test.rb +79 -0
  1326. data/vendor/rails/activesupport/test/json/encoding_test.rb +162 -0
  1327. data/vendor/rails/activesupport/test/memoizable_test.rb +261 -0
  1328. data/vendor/rails/activesupport/test/message_encryptor_test.rb +55 -0
  1329. data/vendor/rails/activesupport/test/message_verifier_test.rb +31 -0
  1330. data/vendor/rails/activesupport/test/multibyte_chars_test.rb +606 -0
  1331. data/vendor/rails/activesupport/test/multibyte_conformance.rb +129 -0
  1332. data/vendor/rails/activesupport/test/multibyte_test_helpers.rb +19 -0
  1333. data/vendor/rails/activesupport/test/multibyte_unicode_database_test.rb +22 -0
  1334. data/vendor/rails/activesupport/test/multibyte_utils_test.rb +137 -0
  1335. data/vendor/rails/activesupport/test/option_merger_test.rb +85 -0
  1336. data/vendor/rails/activesupport/test/ordered_hash_test.rb +237 -0
  1337. data/vendor/rails/activesupport/test/ordered_options_test.rb +53 -0
  1338. data/vendor/rails/activesupport/test/rescuable_test.rb +75 -0
  1339. data/vendor/rails/activesupport/test/safe_buffer_test.rb +36 -0
  1340. data/vendor/rails/activesupport/test/secure_random_test.rb +19 -0
  1341. data/vendor/rails/activesupport/test/string_inquirer_test.rb +15 -0
  1342. data/vendor/rails/activesupport/test/test_case_test.rb +57 -0
  1343. data/vendor/rails/activesupport/test/test_test.rb +188 -0
  1344. data/vendor/rails/activesupport/test/time_zone_test.rb +285 -0
  1345. data/vendor/rails/activesupport/test/whiny_nil_test.rb +50 -0
  1346. data/vendor/rails/activesupport/test/xml_mini/jdom_engine_test.rb +153 -0
  1347. data/vendor/rails/activesupport/test/xml_mini/libxml_engine_test.rb +204 -0
  1348. data/vendor/rails/activesupport/test/xml_mini/libxmlsax_engine_test.rb +181 -0
  1349. data/vendor/rails/activesupport/test/xml_mini/nokogiri_engine_test.rb +204 -0
  1350. data/vendor/rails/activesupport/test/xml_mini/nokogirisax_engine_test.rb +217 -0
  1351. data/vendor/rails/activesupport/test/xml_mini/rexml_engine_test.rb +15 -0
  1352. data/vendor/rails/railties/CHANGELOG +7 -2
  1353. data/vendor/rails/railties/Rakefile +6 -7
  1354. data/vendor/rails/railties/builtin/rails_info/rails/info.rb +1 -1
  1355. data/vendor/rails/railties/environments/boot.rb +6 -2
  1356. data/vendor/rails/railties/environments/environment.rb +1 -1
  1357. data/vendor/rails/railties/guides/rails_guides.rb +13 -24
  1358. data/vendor/rails/railties/guides/rails_guides/generator.rb +169 -49
  1359. data/vendor/rails/railties/guides/rails_guides/indexer.rb +24 -11
  1360. data/vendor/rails/railties/guides/rails_guides/levenshtein.rb +31 -0
  1361. data/vendor/rails/railties/guides/source/action_mailer_basics.textile +29 -12
  1362. data/vendor/rails/railties/guides/source/{credits.erb.textile → credits.html.erb} +4 -4
  1363. data/vendor/rails/railties/guides/source/{index.erb.textile → index.html.erb} +13 -12
  1364. data/vendor/rails/railties/guides/source/plugins.textile +1 -1
  1365. data/vendor/rails/railties/guides/source/security.textile +1 -1
  1366. data/vendor/rails/railties/lib/initializer.rb +44 -20
  1367. data/vendor/rails/railties/lib/rails/gem_dependency.rb +4 -2
  1368. data/vendor/rails/railties/lib/rails/plugin.rb +1 -1
  1369. data/vendor/rails/railties/lib/rails/plugin/loader.rb +3 -3
  1370. data/vendor/rails/railties/lib/rails/vendor_gem_source_index.rb +2 -2
  1371. data/vendor/rails/railties/lib/rails/version.rb +1 -1
  1372. data/vendor/rails/railties/lib/rails_generator/generators/applications/app/scm/git.rb +18 -0
  1373. data/vendor/rails/railties/lib/rails_generator/generators/components/migration/migration_generator.rb +1 -1
  1374. data/vendor/rails/railties/lib/rails_generator/generators/components/plugin/templates/test_helper.rb +2 -1
  1375. data/vendor/rails/railties/lib/tasks/databases.rake +9 -9
  1376. data/vendor/rails/railties/lib/tasks/tmp.rake +37 -0
  1377. data/vendor/rails/railties/test/abstract_unit.rb +27 -0
  1378. data/vendor/rails/railties/test/backtrace_cleaner_test.rb +61 -0
  1379. data/vendor/rails/railties/test/boot_test.rb +178 -0
  1380. data/vendor/rails/railties/test/console_app_test.rb +42 -0
  1381. data/vendor/rails/railties/test/fcgi_dispatcher_test.rb +266 -0
  1382. data/vendor/rails/railties/test/fixtures/about_yml_plugins/bad_about_yml/about.yml +1 -0
  1383. data/vendor/rails/railties/test/fixtures/about_yml_plugins/bad_about_yml/init.rb +1 -0
  1384. data/vendor/rails/railties/test/fixtures/about_yml_plugins/plugin_without_about_yml/init.rb +1 -0
  1385. data/vendor/rails/railties/test/fixtures/eager/zoo.rb +3 -0
  1386. data/vendor/rails/railties/test/fixtures/eager/zoo/reptile_house.rb +2 -0
  1387. data/vendor/rails/railties/test/fixtures/environment_with_constant.rb +1 -0
  1388. data/vendor/rails/railties/test/fixtures/lib/generators/missing_class/missing_class_generator.rb +0 -0
  1389. data/vendor/rails/railties/test/fixtures/lib/generators/working/working_generator.rb +2 -0
  1390. data/vendor/rails/railties/test/fixtures/metal/multiplemetals/app/metal/metal_a.rb +5 -0
  1391. data/vendor/rails/railties/test/fixtures/metal/multiplemetals/app/metal/metal_b.rb +5 -0
  1392. data/vendor/rails/railties/test/fixtures/metal/pluralmetal/app/metal/legacy_routes.rb +5 -0
  1393. data/vendor/rails/railties/test/fixtures/metal/singlemetal/app/metal/foo_metal.rb +5 -0
  1394. data/vendor/rails/railties/test/fixtures/metal/subfolders/app/metal/Folder/metal_a.rb +7 -0
  1395. data/vendor/rails/railties/test/fixtures/metal/subfolders/app/metal/Folder/metal_b.rb +7 -0
  1396. data/vendor/rails/railties/test/fixtures/plugins/alternate/a/generators/a_generator/a_generator.rb +4 -0
  1397. data/vendor/rails/railties/test/fixtures/plugins/default/gemlike/init.rb +1 -0
  1398. data/vendor/rails/railties/test/fixtures/plugins/default/gemlike/lib/gemlike.rb +2 -0
  1399. data/vendor/rails/railties/test/fixtures/plugins/default/gemlike/rails/init.rb +7 -0
  1400. data/vendor/rails/railties/test/fixtures/plugins/default/plugin_with_no_lib_dir/init.rb +0 -0
  1401. data/vendor/rails/railties/test/fixtures/plugins/default/stubby/about.yml +2 -0
  1402. data/vendor/rails/railties/test/fixtures/plugins/default/stubby/generators/stubby_generator/stubby_generator.rb +4 -0
  1403. data/vendor/rails/railties/test/fixtures/plugins/default/stubby/init.rb +7 -0
  1404. data/vendor/rails/railties/test/fixtures/plugins/default/stubby/lib/stubby_mixin.rb +2 -0
  1405. data/vendor/rails/railties/test/fixtures/plugins/engines/engine/app/controllers/engine_controller.rb +2 -0
  1406. data/vendor/rails/railties/test/fixtures/plugins/engines/engine/app/metal/engine_metal.rb +9 -0
  1407. data/vendor/rails/railties/test/fixtures/plugins/engines/engine/app/models/engine_model.rb +2 -0
  1408. data/vendor/rails/railties/test/fixtures/plugins/engines/engine/config/locales/en.yml +2 -0
  1409. data/vendor/rails/railties/test/fixtures/plugins/engines/engine/config/routes.rb +3 -0
  1410. data/vendor/rails/railties/test/fixtures/plugins/engines/engine/init.rb +3 -0
  1411. data/vendor/rails/railties/test/fixtures/public/foo/bar.html +1 -0
  1412. data/vendor/rails/railties/test/fixtures/public/foo/index.html +1 -0
  1413. data/vendor/rails/railties/test/fixtures/public/index.html +1 -0
  1414. data/vendor/rails/railties/test/gem_dependency_test.rb +227 -0
  1415. data/vendor/rails/railties/test/generator_lookup_test.rb +40 -0
  1416. data/vendor/rails/railties/test/generators/generated_attribute_test.rb +38 -0
  1417. data/vendor/rails/railties/test/generators/generator_test_helper.rb +322 -0
  1418. data/vendor/rails/railties/test/generators/rails_controller_generator_test.rb +44 -0
  1419. data/vendor/rails/railties/test/generators/rails_helper_generator_test.rb +36 -0
  1420. data/vendor/rails/railties/test/generators/rails_mailer_generator_test.rb +29 -0
  1421. data/vendor/rails/railties/test/generators/rails_model_generator_test.rb +96 -0
  1422. data/vendor/rails/railties/test/generators/rails_resource_generator_test.rb +29 -0
  1423. data/vendor/rails/railties/test/generators/rails_scaffold_generator_test.rb +151 -0
  1424. data/vendor/rails/railties/test/generators/rails_template_runner_test.rb +216 -0
  1425. data/vendor/rails/railties/test/initializer_test.rb +437 -0
  1426. data/vendor/rails/railties/test/metal_test.rb +72 -0
  1427. data/vendor/rails/railties/test/mocks/routes.rb +6 -0
  1428. data/vendor/rails/railties/test/plugin_loader_test.rb +172 -0
  1429. data/vendor/rails/railties/test/plugin_locator_test.rb +62 -0
  1430. data/vendor/rails/railties/test/plugin_test.rb +162 -0
  1431. data/vendor/rails/railties/test/plugin_test_helper.rb +29 -0
  1432. data/vendor/rails/railties/test/rack_static_test.rb +47 -0
  1433. data/vendor/rails/railties/test/rails_generator_test.rb +145 -0
  1434. data/vendor/rails/railties/test/rails_info_controller_test.rb +52 -0
  1435. data/vendor/rails/railties/test/rails_info_test.rb +99 -0
  1436. data/vendor/rails/railties/test/secret_key_generation_test.rb +38 -0
  1437. data/vendor/rails/railties/test/vendor/gems/dummy-gem-a-0.4.0/lib/dummy-gem-a.rb +1 -0
  1438. data/vendor/rails/railties/test/vendor/gems/dummy-gem-b-0.4.0/lib/dummy-gem-b.rb +1 -0
  1439. data/vendor/rails/railties/test/vendor/gems/dummy-gem-b-0.6.0/lib/dummy-gem-b.rb +1 -0
  1440. data/vendor/rails/railties/test/vendor/gems/dummy-gem-c-0.4.0/lib/dummy-gem-c.rb +1 -0
  1441. data/vendor/rails/railties/test/vendor/gems/dummy-gem-c-0.6.0/lib/dummy-gem-c.rb +1 -0
  1442. data/vendor/rails/railties/test/vendor/gems/dummy-gem-d-1.0.0/lib/dummy-gem-d.rb +1 -0
  1443. data/vendor/rails/railties/test/vendor/gems/dummy-gem-e-1.0.0/lib/dummy-gem-e.rb +1 -0
  1444. data/vendor/rails/railties/test/vendor/gems/dummy-gem-f-1.0.0/lib/dummy-gem-f.rb +1 -0
  1445. data/vendor/rails/railties/test/vendor/gems/dummy-gem-g-1.0.0/lib/dummy-gem-g.rb +1 -0
  1446. data/vendor/rails/railties/test/vendor/gems/dummy-gem-h-1.0.0/lib/dummy-gem-h.rb +1 -0
  1447. data/vendor/rails/railties/test/vendor/gems/dummy-gem-i-1.0.0/ext/dummy-gem-i/Makefile +0 -0
  1448. data/vendor/rails/railties/test/vendor/gems/dummy-gem-i-1.0.0/lib/dummy-gem-i.rb +1 -0
  1449. data/vendor/rails/railties/test/vendor/gems/dummy-gem-j-1.0.0/lib/dummy-gem-j.rb +1 -0
  1450. data/vendor/rails/railties/test/vendor/gems/dummy-gem-k-1.0.0/lib/dummy-gem-k.rb +1 -0
  1451. data/vendor/rails/railties/test/vendor/gems/dummy-gem-l-1.0.0-x86-mswin32/lib/dummy-gem-l.rb +1 -0
  1452. metadata +1156 -125
  1453. data/app/controllers/admin/export_controller.rb +0 -5
  1454. data/app/helpers/admin/abstract_model_helper.rb +0 -2
  1455. data/app/models/radiant/exporter.rb +0 -11
  1456. data/db/templates/roasters.yml +0 -1210
  1457. data/db/templates/simple-blog.yml +0 -197
  1458. data/db/templates/styled-blog.yml +0 -472
  1459. data/lib/radiant/legacy_routes.rb +0 -72
  1460. data/public/images/admin/buttons_background.png +0 -0
  1461. data/public/images/admin/login_shadow.png +0 -0
  1462. data/public/images/admin/navigation_background.gif +0 -0
  1463. data/public/images/admin/navigation_secondary_background.png +0 -0
  1464. data/public/images/admin/navigation_shadow.png +0 -0
  1465. data/public/images/admin/navigation_tabs.png +0 -0
  1466. data/public/images/admin/new_homepage.png +0 -0
  1467. data/public/images/admin/new_layout.png +0 -0
  1468. data/public/images/admin/new_snippet.png +0 -0
  1469. data/public/images/admin/new_user.png +0 -0
  1470. data/public/images/admin/shadow.png +0 -0
  1471. data/public/images/admin/shadow_grey.png +0 -0
  1472. data/public/images/admin/spacer.gif +0 -0
  1473. data/public/images/admin/vertical_tan_gradient.png +0 -0
  1474. data/public/images/admin/view_site.png +0 -0
  1475. data/public/stylesheets/sass/admin/modules/_grid.sass +0 -56
  1476. data/public/stylesheets/sass/admin/modules/_opacity.sass +0 -7
  1477. data/public/stylesheets/sass/admin/modules/_rounded.sass +0 -41
  1478. data/public/stylesheets/sass/admin/modules/_shadow.sass +0 -9
  1479. data/public/stylesheets/sass/admin/partials/_reset.sass +0 -36
  1480. data/rerun.txt +0 -1
  1481. data/spec/helpers/admin/abstract_model_helper_spec.rb +0 -4
  1482. data/spec/lib/radiant/legacy_routes_spec.rb +0 -14
  1483. data/spec/models/radiant/exporter_spec.rb +0 -25
  1484. data/vendor/extensions/archive/test/fixtures/pages.yml +0 -397
  1485. data/vendor/extensions/archive/test/functional/archive_extension_test.rb +0 -16
  1486. data/vendor/extensions/archive/test/helpers/archive_index_test_helper.rb +0 -37
  1487. data/vendor/extensions/archive/test/test_helper.rb +0 -26
  1488. data/vendor/extensions/archive/test/unit/archive_day_index_page_test.rb +0 -22
  1489. data/vendor/extensions/archive/test/unit/archive_month_index_page_test.rb +0 -22
  1490. data/vendor/extensions/archive/test/unit/archive_page_test.rb +0 -40
  1491. data/vendor/extensions/archive/test/unit/archive_year_index_page_test.rb +0 -22
  1492. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/05_blockquote/only_first_quoted.html +0 -8
  1493. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/05_blockquote/only_first_quoted.text +0 -4
  1494. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/filtered_html.html +0 -1
  1495. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/filtered_html.options +0 -1
  1496. data/vendor/extensions/markdown_filter/vendor/kramdown/test/testcases/block/09_html/filtered_html.text +0 -1
  1497. data/vendor/plugins/haml/test/sass/templates/bork.sass +0 -2
  1498. data/vendor/rails/activerecord/examples/performance.sql +0 -85
  1499. data/vendor/rails/activerecord/test/cases/encoding_test.rb +0 -6
  1500. data/vendor/rails/activerecord/test/fixtures/fixture_database.sqlite +0 -0
  1501. data/vendor/rails/activerecord/test/fixtures/fixture_database.sqlite3 +0 -0
  1502. data/vendor/rails/activerecord/test/fixtures/fixture_database_2.sqlite +0 -0
  1503. data/vendor/rails/activerecord/test/fixtures/fixture_database_2.sqlite3 +0 -0
  1504. data/vendor/rails/activeresource/test/debug.log +0 -80350
  1505. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/active_record.rb +0 -66
  1506. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/fast.rb +0 -69
  1507. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/helpers.rb +0 -68
  1508. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/links.rb +0 -34
  1509. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/backend/simple.rb +0 -22
  1510. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/core_ext/hash/except.rb +0 -8
  1511. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/core_ext/hash/slice.rb +0 -8
  1512. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/core_ext/object/meta_class.rb +0 -5
  1513. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/helpers.rb +0 -5
  1514. data/vendor/rails/activesupport/lib/active_support/vendor/i18n-0.3.7/i18n/version.rb +0 -3
@@ -3,20 +3,56 @@
3
3
  * Table of contents
4
4
  {:toc}
5
5
 
6
- Sass is a meta-language on top of CSS
7
- that's used to describe the style of a document
8
- cleanly and structurally,
9
- with more power than flat CSS allows.
10
- Sass both provides a simpler, more elegant syntax for CSS
11
- and implements various features that are useful
12
- for creating manageable stylesheets.
6
+ Sass is an extension of CSS
7
+ that adds power and elegance to the basic language.
8
+ It allows you to use [variables](#variables_), [nested rules](#nested_rules),
9
+ [mixins](#mixins), [inline imports](#import), and more,
10
+ all with a fully CSS-compatible syntax.
11
+ Sass helps keep large stylesheets well-organized,
12
+ and get small stylesheets up and running quickly,
13
+ particularly with the help of
14
+ [the Compass style library](http://compass-style.org).
13
15
 
14
16
  ## Features
15
17
 
16
- * Whitespace active
17
- * Well-formatted output
18
- * Elegant input
19
- * Feature-rich
18
+ * Fully CSS3-compatible
19
+ * Language extensions such as variables, nesting, and mixins
20
+ * Many {Sass::Script::Functions useful functions} for manipulating colors and other values
21
+ * Advanced features like [control directives](#control_directives) for libraries
22
+ * Well-formatted, customizable output
23
+ * [Firebug integration](https://addons.mozilla.org/en-US/firefox/addon/103988)
24
+
25
+ ## Syntax
26
+
27
+ There are two syntaxes available for Sass.
28
+ The first, known as SCSS (Sassy CSS) and used throughout this reference,
29
+ is an extension of the syntax of CSS3.
30
+ This means that every valid CSS3 stylesheet
31
+ is a valid SCSS file with the same meaning.
32
+ In addition, SCSS understands most CSS hacks
33
+ and vendor-specific syntax, such as [IE's old `filter` syntax](http://msdn.microsoft.com/en-us/library/ms533754%28VS.85%29.aspx).
34
+ This syntax is enhanced with the Sass features described below.
35
+ Files using this syntax have the `.scss` extension.
36
+
37
+ The second and older syntax, known as the indented syntax (or sometimes just "Sass"),
38
+ provides a more concise way of writing CSS.
39
+ It uses indentation rather than brackets to indicate nesting of selectors,
40
+ and newlines rather than semicolons to separate properties.
41
+ Some people find this to be easier to read and quicker to write than SCSS.
42
+ The indented syntax has all the same features,
43
+ although some of them have slightly different syntax;
44
+ this is described in {file:INDENTED_SYNTAX.md the indented syntax reference}.
45
+ Files using this syntax have the `.sass` extension.
46
+
47
+ Either syntax can [import](#import) files written in the other.
48
+ Files can be automatically converted from one syntax to the other
49
+ using the `sass-convert` command line tool:
50
+
51
+ # Convert Sass to SCSS
52
+ $ sass-convert style.sass style.scss
53
+
54
+ # Convert SCSS to Sass
55
+ $ sass-convert style.scss style.sass
20
56
 
21
57
  ## Using Sass
22
58
 
@@ -32,37 +68,49 @@ The first step for all of these is to install the Haml gem:
32
68
 
33
69
  gem install haml
34
70
 
71
+ If you're using Windows,
72
+ you may need to [install Ruby](http://rubyinstaller.org/download.html) first.
73
+
35
74
  To run Sass from the command line, just use
36
75
 
37
- sass input.sass output.css
76
+ sass input.scss output.css
77
+
78
+ You can also tell Sass to watch the file and update the CSS
79
+ every time the Sass file changes:
80
+
81
+ sass --watch input.scss:output.css
82
+
83
+ If you have a directory with many Sass files,
84
+ you can also tell Sass to watch the entire directory:
85
+
86
+ sass --watch app/sass:public/stylesheets
38
87
 
39
88
  Use `sass --help` for full documentation.
40
- At the moment, the command-line tool doesn't support
41
- updating everything in a directory
42
- or automatically updating the CSS file when the Sass file changes.
43
- To do that, check out the [Compass](http://compass-style.org/) Sass framework.
44
89
 
45
90
  Using Sass in Ruby code is very simple.
46
91
  After installing the Haml gem,
47
92
  you can use it by running `require "sass"`
48
- and using Sass::Engine like so:
93
+ and using {Sass::Engine} like so:
49
94
 
50
- engine = Sass::Engine.new("#main\n background-color: #0000ff")
95
+ engine = Sass::Engine.new("#main {background-color: #0000ff}", :syntax => :scss)
51
96
  engine.render #=> "#main { background-color: #0000ff; }\n"
52
97
 
53
98
  ### Rack/Rails/Merb Plugin
54
99
 
55
- To enable Sass as a Rails plugin, run
100
+ To enable Sass in Rails versions before Rails 3,
101
+ add the following line to `environment.rb`:
102
+
103
+ config.gem "haml"
56
104
 
57
- haml --rails path/to/rails/app
105
+ For Rails 3, instead add the following line to the Gemfile:
106
+
107
+ gem "haml"
58
108
 
59
109
  To enable Sass in Merb,
60
- add
110
+ add the following line to `config/dependencies.rb`:
61
111
 
62
112
  dependency "merb-haml"
63
113
 
64
- to `config/dependencies.rb`.
65
-
66
114
  To enable Sass in a Rack application,
67
115
  add
68
116
 
@@ -74,10 +122,10 @@ to `config.ru`.
74
122
  Sass stylesheets don't work the same as views.
75
123
  They don't contain dynamic content,
76
124
  so the CSS only needs to be generated when the Sass file has been updated.
77
- By default, ".sass" files are placed in public/stylesheets/sass
125
+ By default, `.sass` and `.scss` files are placed in public/stylesheets/sass
78
126
  (this can be customized with the [`:template_location`](#template_location-option) option).
79
127
  Then, whenever necessary, they're compiled into corresponding CSS files in public/stylesheets.
80
- For instance, public/stylesheets/sass/main.sass would be compiled to public/stylesheets/main.css.
128
+ For instance, public/stylesheets/sass/main.scss would be compiled to public/stylesheets/main.css.
81
129
 
82
130
  ### Caching
83
131
 
@@ -104,29 +152,44 @@ in `environment.rb` in Rails or `config.ru` in Rack...
104
152
  Merb::Plugin.config[:sass][:style] = :compact
105
153
 
106
154
  ...or by passing an options hash to {Sass::Engine#initialize}.
155
+ All relevant options are also available via flags
156
+ to the `sass` command-line executable.
107
157
  Available options are:
108
158
 
109
159
  {#style-option} `:style`
110
160
  : Sets the style of the CSS output.
111
161
  See [Output Style](#output_style).
112
162
 
163
+ {#syntax-option} `:syntax`
164
+ : The syntax of the input file, `:sass` for the indented syntax
165
+ and `:scss` for the CSS-extension syntax.
166
+ This is only useful when you're constructing {Sass::Engine} instances yourself;
167
+ it's automatically set properly when using {Sass::Plugin}.
168
+ Defaults to `:sass`.
169
+
113
170
  {#property_syntax-option} `:property_syntax`
114
- : Forces the document to use one syntax for properties.
171
+ : Forces indented-syntax documents to use one syntax for properties.
115
172
  If the correct syntax isn't used, an error is thrown.
116
173
  `:new` forces the use of a colon or equals sign
117
174
  after the property name.
118
175
  For example: `color: #0f3`
119
- or `width = !main_width`.
176
+ or `width: $main_width`.
120
177
  `:old` forces the use of a colon
121
178
  before the property name.
122
179
  For example: `:color #0f3`
123
- or `:width = !main_width`.
180
+ or `:width $main_width`.
124
181
  By default, either syntax is valid.
182
+ This has no effect on SCSS documents.
125
183
 
126
184
  {#cache-option} `:cache`
127
185
  : Whether parsed Sass files should be cached,
128
186
  allowing greater speed. Defaults to true.
129
187
 
188
+ {#read_cache-option} `:read_cache`
189
+ : If this is set and `:cache` is not,
190
+ only read the Sass cache if it exists,
191
+ don't write to it if it doesn't.
192
+
130
193
  {#never_update-option} `:never_update`
131
194
  : Whether the CSS files should never be updated,
132
195
  even if the template file changes.
@@ -139,7 +202,7 @@ Available options are:
139
202
  time a controller is accessed,
140
203
  as opposed to only when the template has been modified.
141
204
  Defaults to false.
142
- Only has meaning within Rack, Ruby on Rails,x or Merb.
205
+ Only has meaning within Rack, Ruby on Rails, or Merb.
143
206
 
144
207
  {#always_check-option} `:always_check`
145
208
  : Whether a Sass template should be checked for updates every
@@ -172,6 +235,11 @@ Available options are:
172
235
  Note that if multiple template locations are specified, all
173
236
  of them are placed in the import path, allowing you to import
174
237
  between them.
238
+ **Note that due to the many possible formats it can take,
239
+ this option should only be set directly, not accessed or modified.
240
+ Use the {Sass::Plugin#template_location_array},
241
+ {Sass::Plugin#add_template_location},
242
+ and {Sass::Plugin#remove_template_location} methods instead**.
175
243
 
176
244
  {#css_location-option} `:css_location`
177
245
  : The path where CSS output should be written to.
@@ -187,7 +255,8 @@ Available options are:
187
255
  {#unix_newlines-option} `:unix_newlines`
188
256
  : If true, use Unix-style newlines when writing files.
189
257
  Only has meaning on Windows, and only when Sass is writing the files
190
- (in Rack, Rails, or Merb, or when using {Sass::Plugin} directly).
258
+ (in Rack, Rails, or Merb, when using {Sass::Plugin} directly,
259
+ or when using the command-line executable).
191
260
 
192
261
  {#filename-option} `:filename`
193
262
  : The filename of the file being rendered.
@@ -208,96 +277,92 @@ Available options are:
208
277
  {#line_numbers-option} `:line_numbers`
209
278
  : When set to true, causes the line number and file
210
279
  where a selector is defined to be emitted into the compiled CSS
211
- as a comment. Useful for debugging especially when using imports
280
+ as a comment. Useful for debugging, especially when using imports
212
281
  and mixins.
213
282
  This option may also be called `:line_comments`.
283
+ Automatically disabled when using the `:compressed` output style
284
+ or the `:debug_info` option.
285
+
286
+ {#debug_info-option} `:debug_info`
287
+ : When set to true, causes the line number and file
288
+ where a selector is defined to be emitted into the compiled CSS
289
+ in a format that can be understood by the browser.
290
+ Useful in conjunction with [the FireSass Firebug extension](https://addons.mozilla.org/en-US/firefox/addon/103988)
291
+ for displaying the Sass filename and line number.
292
+ Automatically disabled when using the `:compressed` output style.
214
293
 
215
294
  {#custom-option} `:custom`
216
295
  : An option that's available for individual applications to set
217
296
  to make data available to {Sass::Script::Functions custom Sass functions}.
218
297
 
219
- ## CSS Rules
220
-
221
- Rules in flat CSS have two elements:
222
- the selector (e.g. `#main`, `div p`, `li a:hover`)
223
- and the properties (e.g. `color: #00ff00;`, `width: 5em;`).
224
- Sass has both of these,
225
- as well as one additional element: nested rules.
298
+ {#sass2-option} `:sass2`
299
+ : Parses the document using semantics closer to that of Sass v2.
300
+ Currently, this just means that strings in mixin arguments
301
+ are treated as though they were in [an `=` context](#sass-script-strings).
302
+
303
+ {#quiet-option} `:quiet`
304
+ : When set to true, causes warnings to be disabled.
305
+
306
+ ### Encodings
307
+
308
+ When running on Ruby 1.9 and later, Sass is aware of the character encoding of documents
309
+ and will handle them the same way that CSS would.
310
+ By default, Sass assumes that all stylesheets are encoded
311
+ using whatever coding system your operating system defaults to.
312
+ For many users this will be `UTF-8`, the de facto standard for the web.
313
+ For some users, though, it may be a more local encoding.
314
+
315
+ If you want to use a different encoding for your stylesheet
316
+ than your operating system default,
317
+ you can use the `@charset` declaration just like in CSS.
318
+ Add `@charset "encoding-name";` at the beginning of the stylesheet
319
+ (before any whitespace or comments)
320
+ and Sass will interpret it as the given encoding.
321
+ Note that whatever encoding you use, it must be convertible to Unicode.
322
+
323
+ Sass will also respect any Unicode BOMs and non-ASCII-compatible Unicode encodings
324
+ [as specified by the CSS spec](http://www.w3.org/TR/CSS2/syndata.html#charset),
325
+ although this is *not* the recommended way
326
+ to specify the character set for a document.
327
+ Note that Sass does not support the obscure `UTF-32-2143`,
328
+ `UTF-32-3412`, `EBCDIC`, `IBM1026`, and `GSM 03.38` encodings,
329
+ since Ruby does not have support for them
330
+ and they're highly unlikely to ever be used in practice.
331
+
332
+ #### Output Encoding
333
+
334
+ In general, Sass will try to encode the output stylesheet
335
+ using the same encoding as the input stylesheet.
336
+ In order for it to do this, though, the input stylesheet must have a `@charset` declaration;
337
+ otherwise, Sass will default to encoding the output stylesheet as UTF-8.
338
+ In addition, it will add a `@charset` declaration to the output
339
+ if it's not plain ASCII.
340
+
341
+ When other stylesheets with `@charset` declarations are `@import`ed,
342
+ Sass will convert them to the same encoding as the main stylesheet.
343
+
344
+ Note that Ruby 1.8 does not have good support for character encodings,
345
+ and so Sass behaves somewhat differently when running under it than under Ruby 1.9 and later.
346
+ In Ruby 1.8, Sass simply uses the first `@charset` declaration in the stylesheet
347
+ or any of the other stylesheets it `@import`s.
348
+
349
+ ## CSS Extensions
226
350
 
227
- ### Rules and Selectors
228
-
229
- However, some of the syntax is a little different.
230
- The syntax for selectors is the same,
231
- but instead of using brackets to delineate the properties that belong to a particular rule,
232
- Sass uses indentation.
233
- For example:
234
-
235
- #main p
236
- <property>
237
- <property>
238
- ...
239
-
240
- Like CSS, you can stretch selectors over multiple lines.
241
- However, unlike CSS, you can only do this if each line but the last
242
- ends with a comma.
243
- For example:
244
-
245
- .users #userTab,
246
- .posts #postsTab
247
- <property>
248
-
249
- ### Properties
250
-
251
- There are two different ways to write CSS properties.
252
- The first is very similar to the how you're used to writing them:
253
- with a colon between the name and the value.
254
- However, Sass properties don't have semicolons at the end;
255
- each property is on its own line, so they aren't necessary.
256
- For example:
257
-
258
- #main p
259
- color: #00ff00
260
- width: 97%
261
-
262
- is compiled to:
263
-
264
- #main p {
265
- color: #00ff00;
266
- width: 97% }
351
+ ### Nested Rules
267
352
 
268
- The second syntax for properties is slightly different.
269
- The colon is at the beginning of the property,
270
- rather than between the name and the value,
271
- so it's easier to tell what elements are properties just by glancing at them.
353
+ Sass allows CSS rules to be nested within one another.
354
+ The inner rule then only applies within the outer rule's selector.
272
355
  For example:
273
356
 
274
- #main p
275
- :color #00ff00
276
- :width 97%
277
-
278
- is compiled to:
279
-
280
357
  #main p {
281
358
  color: #00ff00;
282
- width: 97% }
283
-
284
- By default, either property syntax may be used.
285
- If you want to force one or the other,
286
- see the [`:property_syntax`](#property_syntax-option) option.
287
-
288
- ### Nested Rules
289
-
290
- Rules can also be nested within each other.
291
- This signifies that the inner rule's selector is a child of the outer selector.
292
- For example:
359
+ width: 97%;
293
360
 
294
- #main p
295
- color: #00ff00
296
- width: 97%
297
-
298
- .redbox
299
- background-color: #ff0000
300
- color: #000000
361
+ .redbox {
362
+ background-color: #ff0000;
363
+ color: #000000;
364
+ }
365
+ }
301
366
 
302
367
  is compiled to:
303
368
 
@@ -308,18 +373,20 @@ is compiled to:
308
373
  background-color: #ff0000;
309
374
  color: #000000; }
310
375
 
311
- This makes insanely complicated CSS layouts with lots of nested selectors very simple:
376
+ This helps avoid repetition of parent selectors,
377
+ and makes complex CSS layouts with lots of nested selectors much simpler.
378
+ For example:
312
379
 
313
- #main
314
- width: 97%
380
+ #main {
381
+ width: 97%;
315
382
 
316
- p, div
317
- font-size: 2em
318
- a
319
- font-weight: bold
383
+ p, div {
384
+ font-size: 2em;
385
+ a { font-weight: bold; }
386
+ }
320
387
 
321
- pre
322
- font-size: 3em
388
+ pre { font-size: 3em; }
389
+ }
323
390
 
324
391
  is compiled to:
325
392
 
@@ -334,72 +401,74 @@ is compiled to:
334
401
 
335
402
  ### Referencing Parent Selectors: `&`
336
403
 
337
- In addition to the default behavior of inserting the parent selector
338
- as a CSS parent of the current selector
339
- (e.g. above, `#main` is the parent of `p`),
340
- you can have more fine-grained control over what's done with the parent selector
341
- by using the ampersand character `&` in your selectors.
342
-
343
- The ampersand is automatically replaced by the parent selector,
344
- instead of having it prepended.
345
- This allows you to cleanly create pseudo-classes:
404
+ Sometimes it's useful to use a nested rule's parent selector
405
+ in other ways than the default.
406
+ For instance, you might want to have special styles
407
+ for when that selector is hovered over
408
+ or for when the body element has a certain class.
409
+ In these cases, you can explicitly specify where the parent selector
410
+ should be inserted using the `&` character.
411
+ For example:
346
412
 
347
- a
348
- font-weight: bold
349
- text-decoration: none
350
- &:hover
351
- text-decoration: underline
352
- &:visited
353
- font-weight: normal
413
+ a {
414
+ font-weight: bold;
415
+ text-decoration: none;
416
+ &:hover { text-decoration: underline; }
417
+ body.firefox & { font-weight: normal; }
418
+ }
354
419
 
355
- Which would become:
420
+ is compiled to:
356
421
 
357
422
  a {
358
423
  font-weight: bold;
359
424
  text-decoration: none; }
360
425
  a:hover {
361
426
  text-decoration: underline; }
362
- a:visited {
427
+ body.firefox a {
363
428
  font-weight: normal; }
364
429
 
365
- It also allows you to add selectors at the base of the hierarchy,
366
- which can be useuful for targeting certain styles to certain browsers:
430
+ `&` will be replaced with the parent selector as it appears in the CSS.
431
+ This means that if you have a deeply nested rule,
432
+ the parent selector will be fully resolved
433
+ before the `&` is replaced.
434
+ For example:
367
435
 
368
- #main
369
- width: 90%
370
- #sidebar
371
- float: left
372
- margin-left: 20%
373
- .ie6 &
374
- margin-left: 40%
436
+ #main {
437
+ color: black;
438
+ a {
439
+ font-weight: bold;
440
+ &:hover { color: red; }
441
+ }
442
+ }
375
443
 
376
- Which would become:
444
+ is compiled to:
377
445
 
378
446
  #main {
379
- width: 90%; }
380
- #main #sidebar {
381
- float: left;
382
- margin-left: 20%; }
383
- .ie6 #main #sidebar {
384
- margin-left: 40%; }
447
+ color: black; }
448
+ #main a {
449
+ font-weight: bold; }
450
+ #main a:hover {
451
+ color: red; }
385
452
 
386
- ### Property Namespaces
453
+ ### Nested Properties
387
454
 
388
455
  CSS has quite a few properties that are in "namespaces;"
389
456
  for instance, `font-family`, `font-size`, and `font-weight`
390
457
  are all in the `font` namespace.
391
458
  In CSS, if you want to set a bunch of properties in the same namespace,
392
459
  you have to type it out each time.
393
- Sass offers a shortcut for this:
460
+ Sass provides a shortcut for this:
394
461
  just write the namespace one,
395
- then indent each of the sub-properties within it.
462
+ then nest each of the sub-properties within it.
396
463
  For example:
397
464
 
398
- .funky
399
- font:
400
- family: fantasy
401
- size: 30em
402
- weight: bold
465
+ .funky {
466
+ font: {
467
+ family: fantasy;
468
+ size: 30em;
469
+ weight: bold;
470
+ }
471
+ }
403
472
 
404
473
  is compiled to:
405
474
 
@@ -408,258 +477,67 @@ is compiled to:
408
477
  font-size: 30em;
409
478
  font-weight: bold; }
410
479
 
411
- ### Selector Escaping: `\`
412
-
413
- In case, for whatever reason, you need to write a selector
414
- that begins with a Sass-meaningful character,
415
- you can escape it with a backslash (`\`).
480
+ The property namespace itself can also have a value.
416
481
  For example:
417
482
 
418
- #main
419
- \+div
420
- clear: both
483
+ .funky {
484
+ font: 2px/3px {
485
+ family: fantasy;
486
+ size: 30em;
487
+ weight: bold;
488
+ }
489
+ }
421
490
 
422
491
  is compiled to:
423
492
 
424
- #main +div {
425
- clear: both; }
426
-
427
- ## Directives
428
-
429
- Directives allow the author to directly issue instructions to the Sass compiler.
430
- They're prefixed with an at sign, `@`,
431
- followed by the name of the directive,
432
- a space, and any arguments to it -
433
- just like CSS directives.
434
- For example:
435
-
436
- @import red.sass
437
-
438
- Some directives can also control whether or how many times
439
- a chunk of Sass is output.
440
- Those are documented under Control Directives.
441
-
442
- ### `@import` {#import}
443
-
444
- The `@import` directive works in a very similar way to the CSS import directive.
445
- It can either compile to a literal CSS `@import` directive for a CSS file,
446
- or it can import a Sass file.
447
- If it imports a Sass file,
448
- not only are the rules from that file included,
449
- but all variables in that file are made available in the current file.
450
-
451
- Sass looks for other Sass files in the working directory,
452
- and the Sass file directory under Rack, Rails, or Merb.
453
- Additional search directories may be specified
454
- using the [`:load_paths`](#load_paths-option) option.
455
-
456
- `@import` takes a filename with or without an extension.
457
- If an extension isn't provided,
458
- Sass will try to find a Sass file with the given basename in the load paths.
459
-
460
- For example,
461
-
462
- @import foo.sass
463
-
464
- or
465
-
466
- @import foo
467
-
468
- would compile to
469
-
470
- .foo {
471
- color: #f00; }
472
-
473
- whereas
474
-
475
- @import foo.css
476
-
477
- would compile to
478
-
479
- @import "foo.css";
480
-
481
- #### Partials {#partials}
482
-
483
- If you have a Sass file that you want to import
484
- but don't want to compile to a CSS file,
485
- you can add an underscore to the beginning of the filename.
486
- This will tell Sass not to compile it to a normal CSS file.
487
- You can then refer to these files without using the underscore.
488
-
489
- For example, you might have `_colors.sass`.
490
- Then no `_colors.css` file would be created,
491
- and you can do
492
-
493
- @import colors.sass
494
-
495
- ### `@debug`
496
-
497
- The `@debug` directive prints the value of a SassScript expression
498
- to standard error.
499
- It's useful for debugging Sass files
500
- that have complicated SassScript going on.
501
- For example:
502
-
503
- @debug 10em + 12em
504
-
505
- outputs:
506
-
507
- Line 1 DEBUG: 22em
493
+ .funky {
494
+ font: 2px/3px;
495
+ font-family: fantasy;
496
+ font-size: 30em;
497
+ font-weight: bold; }
508
498
 
509
- ### `@font-face`, `@media`, etc.
499
+ ## Comments: `/* */` and `//` {#comments}
510
500
 
511
- Sass behaves as you'd expect for normal CSS @-directives.
501
+ Sass supports standard multiline CSS comments with `/* */`,
502
+ as well as single-line comments with `//`.
503
+ The multiline comments are preserved in the CSS output where possible,
504
+ while the single-line comments are removed.
512
505
  For example:
513
506
 
514
- @font-face
515
- font-family: "Bitstream Vera Sans"
516
- src: url(http://foo.bar/bvs)
517
-
518
- compiles to:
519
-
520
- @font-face {
521
- font-family: "Bitstream Vera Sans";
522
- src: url(http://foo.bar/bvs); }
507
+ /* This comment is
508
+ * several lines long.
509
+ * since it uses the CSS comment syntax,
510
+ * it will appear in the CSS output. */
511
+ body { color: black; }
523
512
 
524
- and
525
-
526
- @media print
527
- #sidebar
528
- display: none
529
-
530
- #main
531
- background-color: white
532
-
533
- compiles to:
534
-
535
- @media print {
536
- #sidebar {
537
- display: none; }
538
-
539
- #main {
540
- background-color: white; } }
541
-
542
- ## Control Directives
543
-
544
- SassScript supports basic control directives for looping and conditional evaluation.
545
-
546
- ### `@if`
547
-
548
- The `@if` statement takes a SassScript expression
549
- and prints the code nested beneath it if the expression returns
550
- anything other than `false`:
551
-
552
- p
553
- @if 1 + 1 == 2
554
- border: 1px solid
555
- @if 5 < 3
556
- border: 2px dotted
513
+ // These comments are only one line long each.
514
+ // They won't appear in the CSS output,
515
+ // since they use the single-line comment syntax.
516
+ a { color: green; }
557
517
 
558
518
  is compiled to:
559
519
 
560
- p {
561
- border: 1px solid; }
562
-
563
- The `@if` statement can be followed by several `@else if` statements
564
- and one `@else` statement.
565
- If the `@if` statement fails,
566
- the `@else if` statements are tried in order
567
- until one succeeds or the `@else` is reached.
568
- For example:
569
-
570
- !type = "monster"
571
- p
572
- @if !type == "ocean"
573
- color: blue
574
- @else if !type == "matador"
575
- color: red
576
- @else if !type == "monster"
577
- color: green
578
- @else
579
- color: black
580
-
581
- is compiled to:
520
+ /* This comment is
521
+ * several lines long.
522
+ * since it uses the CSS comment syntax,
523
+ * it will appear in the CSS output. */
524
+ body {
525
+ color: black; }
582
526
 
583
- p {
527
+ a {
584
528
  color: green; }
585
529
 
586
- ### `@for`
587
-
588
- The `@for` statement has two forms:
589
- `@for <var> from <start> to <end>` or
590
- `@for <var> from <start> through <end>`.
591
- `<var>` is a variable name, like `!i`,
592
- and `<start>` and `<end>` are SassScript expressions
593
- that should return integers.
594
-
595
- The `@for` statement sets `<var>` to each number
596
- from `<start>` to `<end>`,
597
- including `<end>` if `through` is used.
598
- For example:
599
-
600
- @for !i from 1 through 3
601
- .item-#{!i}
602
- width = 2em * !i
603
-
604
- is compiled to:
605
-
606
- .item-1 {
607
- width: 2em; }
608
- .item-2 {
609
- width: 4em; }
610
- .item-3 {
611
- width: 6em; }
612
-
613
- ### `@while`
614
-
615
- The `@while` statement repeatedly loops over the nested
616
- block until the statement evaluates to `false`. This can
617
- be used to achieve more complex looping than the `@for`
618
- statement is capable of.
619
- For example:
620
-
621
- !i = 6
622
- @while !i > 0
623
- .item-#{!i}
624
- width = 2em * !i
625
- !i = !i - 2
626
-
627
- is compiled to:
628
-
629
- .item-6 {
630
- width: 12em; }
631
-
632
- .item-4 {
633
- width: 8em; }
634
-
635
- .item-2 {
636
- width: 4em; }
637
-
638
- ## SassScript
639
-
640
- In addition to the declarative templating system,
641
- Sass supports a simple language known as SassScript
642
- for dynamically computing CSS values and controlling
643
- the styles and selectors that get emitted.
644
-
645
- SassScript can be used as the value for a property
646
- by using `=` instead of `:`.
647
- For example:
648
-
649
- color = #123 + #234
650
-
651
- is compiled to:
652
-
653
- color: #357;
654
-
655
- For old-style properties, the `=` is added but the `:` is retained.
656
- For example:
657
-
658
- :color = #123 + #234
530
+ ## SassScript {#sassscript}
659
531
 
660
- is compiled to:
532
+ In addition to the plain CSS property syntax,
533
+ Sass supports a small set of extensions called SassScript.
534
+ SassScript allows properties to use
535
+ variables, arithmetic, and extra functions.
536
+ SassScript can be used in any property value.
661
537
 
662
- color: #357;
538
+ SassScript can also be used to generate selectors and property names,
539
+ which is useful when writing [mixins](#mixins).
540
+ This is done via [interpolation](#interpolation_).
663
541
 
664
542
  ### Interactive Shell
665
543
 
@@ -678,58 +556,93 @@ and the result printed out for you:
678
556
  >> #777 + #888
679
557
  white
680
558
 
681
- ### Variables: `!`
559
+ ### Variables: `$` {#variables_}
682
560
 
683
561
  The most straightforward way to use SassScript
684
- is to set and reference variables.
685
- Variables begin with exclamation marks,
686
- and are set like so:
562
+ is to use variables.
563
+ Variables begin with dollar signs,
564
+ and are set like CSS properties:
565
+
566
+ $width: 5em;
687
567
 
688
- !width = 5em
568
+ You can then refer to them in properties:
569
+
570
+ #main {
571
+ width: $width;
572
+ }
689
573
 
690
- You can then refer to them by putting an equals sign
691
- after your properties:
574
+ Variables are only available within the level of nested selectors
575
+ where they're defined.
576
+ If they're defined outside of any nested selectors,
577
+ they're available everywhere.
692
578
 
693
- #main
694
- width = !width
579
+ Variables used to use the prefix character `!`;
580
+ this still works, but it's deprecated and prints a warning.
581
+ `$` is the recommended syntax.
695
582
 
696
- Variables that are first defined in a scoped context are only
697
- available in that context.
583
+ Variables also used to be defined with `=` rather than `:`;
584
+ this still works, but it's deprecated and prints a warning.
585
+ `:` is the recommended syntax.
698
586
 
699
587
  ### Data Types
700
588
 
701
- SassScript supports four data types:
589
+ SassScript supports four main data types:
590
+
702
591
  * numbers (e.g. `1.2`, `13`, `10px`)
703
- * strings of text (e.g. `"foo"`, `"bar"`)
704
- * colors (e.g. `blue`, `#04a3f9`)
592
+ * strings of text, with and without quotes (e.g. `"foo"`, `'bar'`, `baz`)
593
+ * colors (e.g. `blue`, `#04a3f9`, `rgba(255, 0, 0, 0.5)`)
705
594
  * booleans (e.g. `true`, `false`)
706
595
 
707
- Any text that doesn't fit into one of those types
708
- in a SassScript context will cause an error:
596
+ SassScript also supports all other types of CSS property value,
597
+ such as Unicode ranges and `!important` declarations.
598
+ However, it has no special handling for these types.
599
+ They're treated just like unquoted strings.
600
+
601
+ #### Strings {#sass-script-strings}
602
+
603
+ CSS specifies two kinds of strings: those with quotes,
604
+ such as `"Lucida Grande"` or `'http://sass-lang.com'`,
605
+ and those without quotes, such as `sans-serif` or `bold`.
606
+ SassScript recognizes both kinds,
607
+ and in general if one kind of string is used in the Sass document,
608
+ that kind of string will be used in the resulting CSS.
709
609
 
710
- p
711
- !width = 5em
712
- // This will cause an error
713
- border = !width solid blue
714
- // Use one of the following forms instead:
715
- border = "#{!width} solid blue"
716
- border = !width "solid" "blue"
610
+ There is one exception to this, though:
611
+ when using [`#{}` interpolation](#interpolation_),
612
+ quoted strings are unquoted.
613
+ This makes it easier to use e.g. selector names in [mixins](#mixins).
614
+ For example:
615
+
616
+ @mixin firefox-message($selector) {
617
+ body.firefox #{$selector}:before {
618
+ content: "Hi, Firefox users!"; } }
619
+
620
+ @include firefox-message(".header");
717
621
 
718
622
  is compiled to:
719
623
 
720
- p {
721
- border: 5em solid blue;
722
- border: 5em solid blue; }
624
+ body.firefox .header:before {
625
+ content: "Hi, Firefox users!"; }
723
626
 
627
+ It's also worth noting that when using the [deprecated `=` property syntax](#sassscript),
628
+ all strings are interpreted as unquoted,
629
+ regardless of whether or not they're written with quotes.
724
630
 
725
631
  ### Operations
726
632
 
633
+ All types support equality operations (`==` and `!=`).
634
+ In addition, each type has its own operations
635
+ that it has special support for.
636
+
637
+ #### Number Operations
638
+
727
639
  SassScript supports the standard arithmetic operations on numbers
728
640
  (`+`, `-`, `*`, `/`, `%`),
729
641
  and will automatically convert between units if it can:
730
642
 
731
- p
732
- width = 1in + 8pt
643
+ p {
644
+ width: 1in + 8pt;
645
+ }
733
646
 
734
647
  is compiled to:
735
648
 
@@ -743,14 +656,69 @@ and equality operators
743
656
  (`==`, `!=`)
744
657
  are supported for all types.
745
658
 
659
+ ##### Division and `/`
660
+ {#division-and-slash}
661
+
662
+ CSS allows `/` to appear in property values
663
+ as a way of separating numbers.
664
+ Since SassScript is an extension of the CSS property syntax,
665
+ it must support this, while also allowing `/` to be used for division.
666
+ This means that by default, if two numbers are separated by `/` in SassScript,
667
+ then they will appear that way in the resulting CSS.
668
+
669
+ However, there are three situations where the `/` will be interpreted as division.
670
+ These cover the vast majority of cases where division is actually used.
671
+ They are:
672
+
673
+ 1. If the value, or any part of it, is stored in a variable.
674
+ 2. If the value is surrounded by parentheses.
675
+ 3. If the value is used as part of another arithmetic expression.
676
+
677
+ For example:
678
+
679
+ p {
680
+ font: 10px/8px; // Plain CSS, no division
681
+ $width: 1000px;
682
+ width: $width/2; // Uses a variable, does division
683
+ height: (500px/2); // Uses parentheses, does division
684
+ margin-left: 5px + 8px/2px; // Uses +, does division
685
+ }
686
+
687
+ is compiled to:
688
+
689
+ p {
690
+ font: 10px/8px;
691
+ width: 500px;
692
+ height: 250px;
693
+ margin-left: 9px; }
694
+
695
+ If you want to use variables along with a plain CSS `/`,
696
+ you can use `#{}` to insert them.
697
+ For example:
698
+
699
+ p {
700
+ $font-size: 12px;
701
+ $line-height: 30px;
702
+ font: #{$font-size}/#{$line-height};
703
+ }
704
+
705
+ is compiled to:
706
+
707
+ p {
708
+ font: 12px/30px;
709
+ }
710
+
711
+ #### Color Operations
712
+
746
713
  All arithmetic operations are supported for color values,
747
714
  where they work piecewise.
748
715
  This means that the operation is performed
749
716
  on the red, green, and blue components in turn.
750
717
  For example:
751
718
 
752
- p
753
- color = #010203 + #040506
719
+ p {
720
+ color: #010203 + #040506;
721
+ }
754
722
 
755
723
  computes `01 + 04 = 05`, `02 + 05 = 07`, and `03 + 06 = 09`,
756
724
  and is compiled to:
@@ -758,12 +726,16 @@ and is compiled to:
758
726
  p {
759
727
  color: #050709; }
760
728
 
761
- Arithmetic operations even work between numbers and colors,
729
+ Often it's more useful to use {Sass::Script::Functions color functions}
730
+ than to try to use color arithmetic to achieve the same effect.
731
+
732
+ Arithmetic operations also work between numbers and colors,
762
733
  also piecewise.
763
734
  For example:
764
735
 
765
- p
766
- color = #010203 * 2
736
+ p {
737
+ color: #010203 * 2;
738
+ }
767
739
 
768
740
  computes `01 * 2 = 02`, `02 * 2 = 04`, and `03 * 2 = 06`,
769
741
  and is compiled to:
@@ -771,315 +743,873 @@ and is compiled to:
771
743
  p {
772
744
  color: #020406; }
773
745
 
774
- The `+` operation can be used to concatenate strings:
746
+ Note that colors with an alpha channel
747
+ (those created with the {Sass::Script::Functions#rgba rgba}
748
+ or {Sass::Script::Functions#hsla hsla} functions)
749
+ must have the same alpha value in order for color arithmetic
750
+ to be done with them.
751
+ The arithmetic doesn't affect the alpha value.
752
+ For example:
775
753
 
776
- p
777
- cursor = "e" + "-resize"
754
+ p {
755
+ color: rgba(255, 0, 0, 0.75) + rgba(0, 255, 0, 0.75);
756
+ }
778
757
 
779
758
  is compiled to:
780
759
 
781
760
  p {
782
- cursor: e-resize; }
761
+ color: rgba(255, 255, 0, 0.75); }
783
762
 
784
- By default, if two values are placed next to one another,
785
- they are concatenated with a space:
763
+ The alpha channel of a color can be adjusted using the
764
+ {Sass::Script::Functions#opacify opacify} and
765
+ {Sass::Script::Functions#transparentize transparentize} functions.
766
+ For example:
786
767
 
787
- p
788
- margin = 3px + 4px "auto"
768
+ $translucent-red: rgba(255, 0, 0, 0.5);
769
+ p {
770
+ color: opacify($translucent-red, 0.8);
771
+ background-color: transparentize($translucent-red, 50%);
772
+ }
789
773
 
790
774
  is compiled to:
791
775
 
792
776
  p {
793
- margin: 7px auto; }
777
+ color: rgba(255, 0, 0, 0.9);
778
+ background-color: rgba(255, 0, 0, 0.25); }
794
779
 
795
- Within a string of text, #{} style interpolation can be used to
796
- place dynamic values within the string:
780
+ #### String Operations
797
781
 
798
- p
799
- border = "#{5px + 10px} solid #ccc"
782
+ The `+` operation can be used to concatenate strings:
800
783
 
801
- Finally, SassScript supports `and`, `or`, and `not` operators
802
- for boolean values.
784
+ p {
785
+ cursor: e + -resize;
786
+ }
803
787
 
804
- ### Parentheses
788
+ is compiled to:
805
789
 
806
- Parentheses can be used to affect the order of operations:
790
+ p {
791
+ cursor: e-resize; }
792
+
793
+ Note that if a quoted string is added to an unquoted string
794
+ (that is, the quoted string is to the left of the `+`),
795
+ the result is a quoted string.
796
+ Likewise, if an unquoted string is added to a quoted string
797
+ (the unquoted string is to the left of the `+`),
798
+ the result is an unquoted string.
799
+ For example:
807
800
 
808
- p
809
- width = 1em + (2em * 3)
801
+ p:before {
802
+ content: "Foo " + Bar;
803
+ font-family: sans- + "serif"; }
810
804
 
811
805
  is compiled to:
812
806
 
813
- p {
814
- width: 7em; }
807
+ p:before {
808
+ content: "Foo Bar";
809
+ font-family: sans-serif; }
815
810
 
816
- ### Functions
811
+ By default, if two values are placed next to one another,
812
+ they are concatenated with a space:
813
+
814
+ p {
815
+ margin: 3px + 4px auto;
816
+ }
817
+
818
+ is compiled to:
819
+
820
+ p {
821
+ margin: 7px auto; }
822
+
823
+ Within a string of text, #{} style interpolation can be used to
824
+ place dynamic values within the string:
825
+
826
+ p:before {
827
+ content: "I ate #{5 + 10} pies!"; }
828
+
829
+ is compiled to:
830
+
831
+ p:before {
832
+ content: "I ate 15 pies!"; }
833
+
834
+ #### Boolean Operations
835
+
836
+ SassScript supports `and`, `or`, and `not` operators
837
+ for boolean values.
838
+
839
+ ### Parentheses
840
+
841
+ Parentheses can be used to affect the order of operations:
842
+
843
+ p {
844
+ width: 1em + (2em * 3);
845
+ }
846
+
847
+ is compiled to:
848
+
849
+ p {
850
+ width: 7em; }
851
+
852
+ ### Functions
817
853
 
818
854
  SassScript defines some useful functions
819
855
  that are called using the normal CSS function syntax:
820
856
 
821
- p
822
- color = hsl(0, 100%, 50%)
857
+ p {
858
+ color: hsl(0, 100%, 0.5);
859
+ }
823
860
 
824
861
  is compiled to:
825
862
 
826
- #main {
863
+ p {
827
864
  color: #ff0000; }
828
865
 
829
- The following functions are provided: `hsl`, `percentage`, `round`, `ceil`, `floor`, and `abs`.
830
- You can define additional functions in ruby.
866
+ See {Sass::Script::Functions} for a full listing of Sass functions,
867
+ as well as instructions on defining your own in Ruby.
831
868
 
832
- See {Sass::Script::Functions} for more information.
833
-
834
- ### Interpolation: `#{}`
869
+ ### Interpolation: `#{}` {#interpolation_}
835
870
 
836
871
  You can also use SassScript variables in selectors
837
872
  and property names using #{} interpolation syntax:
838
873
 
839
- !name = foo
840
- !attr = border
841
- p.#{!name}
842
- #{!attr}-color: blue
874
+ $name: foo;
875
+ $attr: border;
876
+ p.#{$name} { #{$attr}-color: blue }
843
877
 
844
878
  is compiled to:
845
879
 
846
880
  p.foo {
847
881
  border-color: blue; }
848
882
 
849
- ### Optional Assignment: `||=`
883
+ It's also possible to use `#{}` to put SassScript into property values.
884
+ In most cases this isn't any better than using a variable,
885
+ but using `#{}` does mean that any operations near it
886
+ will be treated as plain CSS.
887
+ For example:
888
+
889
+ p {
890
+ $font-size: 12px;
891
+ $line-height: 30px;
892
+ font: #{$font-size}/#{$line-height};
893
+ }
894
+
895
+ is compiled to:
896
+
897
+ p {
898
+ font: 12px/30px;
899
+ }
900
+
901
+ ### Variable Defaults: `!default`
850
902
 
851
903
  You can assign to variables if they aren't already assigned
852
- using the `||=` assignment operator. This means that if the
853
- variable has already been assigned to, it won't be re-assigned,
904
+ by adding the `!default` flag to the end of the value.
905
+ This means that if the variable has already been assigned to,
906
+ it won't be re-assigned,
854
907
  but if it doesn't have a value yet, it will be given one.
855
908
 
856
909
  For example:
857
910
 
858
- !content = "First content"
859
- !content ||= "Second content?"
860
- !new_content ||= "First time reference"
911
+ $content: "First content";
912
+ $content: "Second content?" !default;
913
+ $new_content: "First time reference" !default;
861
914
 
862
- #main
863
- content = !content
864
- new-content = !new_content
915
+ #main {
916
+ content: $content;
917
+ new-content: $new_content;
918
+ }
865
919
 
866
920
  is compiled to:
867
921
 
868
922
  #main {
869
- content: First content;
870
- new-content: First time reference; }
923
+ content: "First content";
924
+ new-content: "First time reference"; }
925
+
926
+ ## `@`-Rules and Directives {#directives}
927
+
928
+ Sass supports all CSS3 `@`-rules,
929
+ as well as some additional Sass-specific ones
930
+ known as "directives."
931
+ These have various effects in Sass, detailed below.
932
+ See also [control directives](#control-directives)
933
+ and [mixin directives](#mixins).
934
+
935
+ ### `@import` {#import}
936
+
937
+ Sass extends the CSS `@import` rule
938
+ to allow it to import SCSS and Sass files.
939
+ All imported SCSS and Sass files will be merged together
940
+ into a single CSS output file.
941
+ In addition, any variables or [mixins](#mixins)
942
+ defined in imported files can be used in the main file.
943
+
944
+ Sass looks for other Sass files in the current directory,
945
+ and the Sass file directory under Rack, Rails, or Merb.
946
+ Additional search directories may be specified
947
+ using the [`:load_paths`](#load_paths-option) option,
948
+ or the `--load-path` option on the command line.
949
+
950
+ `@import` takes a filename to import.
951
+ By default, it looks for a Sass file to import directly,
952
+ but there are a few circumstances under which it will compile to a CSS `@import` rule:
953
+
954
+ * If the file's extension is `.css`.
955
+ * If the filename begins with `http://`.
956
+ * If the filename is a `url()`.
957
+ * If the `@import` has any media queries.
958
+
959
+ If none of the above conditions are met
960
+ and the extension is `.scss` or `.sass`,
961
+ then the named Sass or SCSS file will be imported.
962
+ If there is no extension,
963
+ Sass will try to find a file with that name and the `.scss` or `.sass` extension
964
+ and import it.
965
+
966
+ For example,
967
+
968
+ @import "foo.scss";
969
+
970
+ or
971
+
972
+ @import "foo";
973
+
974
+ would both import the file `foo.scss`,
975
+ whereas
976
+
977
+ @import "foo.css";
978
+ @import "foo" screen;
979
+ @import "http://foo.com/bar";
980
+ @import url(foo);
981
+
982
+ would all compile to
983
+
984
+ @import "foo.css";
985
+ @import "foo" screen;
986
+ @import "http://foo.com/bar";
987
+ @import url(foo);
871
988
 
872
- ## Mixins
989
+ It's also possible to import multiple files in one `@import`. For example:
873
990
 
874
- Mixins enable you to define groups of CSS properties and
875
- then include them inline in any number of selectors
876
- throughout the document. This allows you to keep your
877
- stylesheets DRY and also avoid placing presentation
878
- classes in your markup.
991
+ @import "rounded-corners", "text-shadow";
879
992
 
880
- ### Defining a Mixin: `=`
993
+ would import both the `rounded-corners` and the `text-shadow` files.
881
994
 
882
- To define a mixin you use a slightly modified form of selector syntax.
883
- For example the `large-text` mixin is defined as follows:
995
+ #### Partials {#partials}
996
+
997
+ If you have a SCSS or Sass file that you want to import
998
+ but don't want to compile to a CSS file,
999
+ you can add an underscore to the beginning of the filename.
1000
+ This will tell Sass not to compile it to a normal CSS file.
1001
+ You can then import these files without using the underscore.
1002
+
1003
+ For example, you might have `_colors.scss`.
1004
+ Then no `_colors.css` file would be created,
1005
+ and you can do
1006
+
1007
+ @import "colors";
1008
+
1009
+ and `_colors.scss` would be imported.
884
1010
 
885
- =large-text
886
- font:
887
- family: Arial
888
- size: 20px
889
- weight: bold
890
- color: #ff0000
1011
+ ### `@extend` {#extend}
891
1012
 
892
- The initial `=` marks this as a mixin rather than a standard selector.
893
- The CSS rules that follow won't be included until the mixin is referenced later on.
894
- Anything you can put into a standard selector,
895
- you can put into a mixin definition.
1013
+ There are often cases when designing a page
1014
+ when one class should have all the styles of another class,
1015
+ as well as its own specific styles.
1016
+ The most common way of handling this is to use both the more general class
1017
+ and the more specific class in the HTML.
1018
+ For example, suppose we have a design for a normal error
1019
+ and also for a serious error. We might write our markup like so:
1020
+
1021
+ <div class="error seriousError">
1022
+ Oh no! You've been hacked!
1023
+ </div>
1024
+
1025
+ And our styles like so:
1026
+
1027
+ .error {
1028
+ border: 1px #f00;
1029
+ background-color: #fdd;
1030
+ }
1031
+ .seriousError {
1032
+ border-width: 3px;
1033
+ }
1034
+
1035
+ Unfortunately, this means that we have to always remember
1036
+ to use `.error` with `.seriousError`.
1037
+ This is a maintenance burden, leads to tricky bugs,
1038
+ and can bring non-semantic style concerns into the markup.
1039
+
1040
+ The `@extend` directive avoids these problems
1041
+ by telling Sass that one selector should inherit the styles of another selector.
896
1042
  For example:
897
1043
 
898
- =clearfix
899
- display: inline-block
900
- &:after
901
- content: "."
902
- display: block
903
- height: 0
904
- clear: both
905
- visibility: hidden
906
- * html &
907
- height: 1px
1044
+ .error {
1045
+ border: 1px #f00;
1046
+ background-color: #fdd;
1047
+ }
1048
+ .seriousError {
1049
+ @extend .error;
1050
+ border-width: 3px;
1051
+ }
1052
+
1053
+ This means that all styles defined for `.error`
1054
+ are also applied to `.seriousError`,
1055
+ in addition to the styles specific to `.seriousError`.
1056
+ In effect, everything with class `.seriousError` also has class `.error`.
908
1057
 
909
- ### Mixing It In: `+`
1058
+ Other rules that use `.error` will work for `.seriousError` as well.
1059
+ For example, if we have special styles for errors caused by hackers:
910
1060
 
911
- Inlining a defined mixin is simple,
912
- just prepend a `+` symbol to the name of a mixin defined earlier in the document.
913
- So to inline the `large-text` defined earlier,
914
- we include the statment `+large-text` in our selector definition thus:
1061
+ .error.intrusion {
1062
+ background-image: url("/image/hacked.png");
1063
+ }
915
1064
 
916
- .page-title
917
- +large-text
918
- padding: 4px
919
- margin:
920
- top: 10px
1065
+ Then `<div class="seriousError intrusion">`
1066
+ will have the `hacked.png` background image as well.
921
1067
 
922
- This will produce the following CSS output:
1068
+ #### How it Works
923
1069
 
924
- .page-title {
925
- font-family: Arial;
926
- font-size: 20px;
927
- font-weight: bold;
928
- color: #ff0000;
929
- padding: 4px;
930
- margin-top: 10px; }
1070
+ `@extend` works by inserting the extending selector (e.g. `.seriousError`)
1071
+ anywhere in the stylesheet that the extended selector (.e.g `.error`) appears.
1072
+ Thus the example above:
1073
+
1074
+ .error {
1075
+ border: 1px #f00;
1076
+ background-color: #fdd;
1077
+ }
1078
+ .error.intrusion {
1079
+ background-image: url("/image/hacked.png");
1080
+ }
1081
+ .seriousError {
1082
+ @extend .error;
1083
+ border-width: 3px;
1084
+ }
1085
+
1086
+ is compiled to:
1087
+
1088
+ .error, .seriousError {
1089
+ border: 1px #f00;
1090
+ background-color: #fdd; }
1091
+
1092
+ .error.intrusion, .seriousError.intrusion {
1093
+ background-image: url("/image/hacked.png"); }
1094
+
1095
+ .seriousError {
1096
+ border-width: 3px; }
1097
+
1098
+ When merging selectors, `@extend` is smart enough
1099
+ to avoid unnecessary duplication,
1100
+ so something like `.seriousError.seriousError` gets translated to `.seriousError`.
1101
+ In addition, it won't produce selectors that can't match anything, like `#main#footer`.
931
1102
 
932
- Any number of mixins may be defined and there is no limit on
933
- the number that can be included in a particular selector.
1103
+ #### Extending Complex Selectors
934
1104
 
935
- Mixin definitions can also include references to other mixins.
1105
+ Class selectors aren't the only things that can be extended.
1106
+ It's possible to extend any selector involving only a single element,
1107
+ such as `.special.cool`, `a:hover`, or `a.user[href^="http://"]`.
936
1108
  For example:
937
1109
 
938
- =compound
939
- +highlighted-background
940
- +header-text
1110
+ .hoverlink {@extend a:hover}
941
1111
 
942
- =highlighted-background
943
- background:
944
- color: #fc0
945
- =header-text
946
- font:
947
- size: 20px
1112
+ Just like with classes, this means that all styles defined for `a:hover`
1113
+ are also applied to `.hoverlink`.
1114
+ For example:
948
1115
 
949
- Mixins that only define descendent selectors, can be safely mixed
950
- into the top most level of a document.
1116
+ .hoverlink {@extend a:hover}
1117
+ a:hover {text-decoration: underline}
1118
+
1119
+ is compiled to:
1120
+
1121
+ a:hover, .hoverlink {text-decoration: underline}
1122
+
1123
+ Just like with `.error.intrusion` above,
1124
+ any rule that uses `a:hover` will also work for `.hoverlink`,
1125
+ even if they have other selectors as well.
1126
+ For example:
1127
+
1128
+ .hoverlink {@extend a:hover}
1129
+ .comment a.user:hover {font-weight: bold}
1130
+
1131
+ is compiled to:
1132
+
1133
+ .comment a.user:hover, .comment .hoverlink.user {font-weight: bold}
1134
+
1135
+ #### Multiple Extends
1136
+
1137
+ A single selector can extend more than one selector.
1138
+ This means that it inherits the styles of all the extended selectors.
1139
+ For example:
1140
+
1141
+ .error {
1142
+ border: 1px #f00;
1143
+ background-color: #fdd;
1144
+ }
1145
+ .attention {
1146
+ font-size: 3em;
1147
+ background-color: #ff0;
1148
+ }
1149
+ .seriousError {
1150
+ @extend .error;
1151
+ @extend .attention;
1152
+ border-width: 3px;
1153
+ }
1154
+
1155
+ is compiled to:
1156
+
1157
+ .error, .seriousError {
1158
+ border: 1px #f00;
1159
+ background-color: #fdd; }
1160
+
1161
+ .attention, .seriousError {
1162
+ font-size: 3em;
1163
+ background-color: #ff0; }
1164
+
1165
+ .seriousError {
1166
+ border-width: 3px; }
1167
+
1168
+ In effect, everything with class `.seriousError`
1169
+ also has class `.error` *and* class `.attention`.
1170
+ Thus, the styles defined later in the document take precedence:
1171
+ `.seriousError` has background color `#ff0` rather than `#fdd`,
1172
+ since `.attention` is defined later than `.error`.
1173
+
1174
+ #### Chaining Extends
1175
+
1176
+ It's possible for one selector to extend another selector
1177
+ that in turn extends a third.
1178
+ For example:
1179
+
1180
+ .error {
1181
+ border: 1px #f00;
1182
+ background-color: #fdd;
1183
+ }
1184
+ .seriousError {
1185
+ @extend .error;
1186
+ border-width: 3px;
1187
+ }
1188
+ .criticalError {
1189
+ @extend .seriousError;
1190
+ position: fixed;
1191
+ top: 10%;
1192
+ bottom: 10%;
1193
+ left: 10%;
1194
+ right: 10%;
1195
+ }
1196
+
1197
+ Now everything with class `.seriousError` also has class `.error`,
1198
+ and everything with class `.criticalError` has class `.seriousError`
1199
+ *and* class `.error`.
1200
+ It's compiled to:
1201
+
1202
+ .error, .seriousError, .criticalError {
1203
+ border: 1px #f00;
1204
+ background-color: #fdd; }
1205
+
1206
+ .seriousError, .criticalError {
1207
+ border-width: 3px; }
1208
+
1209
+ .criticalError {
1210
+ position: fixed;
1211
+ top: 10%;
1212
+ bottom: 10%;
1213
+ left: 10%;
1214
+ right: 10%; }
1215
+
1216
+ #### Selector Sequences
951
1217
 
952
- ### Arguments
1218
+ Selector sequences, such as `.foo .bar` or `.foo + .bar`, currently can't be extended.
1219
+ However, it is possible for nested selectors themselves to use `@extend`.
1220
+ For example:
1221
+
1222
+ #fake-links .link {@extend a}
1223
+
1224
+ a {
1225
+ color: blue;
1226
+ &:hover {text-decoration: underline}
1227
+ }
953
1228
 
954
- Mixins can take arguments which can be used with SassScript:
1229
+ is compiled to
1230
+
1231
+ a, #fake-links .link {
1232
+ color: blue; }
1233
+ a:hover, #fake-links .link:hover {
1234
+ text-decoration: underline; }
1235
+
1236
+ ##### Merging Selector Sequences
1237
+
1238
+ Sometimes a selector sequence extends another selector that appears in another sequence.
1239
+ In this case, the two sequences need to be merged.
1240
+ For example:
955
1241
 
956
- =sexy-border(!color)
957
- border:
958
- color = !color
959
- width: 1in
960
- style: dashed
961
- p
962
- +sexy-border("blue")
1242
+ #admin .tabbar a {font-weight: bold}
1243
+ #demo .overview .fakelink {@extend a}
1244
+
1245
+ While it would technically be possible
1246
+ to generate all selectors that could possibly match either sequence,
1247
+ this would make the stylesheet far too large.
1248
+ The simple example above, for instance, would require ten selectors.
1249
+ Instead, Sass generates only selectors that are likely to be useful.
1250
+
1251
+ When the two sequences being merged have no selectors in common,
1252
+ then two new selectors are generated:
1253
+ one with the first sequence before the second,
1254
+ and one with the second sequence before the first.
1255
+ For example:
1256
+
1257
+ #admin .tabbar a {font-weight: bold}
1258
+ #demo .overview .fakelink {@extend a}
963
1259
 
964
1260
  is compiled to:
965
1261
 
1262
+ #admin .tabbar a,
1263
+ #admin .tabbar #demo .overview .fakelink,
1264
+ #demo .overview #admin .tabbar .fakelink {
1265
+ font-weight: bold; }
1266
+
1267
+ If the two sequences do share some selectors,
1268
+ then those selectors will be merged together
1269
+ and only the differences (if any still exist) will alternate.
1270
+ In this example, both sequences contain the id `#admin`,
1271
+ so the resulting selectors will merge those two ids:
1272
+
1273
+ #admin .tabbar a {font-weight: bold}
1274
+ #admin .overview .fakelink {@extend a}
1275
+
1276
+ This is compiled to:
1277
+
1278
+ #admin .tabbar a,
1279
+ #admin .tabbar .overview .fakelink,
1280
+ #admin .overview .tabbar .fakelink {
1281
+ font-weight: bold; }
1282
+
1283
+ ### `@debug`
1284
+
1285
+ The `@debug` directive prints the value of a SassScript expression
1286
+ to the standard error output stream.
1287
+ It's useful for debugging Sass files
1288
+ that have complicated SassScript going on.
1289
+ For example:
1290
+
1291
+ @debug 10em + 12em;
1292
+
1293
+ outputs:
1294
+
1295
+ Line 1 DEBUG: 22em
1296
+
1297
+ ### `@warn`
1298
+
1299
+ The `@warn` directive prints the value of a SassScript expression
1300
+ to the standard error output stream.
1301
+ It's useful for libraries that need to warn users of deprecations
1302
+ or recovering from minor mixin usage mistakes.
1303
+ There are two major distinctions between `@warn` and `@debug`:
1304
+
1305
+ 1. You can turn warnings off with the `--quiet` command-line option
1306
+ or the `:quiet` Sass option.
1307
+ 2. A stylesheet trace will be printed out along with the message
1308
+ so that the user being warned can see where their styles caused the warning.
1309
+
1310
+ Usage Example:
1311
+
1312
+ @mixin adjust-location($x, $y) {
1313
+ @if unitless($x) {
1314
+ @warn "Assuming #{$x} to be in pixels";
1315
+ $x: 1px * $x;
1316
+ }
1317
+ @if unitless($y) {
1318
+ @warn "Assuming #{$y} to be in pixels";
1319
+ $y: 1px * $y;
1320
+ }
1321
+ position: relative; left: $x; top: $y;
1322
+ }
1323
+
1324
+ ## Control Directives
1325
+
1326
+ SassScript supports basic control directives
1327
+ for including styles only under some conditions
1328
+ or including the same style several times with variations.
1329
+
1330
+ **Note that control directives are an advanced feature,
1331
+ and are not recommended in the course of day-to-day styling**.
1332
+ They exist mainly for use in [mixins](#mixins),
1333
+ particularly those that are part of libraries like [Compass](http://compass-style.org),
1334
+ and so require substantial flexibility.
1335
+
1336
+ ### `@if`
1337
+
1338
+ The `@if` directive takes a SassScript expression
1339
+ and uses the styles nested beneath it if the expression returns
1340
+ anything other than `false`:
1341
+
966
1342
  p {
967
- border-color: #0000ff;
968
- border-width: 1in;
969
- border-style: dashed; }
1343
+ @if 1 + 1 == 2 { border: 1px solid; }
1344
+ @if 5 < 3 { border: 2px dotted; }
1345
+ }
970
1346
 
971
- Mixins can also specify default values for their arguments:
1347
+ is compiled to:
972
1348
 
973
- =sexy-border(!color, !width = 1in)
974
- border:
975
- color = !color
976
- width = !width
977
- style: dashed
978
- p
979
- +sexy-border("blue")
1349
+ p {
1350
+ border: 1px solid; }
1351
+
1352
+ The `@if` statement can be followed by several `@else if` statements
1353
+ and one `@else` statement.
1354
+ If the `@if` statement fails,
1355
+ the `@else if` statements are tried in order
1356
+ until one succeeds or the `@else` is reached.
1357
+ For example:
1358
+
1359
+ $type: monster;
1360
+ p {
1361
+ @if $type == ocean {
1362
+ color: blue;
1363
+ } @else if $type == matador {
1364
+ color: red;
1365
+ } @else if $type == monster {
1366
+ color: green;
1367
+ } @else {
1368
+ color: black;
1369
+ }
1370
+ }
980
1371
 
981
1372
  is compiled to:
982
1373
 
983
1374
  p {
984
- border-color: #0000ff;
985
- border-width: 1in;
986
- border-style: dashed; }
1375
+ color: green; }
1376
+
1377
+ ### `@for`
1378
+
1379
+ The `@for` directive has two forms:
1380
+ `@for $var from <start> to <end>` or
1381
+ `@for $var from <start> through <end>`.
1382
+ `$var` can be any variable name, like `$i`,
1383
+ and `<start>` and `<end>` are SassScript expressions
1384
+ that should return integers.
1385
+
1386
+ The `@for` statement sets `$var` to each number
1387
+ from `<start>` to `<end>`,
1388
+ including `<end>` if `through` is used.
1389
+ Then it outputs the nested styles
1390
+ using that value of `$var`.
1391
+ For example:
1392
+
1393
+ @for $i from 1 through 3 {
1394
+ .item-#{$i} { width: 2em * $i; }
1395
+ }
1396
+
1397
+ is compiled to:
987
1398
 
988
- ## Comments
1399
+ .item-1 {
1400
+ width: 2em; }
1401
+ .item-2 {
1402
+ width: 4em; }
1403
+ .item-3 {
1404
+ width: 6em; }
1405
+
1406
+ ### `@while`
1407
+
1408
+ The `@while` directive takes a SassScript expression
1409
+ and repeatedly outputs the nested styles
1410
+ until the statement evaluates to `false`.
1411
+ This can be used to achieve more complex looping
1412
+ than the `@for` statement is capable of,
1413
+ although this is rarely necessary.
1414
+ For example:
1415
+
1416
+ $i: 6;
1417
+ @while $i > 0 {
1418
+ .item-#{$i} { width: 2em * $i; }
1419
+ $i: $i - 2;
1420
+ }
1421
+
1422
+ is compiled to:
1423
+
1424
+ .item-6 {
1425
+ width: 12em; }
1426
+
1427
+ .item-4 {
1428
+ width: 8em; }
989
1429
 
990
- Sass supports two sorts of comments:
991
- those that show up in the CSS output
992
- and those that don't.
1430
+ .item-2 {
1431
+ width: 4em; }
993
1432
 
994
- ### CSS Comments: `/*`
1433
+ ## Mixin Directives {#mixins}
1434
+
1435
+ Mixins allow you to define styles
1436
+ that can be re-used throughout the stylesheet
1437
+ without needing to resort to non-semantic classes like `.float-left`.
1438
+ Mixins can also contain full CSS rules,
1439
+ and anything else allowed elsewhere in a Sass document.
1440
+ They can even take [arguments](#mixin-arguments)
1441
+ which allows you to produce a wide variety of styles
1442
+ with very few mixins.
1443
+
1444
+ ### Defining a Mixin: `@mixin` {#defining_a_mixin}
1445
+
1446
+ Mixins are defined with the `@mixin` directive.
1447
+ It's followed by the name of the mixin
1448
+ and optionally the [arguments](#mixin-arguments),
1449
+ and a block containing the contents of the mixin.
1450
+ For example, the `large-text` mixin is defined as follows:
1451
+
1452
+ @mixin large-text {
1453
+ font: {
1454
+ family: Arial;
1455
+ size: 20px;
1456
+ weight: bold;
1457
+ }
1458
+ color: #ff0000;
1459
+ }
995
1460
 
996
- "Loud" comments are just as easy as silent ones.
997
- These comments output to the document as CSS comments,
998
- and thus use the same opening sequence: `/*`.
1461
+ Mixins may also contain selectors,
1462
+ possibly mixed with properties.
1463
+ The selectors can even contain [parent references](#referencing_parent_selectors_).
999
1464
  For example:
1000
1465
 
1001
- /* A very awesome rule.
1002
- #awesome.rule
1003
- /* An equally awesome property.
1004
- awesomeness: very
1005
-
1006
- becomes
1007
-
1008
- /* A very awesome rule. */
1009
- #awesome.rule {
1010
- /* An equally awesome property. */
1011
- awesomeness: very; }
1012
-
1013
- You can also nest content beneath loud comments. For example:
1014
-
1015
- #pbj
1016
- /* This rule describes
1017
- the styling of the element
1018
- that represents
1019
- a peanut butter and jelly sandwich.
1020
- background-image: url(/images/pbj.png)
1021
- color: red
1022
-
1023
- becomes
1024
-
1025
- #pbj {
1026
- /* This rule describes
1027
- * the styling of the element
1028
- * that represents
1029
- * a peanut butter and jelly sandwich. */
1030
- background-image: url(/images/pbj.png);
1031
- color: red; }
1032
-
1033
- ### Sass Comments: `//`
1034
-
1035
- It's simple to add "silent" comments,
1036
- which don't output anything to the CSS document,
1037
- to a Sass document.
1038
- Simply use the familiar C-style notation for a one-line comment, `//`,
1039
- at the normal indentation level and all text following it won't be output.
1466
+ @mixin clearfix {
1467
+ display: inline-block;
1468
+ &:after {
1469
+ content: ".";
1470
+ display: block;
1471
+ height: 0;
1472
+ clear: both;
1473
+ visibility: hidden;
1474
+ }
1475
+ * html & { height: 1px }
1476
+ }
1477
+
1478
+ ### Including a Mixin: `@include` {#including_a_mixin}
1479
+
1480
+ Mixins are included in the document
1481
+ with the `@include` directive.
1482
+ This takes the name of a mixin
1483
+ and optionally [arguments to pass to it](#mixin-arguments),
1484
+ and includes the styles defined by that mixin
1485
+ into the current rule.
1040
1486
  For example:
1041
1487
 
1042
- // A very awesome rule.
1043
- #awesome.rule
1044
- // An equally awesome property.
1045
- awesomeness: very
1488
+ .page-title {
1489
+ @include large-text;
1490
+ padding: 4px;
1491
+ margin-top: 10px;
1492
+ }
1046
1493
 
1047
- becomes
1494
+ is compiled to:
1048
1495
 
1049
- #awesome.rule {
1050
- awesomeness: very; }
1496
+ .page-title {
1497
+ font-family: Arial;
1498
+ font-size: 20px;
1499
+ font-weight: bold;
1500
+ color: #ff0000;
1501
+ padding: 4px;
1502
+ margin-top: 10px; }
1051
1503
 
1052
- You can also nest text beneath a comment to comment out a whole block.
1504
+ Mixins may also be included outside of any rule
1505
+ (that is, at the root of the document)
1506
+ as long as they don't directly define any properties
1507
+ or use any parent references.
1053
1508
  For example:
1054
1509
 
1055
- // A very awesome rule
1056
- #awesome.rule
1057
- // Don't use these properties
1058
- color: green
1059
- font-size: 10em
1060
- color: red
1510
+ @mixin silly-links {
1511
+ a {
1512
+ color: blue;
1513
+ background-color: red;
1514
+ }
1515
+ }
1516
+
1517
+ @include silly-links;
1518
+
1519
+ is compiled to:
1520
+
1521
+ a {
1522
+ color: blue;
1523
+ background-color: red; }
1524
+
1525
+ Mixin definitions can also include other mixins.
1526
+ For example:
1527
+
1528
+ @mixin compound {
1529
+ @include highlighted-background;
1530
+ @include header-text;
1531
+ }
1061
1532
 
1062
- becomes
1533
+ @mixin highlighted-background { background-color: #fc0; }
1534
+ @mixin header-text { font-size: 20px; }
1535
+
1536
+ Mixins that only define descendent selectors, can be safely mixed
1537
+ into the top most level of a document.
1538
+
1539
+ ### Arguments {#mixin-arguments}
1540
+
1541
+ Mixins can take arguments SassScript values as arguments,
1542
+ which are given when the mixin is included
1543
+ and made available within the mixin as variables.
1544
+
1545
+ When defining a mixin,
1546
+ the arguments are written as variable names separated by commas,
1547
+ all in parentheses after the name.
1548
+ Then when including the mixin,
1549
+ values can be passed in in the same manner.
1550
+ For example:
1551
+
1552
+ @mixin sexy-border($color, $width) {
1553
+ border: {
1554
+ color: $color;
1555
+ width: $width;
1556
+ style: dashed;
1557
+ }
1558
+ }
1063
1559
 
1064
- #awesome.rule {
1065
- color: red; }
1560
+ p { @include sexy-border(blue, 1in); }
1561
+
1562
+ is compiled to:
1563
+
1564
+ p {
1565
+ border-color: blue;
1566
+ border-width: 1in;
1567
+ border-style: dashed; }
1568
+
1569
+ Mixins can also specify default values for their arguments
1570
+ using the normal variable-setting syntax.
1571
+ Then when the mixin is included,
1572
+ if it doesn't pass in that argument,
1573
+ the default value will be used instead.
1574
+ For example:
1575
+
1576
+ @mixin sexy-border($color, $width: 1in) {
1577
+ border: {
1578
+ color: $color;
1579
+ width: $width;
1580
+ style: dashed;
1581
+ }
1582
+ }
1583
+ p { @include sexy-border(blue); }
1584
+ h1 { @include sexy-border(blue, 2in); }
1585
+
1586
+ is compiled to:
1587
+
1588
+ p {
1589
+ border-color: blue;
1590
+ border-width: 1in;
1591
+ border-style: dashed; }
1592
+
1593
+ h1 {
1594
+ border-color: blue;
1595
+ border-width: 2in;
1596
+ border-style: dashed; }
1066
1597
 
1067
1598
  ## Output Style
1068
1599
 
1069
- Although the default CSS style that Sass outputs is very nice,
1070
- and reflects the structure of the document in a similar way that Sass does,
1071
- sometimes it's good to have other formats available.
1600
+ Although the default CSS style that Sass outputs is very nice
1601
+ and reflects the structure of the document,
1602
+ tastes and needs vary and so Sass supports several other styles.
1072
1603
 
1073
1604
  Sass allows you to choose between four different output styles
1074
- by setting the `:style` option.
1075
- In Rack, Rails, and Merb, this is done by setting `Sass::Plugin.options[:style]`;
1076
- otherwise, it's done by passing an options hash with `:style` set.
1605
+ by setting the [`:style` option](#style-option)
1606
+ or using the `--style` command-line flag.
1077
1607
 
1078
1608
  ### `:nested`
1079
1609
 
1080
1610
  Nested style is the default Sass style,
1081
- because it reflects the structure of the document
1082
- in much the same way Sass does.
1611
+ because it reflects the structure of the CSS styles
1612
+ and the HTML document they're styling.
1083
1613
  Each property has its own line,
1084
1614
  but the indentation isn't constant.
1085
1615
  Each rule is indented based on how deeply it's nested.
@@ -1096,14 +1626,13 @@ For example:
1096
1626
  font-weight: bold;
1097
1627
  text-decoration: underline; }
1098
1628
 
1099
- Nested style is very useful when looking at large CSS files
1100
- for the same reason Sass is useful for making them:
1101
- it allows you to very easily grasp the structure of the file
1629
+ Nested style is very useful when looking at large CSS files:
1630
+ it allows you to easily grasp the structure of the file
1102
1631
  without actually reading anything.
1103
1632
 
1104
1633
  ### `:expanded`
1105
1634
 
1106
- Expanded is the typical human-made CSS style,
1635
+ Expanded is a more typical human-made CSS style,
1107
1636
  with each property and rule taking up one line.
1108
1637
  Properties are indented within the rules,
1109
1638
  but the rules aren't indented in any special way.
@@ -1125,13 +1654,12 @@ For example:
1125
1654
 
1126
1655
  ### `:compact`
1127
1656
 
1128
- Compact style, as the name would imply,
1129
- takes up less space than Nested or Expanded.
1130
- However, it's also harder to read.
1657
+ Compact style takes up less space than Nested or Expanded.
1658
+ It also draws the focus more to the selectors than to their properties.
1131
1659
  Each CSS rule takes up only one line,
1132
1660
  with every property defined on that line.
1133
1661
  Nested rules are placed next to each other with no newline,
1134
- while groups of rules have newlines between them.
1662
+ while separate groups of rules have newlines between them.
1135
1663
  For example:
1136
1664
 
1137
1665
  #main { color: #fff; background-color: #000; }
@@ -1144,6 +1672,8 @@ For example:
1144
1672
  Compressed style takes up the minimum amount of space possible,
1145
1673
  having no whitespace except that necessary to separate selectors
1146
1674
  and a newline at the end of the file.
1675
+ It also includes some other minor compressions,
1676
+ such as choosing the smallest representation for colors.
1147
1677
  It's not meant to be human-readable.
1148
1678
  For example:
1149
1679