radiant 1.0.0.rc1 → 1.0.0.rc2

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 (623) hide show
  1. data/app/controllers/admin/resource_controller.rb +1 -0
  2. data/app/controllers/application_controller.rb +1 -1
  3. data/app/models/deprecated_tags.rb +5 -48
  4. data/app/models/user_action_observer.rb +8 -2
  5. data/app/views/layouts/application.html.haml +1 -1
  6. data/config/boot.rb +2 -2
  7. data/config/environment.rb +5 -3
  8. data/config/initializers/compass.rb +5 -0
  9. data/config/locales/en.yml +2 -2
  10. data/features/step_definitions/admin/pages_management_steps.rb +6 -1
  11. data/features/support/paths.rb +13 -0
  12. data/lib/generators/extension/templates/cucumber_env.rb +5 -1
  13. data/lib/generators/extension/templates/cucumber_paths.rb +20 -12
  14. data/lib/generators/extension/templates/gemspec.rb +10 -5
  15. data/lib/generators/instance/templates/instance_environment.rb +4 -2
  16. data/lib/radiant.rb +1 -1
  17. data/lib/radiant/gem_dependency_fix.rb +1 -1
  18. data/lib/radiant/taggable.rb +42 -3
  19. data/lib/tasks/framework.rake +6 -6
  20. data/{vendor/plugins/haml/test/sass/results/warn.css → log/.keep} +0 -0
  21. data/radiant.gemspec +3 -2
  22. data/script/console +2 -2
  23. data/spec/controllers/admin/pages_controller_spec.rb +1 -1
  24. data/spec/lib/radiant/taggable_spec.rb +53 -0
  25. data/vendor/extensions/archive/Rakefile +3 -3
  26. data/vendor/extensions/archive/features/support/env.rb +5 -1
  27. data/vendor/extensions/archive/features/support/paths.rb +20 -12
  28. data/vendor/extensions/archive/radiant-archive-extension.gemspec +10 -5
  29. data/vendor/extensions/archive/tmp/cache/meta/0e/da69d02186242cdfda62e46044566f2bc50f3a +0 -0
  30. data/vendor/extensions/{assets → clipped}/LICENSE +0 -0
  31. data/vendor/extensions/{assets → clipped}/README.md +21 -21
  32. data/vendor/extensions/{assets → clipped}/Rakefile +29 -31
  33. data/vendor/extensions/{assets → clipped}/app/controllers/admin/assets_controller.rb +16 -11
  34. data/vendor/extensions/clipped/app/controllers/admin/page_attachments_controller.rb +18 -0
  35. data/vendor/extensions/clipped/app/helpers/admin/assets_helper.rb +16 -0
  36. data/vendor/extensions/{assets → clipped}/app/models/asset.rb +12 -9
  37. data/vendor/extensions/{assets → clipped}/app/models/asset_tags.rb +36 -53
  38. data/vendor/extensions/{assets → clipped}/app/models/asset_type.rb +1 -7
  39. data/vendor/extensions/{assets → clipped}/app/models/old_page_attachment.rb +0 -0
  40. data/vendor/extensions/clipped/app/models/page_attachment.rb +21 -0
  41. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/_asset.html.haml +2 -2
  42. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/_asset_table.html.haml +4 -4
  43. data/vendor/extensions/clipped/app/views/admin/assets/_errors.html.haml +3 -0
  44. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/_form.html.haml +2 -2
  45. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/_page_assets.html.haml +1 -1
  46. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/_search.html.haml +0 -0
  47. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/_search_results.html.haml +1 -1
  48. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/edit.html.haml +7 -8
  49. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/index.html.haml +3 -2
  50. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/new.html.haml +2 -2
  51. data/vendor/extensions/clipped/app/views/admin/assets/refresh.html.haml +14 -0
  52. data/vendor/extensions/{assets → clipped}/app/views/admin/assets/remove.html.haml +3 -3
  53. data/vendor/extensions/{assets → clipped}/app/views/admin/configuration/_edit.html.haml +1 -1
  54. data/vendor/extensions/{assets → clipped}/app/views/admin/configuration/_show.html.haml +1 -1
  55. data/vendor/extensions/clipped/app/views/admin/page_attachments/_attachment.html.haml +25 -0
  56. data/vendor/extensions/{assets → clipped}/app/views/admin/page_parts/_page_part.html.haml +3 -2
  57. data/vendor/extensions/{assets → clipped}/app/views/admin/pages/_asset_popups.html.haml +7 -7
  58. data/vendor/extensions/clipped/app/views/admin/pages/_assets.html.haml +11 -0
  59. data/vendor/extensions/{assets → clipped}/app/views/admin/removed/_assets_bucket.html.haml +1 -1
  60. data/vendor/extensions/{assets → clipped}/app/views/admin/removed/_assets_container.html.haml +9 -9
  61. data/vendor/extensions/{assets → clipped}/app/views/admin/removed/_bucket.html.haml +1 -1
  62. data/vendor/extensions/{assets → clipped}/app/views/admin/removed/_bucket_asset.html.haml +2 -2
  63. data/vendor/extensions/clipped/app/views/admin/removed/_show_bucket_link.html.haml +4 -0
  64. data/vendor/extensions/{assets → clipped}/app/views/admin/removed/_upload_to_page.html.haml +2 -2
  65. data/vendor/extensions/{assets → clipped}/app/views/admin/removed/bucket/_iframe.html.haml +0 -0
  66. data/vendor/extensions/{assets → clipped}/artwork/icons.png +0 -0
  67. data/vendor/extensions/{assets/assets_extension.rb → clipped/clipped_extension.rb} +10 -10
  68. data/vendor/extensions/{assets → clipped}/config/initializers/interpolation.rb +0 -0
  69. data/vendor/extensions/clipped/config/initializers/processors.rb +12 -0
  70. data/vendor/extensions/{assets → clipped}/config/initializers/radiant_config.rb +5 -4
  71. data/vendor/extensions/{assets → clipped}/config/locales/en.yml +6 -3
  72. data/vendor/extensions/{assets → clipped}/config/locales/nl.yml +1 -1
  73. data/vendor/extensions/{assets → clipped}/config/routes.rb +2 -2
  74. data/vendor/extensions/clipped/cucumber.yml +1 -0
  75. data/vendor/extensions/{assets → clipped}/db/migrate/001_create_assets.rb +0 -0
  76. data/vendor/extensions/{assets → clipped}/db/migrate/002_create_paperclip_attributes.rb +0 -0
  77. data/vendor/extensions/{assets → clipped}/db/migrate/003_create_user_observer.rb +0 -0
  78. data/vendor/extensions/{assets → clipped}/db/migrate/004_create_page_attachments.rb +0 -0
  79. data/vendor/extensions/{assets → clipped}/db/migrate/005_rename_users.rb +0 -0
  80. data/vendor/extensions/{assets → clipped}/db/migrate/20090316132151_disable_file_types.rb +0 -0
  81. data/vendor/extensions/{assets → clipped}/db/migrate/20110513205050_asset_uuid.rb +0 -0
  82. data/vendor/extensions/clipped/features/support/env.rb +11 -0
  83. data/vendor/extensions/clipped/features/support/paths.rb +22 -0
  84. data/vendor/extensions/{assets/lib/assets_admin_ui.rb → clipped/lib/clipped_admin_ui.rb} +1 -1
  85. data/vendor/extensions/{assets → clipped}/lib/page_asset_associations.rb +1 -1
  86. data/vendor/extensions/{assets → clipped}/lib/paperclip/frame_grab.rb +0 -0
  87. data/vendor/extensions/clipped/lib/radiant-clipped-extension.rb +2 -0
  88. data/vendor/extensions/clipped/lib/radiant-clipped-extension/version.rb +3 -0
  89. data/vendor/extensions/{assets/lib/tasks/assets_extension_tasks.rake → clipped/lib/tasks/clipped_extension_tasks.rake} +22 -16
  90. data/vendor/extensions/{assets → clipped}/lib/tasks/paperclip_tasks.rake +0 -0
  91. data/{public → vendor/extensions/clipped/public}/flash/ZeroClipboard.swf +0 -0
  92. data/{public → vendor/extensions/clipped/public}/images/admin/assets/add.png +0 -0
  93. data/{public → vendor/extensions/clipped/public}/images/admin/assets/archive_icon.png +0 -0
  94. data/{public → vendor/extensions/clipped/public}/images/admin/assets/audio_icon.png +0 -0
  95. data/{public → vendor/extensions/clipped/public}/images/admin/assets/audio_thumbnail.png +0 -0
  96. data/{public → vendor/extensions/clipped/public}/images/admin/assets/c_icon.png +0 -0
  97. data/{public → vendor/extensions/clipped/public}/images/admin/assets/copy.png +0 -0
  98. data/{public → vendor/extensions/clipped/public}/images/admin/assets/css_icon.png +0 -0
  99. data/{public → vendor/extensions/clipped/public}/images/admin/assets/database_icon.png +0 -0
  100. data/{public → vendor/extensions/clipped/public}/images/admin/assets/delete.png +0 -0
  101. data/{public → vendor/extensions/clipped/public}/images/admin/assets/document_icon.png +0 -0
  102. data/{public → vendor/extensions/clipped/public}/images/admin/assets/document_thumbnail.png +0 -0
  103. data/{public → vendor/extensions/clipped/public}/images/admin/assets/flash_icon.png +0 -0
  104. data/{public → vendor/extensions/clipped/public}/images/admin/assets/flash_thumbnail.png +0 -0
  105. data/{public → vendor/extensions/clipped/public}/images/admin/assets/font_icon.png +0 -0
  106. data/{public → vendor/extensions/clipped/public}/images/admin/assets/gzip_icon.png +0 -0
  107. data/{public → vendor/extensions/clipped/public}/images/admin/assets/html_icon.png +0 -0
  108. data/{public → vendor/extensions/clipped/public}/images/admin/assets/image_icon.png +0 -0
  109. data/{public → vendor/extensions/clipped/public}/images/admin/assets/image_thumbnail.png +0 -0
  110. data/{public → vendor/extensions/clipped/public}/images/admin/assets/java_icon.png +0 -0
  111. data/{public → vendor/extensions/clipped/public}/images/admin/assets/page_edit.png +0 -0
  112. data/{public → vendor/extensions/clipped/public}/images/admin/assets/perl_icon.png +0 -0
  113. data/{public → vendor/extensions/clipped/public}/images/admin/assets/php_icon.png +0 -0
  114. data/{public → vendor/extensions/clipped/public}/images/admin/assets/presentation_icon.png +0 -0
  115. data/{public → vendor/extensions/clipped/public}/images/admin/assets/python_icon.png +0 -0
  116. data/{public → vendor/extensions/clipped/public}/images/admin/assets/reorder_assets.png +0 -0
  117. data/{public → vendor/extensions/clipped/public}/images/admin/assets/ruby_icon.png +0 -0
  118. data/{public → vendor/extensions/clipped/public}/images/admin/assets/script_icon.png +0 -0
  119. data/{public → vendor/extensions/clipped/public}/images/admin/assets/spreadsheet_icon.png +0 -0
  120. data/{public → vendor/extensions/clipped/public}/images/admin/assets/tar_icon.png +0 -0
  121. data/{public → vendor/extensions/clipped/public}/images/admin/assets/unknown_icon.png +0 -0
  122. data/{public → vendor/extensions/clipped/public}/images/admin/assets/unknown_thumbnail.png +0 -0
  123. data/{public → vendor/extensions/clipped/public}/images/admin/assets/video_icon.png +0 -0
  124. data/{public → vendor/extensions/clipped/public}/images/admin/assets/video_thumbnail.png +0 -0
  125. data/{public → vendor/extensions/clipped/public}/images/admin/assets/xml_icon.png +0 -0
  126. data/{public → vendor/extensions/clipped/public}/images/admin/assets/zip_icon.png +0 -0
  127. data/vendor/extensions/{assets → clipped}/public/javascripts/admin/assets.js +66 -8
  128. data/vendor/extensions/{assets → clipped}/public/stylesheets/sass/admin/assets.sass +12 -6
  129. data/vendor/extensions/clipped/radiant-clipped-extension.gemspec +33 -0
  130. data/vendor/extensions/{assets → clipped}/spec/controllers/admin/assets_controller_spec.rb +0 -0
  131. data/vendor/extensions/clipped/spec/controllers/admin/page_attachments_controller_spec.rb +50 -0
  132. data/vendor/extensions/{assets → clipped}/spec/datasets/assets_dataset.rb +2 -1
  133. data/vendor/extensions/{assets/spec/lib/tag_deprecation_spec.rb → clipped/spec/lib/asset_tags_spec.rb} +3 -15
  134. data/vendor/extensions/{assets → clipped}/spec/models/asset_spec.rb +3 -2
  135. data/vendor/extensions/{assets → clipped}/spec/models/asset_type_spec.rb +0 -0
  136. data/vendor/extensions/{assets → clipped}/spec/spec.opts +0 -0
  137. data/vendor/extensions/{assets → clipped}/spec/spec_helper.rb +0 -0
  138. data/vendor/extensions/{assets → clipped}/wireframes/edit-page-assets-2.bmml +0 -0
  139. data/vendor/extensions/{assets → clipped}/wireframes/edit-page-assets-2.png +0 -0
  140. data/vendor/extensions/{assets → clipped}/wireframes/edit-page-assets-3.bmml +0 -0
  141. data/vendor/extensions/{assets → clipped}/wireframes/edit-page-assets-3.png +0 -0
  142. data/vendor/extensions/{assets → clipped}/wireframes/edit-page-assets.bmml +0 -0
  143. data/vendor/extensions/{assets → clipped}/wireframes/edit-page-assets.png +0 -0
  144. data/vendor/extensions/{assets → clipped}/wireframes/edit-page.bmml +0 -0
  145. data/vendor/extensions/{assets → clipped}/wireframes/edit-page.png +0 -0
  146. data/vendor/extensions/sheets/Rakefile +30 -18
  147. data/vendor/extensions/sheets/app/controllers/admin/sheet_resource_controller.rb +1 -1
  148. data/vendor/extensions/sheets/app/models/sheet.rb +4 -0
  149. data/vendor/extensions/sheets/app/views/admin/scripts/index.html.haml +9 -5
  150. data/vendor/extensions/sheets/app/views/admin/styles/index.html.haml +1 -1
  151. data/vendor/extensions/sheets/config/locales/en.yml +3 -1
  152. data/vendor/extensions/sheets/features/admin/managing_javascripts.feature +65 -0
  153. data/vendor/extensions/sheets/features/admin/managing_stylesheets.feature +65 -0
  154. data/vendor/extensions/sheets/features/support/env.rb +2 -7
  155. data/vendor/extensions/sheets/features/support/paths.rb +9 -12
  156. data/vendor/extensions/sheets/lib/radiant-sheets-extension/version.rb +1 -1
  157. data/vendor/extensions/sheets/radiant-sheets-extension.gemspec +9 -4
  158. data/vendor/extensions/sheets/spec/datasets/javascripts_dataset.rb +3 -1
  159. data/vendor/extensions/sheets/spec/datasets/stylesheets_dataset.rb +3 -1
  160. data/vendor/extensions/sheets/spec/lib/javascript_tags_spec.rb +4 -4
  161. data/vendor/extensions/sheets/spec/lib/stylesheet_tags_spec.rb +4 -4
  162. metadata +189 -599
  163. data/Gemfile +0 -3
  164. data/lib/generators/extension/templates/cucumber_datasets_loader.rb +0 -3
  165. data/public/assets/1/2375_1115822414591_1197894784_30347214_1109_n.jpg +0 -0
  166. data/public/assets/1/2375_1115822414591_1197894784_30347214_1109_n_icon.png +0 -0
  167. data/public/assets/1/2375_1115822414591_1197894784_30347214_1109_n_normal.jpg +0 -0
  168. data/public/assets/1/2375_1115822414591_1197894784_30347214_1109_n_thumbnail.png +0 -0
  169. data/public/images/roasters/banner.jpg +0 -0
  170. data/public/images/roasters/closelabel.gif +0 -0
  171. data/public/images/roasters/comment.png +0 -0
  172. data/public/images/roasters/gallery1.jpg +0 -0
  173. data/public/images/roasters/gallery2.jpg +0 -0
  174. data/public/images/roasters/gallery3.jpg +0 -0
  175. data/public/images/roasters/gallery4.jpg +0 -0
  176. data/public/images/roasters/gift.gif +0 -0
  177. data/public/images/roasters/green.gif +0 -0
  178. data/public/images/roasters/nav-background.gif +0 -0
  179. data/public/images/roasters/nav-divider.gif +0 -0
  180. data/public/images/roasters/nextlabel.gif +0 -0
  181. data/public/images/roasters/open.gif +0 -0
  182. data/public/images/roasters/preview-1.jpg +0 -0
  183. data/public/images/roasters/preview.jpg +0 -0
  184. data/public/images/roasters/prevlabel.gif +0 -0
  185. data/public/images/roasters/prize.gif +0 -0
  186. data/public/images/roasters/recycle.gif +0 -0
  187. data/public/images/roasters/rss.gif +0 -0
  188. data/public/images/roasters/thumb-grinder.jpg +0 -0
  189. data/public/images/roasters/thumb-grower.jpg +0 -0
  190. data/public/images/roasters/thumb-roaster.jpg +0 -0
  191. data/public/images/roasters/truck.gif +0 -0
  192. data/vendor/extensions/assets/HELP_admin.markdown +0 -69
  193. data/vendor/extensions/assets/VERSION +0 -1
  194. data/vendor/extensions/assets/app/controllers/admin/page_attachments_controller.rb +0 -45
  195. data/vendor/extensions/assets/app/helpers/admin/assets_helper.rb +0 -11
  196. data/vendor/extensions/assets/app/models/page_attachment.rb +0 -14
  197. data/vendor/extensions/assets/app/views/admin/assets/_errors.html.haml +0 -3
  198. data/vendor/extensions/assets/app/views/admin/page_attachments/_attachment.html.haml +0 -22
  199. data/vendor/extensions/assets/app/views/admin/page_attachments/_new_attachment.html.haml +0 -18
  200. data/vendor/extensions/assets/app/views/admin/pages/_assets.html.haml +0 -13
  201. data/vendor/extensions/assets/app/views/admin/removed/_show_bucket_link.html.haml +0 -4
  202. data/vendor/extensions/assets/lib/tag_deprecation.rb +0 -73
  203. data/vendor/extensions/assets/public/flash/ZeroClipboard.swf +0 -0
  204. data/vendor/extensions/assets/public/images/admin/assets/add.png +0 -0
  205. data/vendor/extensions/assets/public/images/admin/assets/archive_icon.png +0 -0
  206. data/vendor/extensions/assets/public/images/admin/assets/audio_icon.png +0 -0
  207. data/vendor/extensions/assets/public/images/admin/assets/audio_thumbnail.png +0 -0
  208. data/vendor/extensions/assets/public/images/admin/assets/c_icon.png +0 -0
  209. data/vendor/extensions/assets/public/images/admin/assets/copy.png +0 -0
  210. data/vendor/extensions/assets/public/images/admin/assets/css_icon.png +0 -0
  211. data/vendor/extensions/assets/public/images/admin/assets/database_icon.png +0 -0
  212. data/vendor/extensions/assets/public/images/admin/assets/delete.png +0 -0
  213. data/vendor/extensions/assets/public/images/admin/assets/document_icon.png +0 -0
  214. data/vendor/extensions/assets/public/images/admin/assets/document_thumbnail.png +0 -0
  215. data/vendor/extensions/assets/public/images/admin/assets/flash_icon.png +0 -0
  216. data/vendor/extensions/assets/public/images/admin/assets/flash_thumbnail.png +0 -0
  217. data/vendor/extensions/assets/public/images/admin/assets/font_icon.png +0 -0
  218. data/vendor/extensions/assets/public/images/admin/assets/gzip_icon.png +0 -0
  219. data/vendor/extensions/assets/public/images/admin/assets/html_icon.png +0 -0
  220. data/vendor/extensions/assets/public/images/admin/assets/image_icon.png +0 -0
  221. data/vendor/extensions/assets/public/images/admin/assets/image_thumbnail.png +0 -0
  222. data/vendor/extensions/assets/public/images/admin/assets/java_icon.png +0 -0
  223. data/vendor/extensions/assets/public/images/admin/assets/page_edit.png +0 -0
  224. data/vendor/extensions/assets/public/images/admin/assets/perl_icon.png +0 -0
  225. data/vendor/extensions/assets/public/images/admin/assets/php_icon.png +0 -0
  226. data/vendor/extensions/assets/public/images/admin/assets/presentation_icon.png +0 -0
  227. data/vendor/extensions/assets/public/images/admin/assets/python_icon.png +0 -0
  228. data/vendor/extensions/assets/public/images/admin/assets/reorder_assets.png +0 -0
  229. data/vendor/extensions/assets/public/images/admin/assets/ruby_icon.png +0 -0
  230. data/vendor/extensions/assets/public/images/admin/assets/script_icon.png +0 -0
  231. data/vendor/extensions/assets/public/images/admin/assets/spreadsheet_icon.png +0 -0
  232. data/vendor/extensions/assets/public/images/admin/assets/tar_icon.png +0 -0
  233. data/vendor/extensions/assets/public/images/admin/assets/unknown_icon.png +0 -0
  234. data/vendor/extensions/assets/public/images/admin/assets/unknown_thumbnail.png +0 -0
  235. data/vendor/extensions/assets/public/images/admin/assets/video_icon.png +0 -0
  236. data/vendor/extensions/assets/public/images/admin/assets/video_thumbnail.png +0 -0
  237. data/vendor/extensions/assets/public/images/admin/assets/xml_icon.png +0 -0
  238. data/vendor/extensions/assets/public/images/admin/assets/zip_icon.png +0 -0
  239. data/vendor/extensions/assets/spec/controllers/admin/page_attachment_controller_spec.rb +0 -51
  240. data/vendor/extensions/assets/spec/lib/asset_tags_spec.rb +0 -9
  241. data/vendor/plugins/haml/CONTRIBUTING +0 -4
  242. data/vendor/plugins/haml/MIT-LICENSE +0 -20
  243. data/vendor/plugins/haml/README.md +0 -298
  244. data/vendor/plugins/haml/Rakefile +0 -436
  245. data/vendor/plugins/haml/TODO +0 -53
  246. data/vendor/plugins/haml/VERSION +0 -1
  247. data/vendor/plugins/haml/VERSION_NAME +0 -1
  248. data/vendor/plugins/haml/bin/css2sass +0 -13
  249. data/vendor/plugins/haml/bin/haml +0 -9
  250. data/vendor/plugins/haml/bin/html2haml +0 -7
  251. data/vendor/plugins/haml/bin/sass +0 -8
  252. data/vendor/plugins/haml/bin/sass-convert +0 -7
  253. data/vendor/plugins/haml/doc-src/FAQ.md +0 -187
  254. data/vendor/plugins/haml/doc-src/HAML_CHANGELOG.md +0 -1091
  255. data/vendor/plugins/haml/doc-src/HAML_REFERENCE.md +0 -1344
  256. data/vendor/plugins/haml/doc-src/INDENTED_SYNTAX.md +0 -210
  257. data/vendor/plugins/haml/doc-src/SASS_CHANGELOG.md +0 -1914
  258. data/vendor/plugins/haml/doc-src/SASS_REFERENCE.md +0 -1680
  259. data/vendor/plugins/haml/doc-src/SCSS_FOR_SASS_USERS.md +0 -155
  260. data/vendor/plugins/haml/ext/extconf.rb +0 -10
  261. data/vendor/plugins/haml/extra/haml-mode.el +0 -753
  262. data/vendor/plugins/haml/extra/sass-mode.el +0 -207
  263. data/vendor/plugins/haml/extra/update_watch.rb +0 -13
  264. data/vendor/plugins/haml/haml.gemspec +0 -35
  265. data/vendor/plugins/haml/init.rb +0 -18
  266. data/vendor/plugins/haml/init.rbc +0 -404
  267. data/vendor/plugins/haml/lib/haml.rb +0 -44
  268. data/vendor/plugins/haml/lib/haml.rbc +0 -569
  269. data/vendor/plugins/haml/lib/haml/buffer.rb +0 -320
  270. data/vendor/plugins/haml/lib/haml/buffer.rbc +0 -4048
  271. data/vendor/plugins/haml/lib/haml/engine.rb +0 -308
  272. data/vendor/plugins/haml/lib/haml/engine.rbc +0 -3852
  273. data/vendor/plugins/haml/lib/haml/error.rb +0 -22
  274. data/vendor/plugins/haml/lib/haml/error.rbc +0 -339
  275. data/vendor/plugins/haml/lib/haml/exec.rb +0 -862
  276. data/vendor/plugins/haml/lib/haml/filters.rb +0 -371
  277. data/vendor/plugins/haml/lib/haml/filters.rbc +0 -5617
  278. data/vendor/plugins/haml/lib/haml/helpers.rb +0 -605
  279. data/vendor/plugins/haml/lib/haml/helpers.rbc +0 -7086
  280. data/vendor/plugins/haml/lib/haml/helpers/action_view_extensions.rb +0 -57
  281. data/vendor/plugins/haml/lib/haml/helpers/action_view_extensions.rbc +0 -522
  282. data/vendor/plugins/haml/lib/haml/helpers/action_view_mods.rb +0 -244
  283. data/vendor/plugins/haml/lib/haml/helpers/action_view_mods.rbc +0 -5515
  284. data/vendor/plugins/haml/lib/haml/helpers/xss_mods.rb +0 -165
  285. data/vendor/plugins/haml/lib/haml/html.rb +0 -428
  286. data/vendor/plugins/haml/lib/haml/html/erb.rb +0 -141
  287. data/vendor/plugins/haml/lib/haml/precompiler.rb +0 -1104
  288. data/vendor/plugins/haml/lib/haml/precompiler.rbc +0 -22247
  289. data/vendor/plugins/haml/lib/haml/railtie.rb +0 -21
  290. data/vendor/plugins/haml/lib/haml/railtie.rbc +0 -409
  291. data/vendor/plugins/haml/lib/haml/root.rb +0 -7
  292. data/vendor/plugins/haml/lib/haml/root.rbc +0 -160
  293. data/vendor/plugins/haml/lib/haml/shared.rb +0 -78
  294. data/vendor/plugins/haml/lib/haml/shared.rbc +0 -1137
  295. data/vendor/plugins/haml/lib/haml/template.rb +0 -97
  296. data/vendor/plugins/haml/lib/haml/template.rbc +0 -1838
  297. data/vendor/plugins/haml/lib/haml/template/options.rb +0 -16
  298. data/vendor/plugins/haml/lib/haml/template/options.rbc +0 -235
  299. data/vendor/plugins/haml/lib/haml/template/patch.rb +0 -58
  300. data/vendor/plugins/haml/lib/haml/template/plugin.rb +0 -122
  301. data/vendor/plugins/haml/lib/haml/template/plugin.rbc +0 -2720
  302. data/vendor/plugins/haml/lib/haml/util.rb +0 -809
  303. data/vendor/plugins/haml/lib/haml/util.rbc +0 -12059
  304. data/vendor/plugins/haml/lib/haml/util/subset_map.rb +0 -101
  305. data/vendor/plugins/haml/lib/haml/util/subset_map.rbc +0 -1316
  306. data/vendor/plugins/haml/lib/haml/version.rb +0 -102
  307. data/vendor/plugins/haml/lib/haml/version.rbc +0 -1671
  308. data/vendor/plugins/haml/lib/sass.rb +0 -29
  309. data/vendor/plugins/haml/lib/sass.rbc +0 -492
  310. data/vendor/plugins/haml/lib/sass/callbacks.rb +0 -52
  311. data/vendor/plugins/haml/lib/sass/callbacks.rbc +0 -388
  312. data/vendor/plugins/haml/lib/sass/css.rb +0 -294
  313. data/vendor/plugins/haml/lib/sass/engine.rb +0 -720
  314. data/vendor/plugins/haml/lib/sass/engine.rbc +0 -17020
  315. data/vendor/plugins/haml/lib/sass/environment.rb +0 -143
  316. data/vendor/plugins/haml/lib/sass/environment.rbc +0 -1751
  317. data/vendor/plugins/haml/lib/sass/error.rb +0 -198
  318. data/vendor/plugins/haml/lib/sass/error.rbc +0 -2801
  319. data/vendor/plugins/haml/lib/sass/files.rb +0 -160
  320. data/vendor/plugins/haml/lib/sass/files.rbc +0 -3118
  321. data/vendor/plugins/haml/lib/sass/less.rb +0 -382
  322. data/vendor/plugins/haml/lib/sass/plugin.rb +0 -276
  323. data/vendor/plugins/haml/lib/sass/plugin.rbc +0 -4356
  324. data/vendor/plugins/haml/lib/sass/plugin/configuration.rb +0 -221
  325. data/vendor/plugins/haml/lib/sass/plugin/configuration.rbc +0 -1343
  326. data/vendor/plugins/haml/lib/sass/plugin/generic.rb +0 -15
  327. data/vendor/plugins/haml/lib/sass/plugin/merb.rb +0 -37
  328. data/vendor/plugins/haml/lib/sass/plugin/rack.rb +0 -47
  329. data/vendor/plugins/haml/lib/sass/plugin/rack.rbc +0 -446
  330. data/vendor/plugins/haml/lib/sass/plugin/rails.rb +0 -32
  331. data/vendor/plugins/haml/lib/sass/plugin/rails.rbc +0 -879
  332. data/vendor/plugins/haml/lib/sass/plugin/staleness_checker.rb +0 -123
  333. data/vendor/plugins/haml/lib/sass/plugin/staleness_checker.rbc +0 -2019
  334. data/vendor/plugins/haml/lib/sass/repl.rb +0 -58
  335. data/vendor/plugins/haml/lib/sass/script.rb +0 -63
  336. data/vendor/plugins/haml/lib/sass/script.rbc +0 -1188
  337. data/vendor/plugins/haml/lib/sass/script/bool.rb +0 -18
  338. data/vendor/plugins/haml/lib/sass/script/bool.rbc +0 -366
  339. data/vendor/plugins/haml/lib/sass/script/color.rb +0 -491
  340. data/vendor/plugins/haml/lib/sass/script/color.rbc +0 -8148
  341. data/vendor/plugins/haml/lib/sass/script/css_lexer.rb +0 -29
  342. data/vendor/plugins/haml/lib/sass/script/css_lexer.rbc +0 -809
  343. data/vendor/plugins/haml/lib/sass/script/css_parser.rb +0 -31
  344. data/vendor/plugins/haml/lib/sass/script/css_parser.rbc +0 -628
  345. data/vendor/plugins/haml/lib/sass/script/funcall.rb +0 -77
  346. data/vendor/plugins/haml/lib/sass/script/funcall.rbc +0 -1805
  347. data/vendor/plugins/haml/lib/sass/script/functions.rb +0 -861
  348. data/vendor/plugins/haml/lib/sass/script/functions.rbc +0 -8418
  349. data/vendor/plugins/haml/lib/sass/script/interpolation.rb +0 -70
  350. data/vendor/plugins/haml/lib/sass/script/interpolation.rbc +0 -1225
  351. data/vendor/plugins/haml/lib/sass/script/lexer.rb +0 -337
  352. data/vendor/plugins/haml/lib/sass/script/lexer.rbc +0 -7231
  353. data/vendor/plugins/haml/lib/sass/script/literal.rb +0 -236
  354. data/vendor/plugins/haml/lib/sass/script/literal.rbc +0 -3365
  355. data/vendor/plugins/haml/lib/sass/script/node.rb +0 -112
  356. data/vendor/plugins/haml/lib/sass/script/node.rbc +0 -1418
  357. data/vendor/plugins/haml/lib/sass/script/number.rb +0 -423
  358. data/vendor/plugins/haml/lib/sass/script/number.rbc +0 -6024
  359. data/vendor/plugins/haml/lib/sass/script/operation.rb +0 -95
  360. data/vendor/plugins/haml/lib/sass/script/operation.rbc +0 -1856
  361. data/vendor/plugins/haml/lib/sass/script/parser.rb +0 -401
  362. data/vendor/plugins/haml/lib/sass/script/parser.rbc +0 -8418
  363. data/vendor/plugins/haml/lib/sass/script/string.rb +0 -67
  364. data/vendor/plugins/haml/lib/sass/script/string.rbc +0 -1357
  365. data/vendor/plugins/haml/lib/sass/script/string_interpolation.rb +0 -93
  366. data/vendor/plugins/haml/lib/sass/script/string_interpolation.rbc +0 -1643
  367. data/vendor/plugins/haml/lib/sass/script/unary_operation.rb +0 -57
  368. data/vendor/plugins/haml/lib/sass/script/unary_operation.rbc +0 -1144
  369. data/vendor/plugins/haml/lib/sass/script/variable.rb +0 -48
  370. data/vendor/plugins/haml/lib/sass/script/variable.rbc +0 -844
  371. data/vendor/plugins/haml/lib/sass/scss.rb +0 -17
  372. data/vendor/plugins/haml/lib/sass/scss.rbc +0 -242
  373. data/vendor/plugins/haml/lib/sass/scss/css_parser.rb +0 -46
  374. data/vendor/plugins/haml/lib/sass/scss/css_parser.rbc +0 -1106
  375. data/vendor/plugins/haml/lib/sass/scss/parser.rb +0 -846
  376. data/vendor/plugins/haml/lib/sass/scss/parser.rbc +0 -19348
  377. data/vendor/plugins/haml/lib/sass/scss/rx.rb +0 -126
  378. data/vendor/plugins/haml/lib/sass/scss/rx.rbc +0 -2849
  379. data/vendor/plugins/haml/lib/sass/scss/sass_parser.rb +0 -11
  380. data/vendor/plugins/haml/lib/sass/scss/sass_parser.rbc +0 -287
  381. data/vendor/plugins/haml/lib/sass/scss/script_lexer.rb +0 -15
  382. data/vendor/plugins/haml/lib/sass/scss/script_lexer.rbc +0 -439
  383. data/vendor/plugins/haml/lib/sass/scss/script_parser.rb +0 -25
  384. data/vendor/plugins/haml/lib/sass/scss/script_parser.rbc +0 -482
  385. data/vendor/plugins/haml/lib/sass/scss/static_parser.rb +0 -40
  386. data/vendor/plugins/haml/lib/sass/scss/static_parser.rbc +0 -971
  387. data/vendor/plugins/haml/lib/sass/selector.rb +0 -361
  388. data/vendor/plugins/haml/lib/sass/selector.rbc +0 -4193
  389. data/vendor/plugins/haml/lib/sass/selector/abstract_sequence.rb +0 -62
  390. data/vendor/plugins/haml/lib/sass/selector/abstract_sequence.rbc +0 -798
  391. data/vendor/plugins/haml/lib/sass/selector/comma_sequence.rb +0 -82
  392. data/vendor/plugins/haml/lib/sass/selector/comma_sequence.rbc +0 -1814
  393. data/vendor/plugins/haml/lib/sass/selector/sequence.rb +0 -237
  394. data/vendor/plugins/haml/lib/sass/selector/sequence.rbc +0 -4928
  395. data/vendor/plugins/haml/lib/sass/selector/simple.rb +0 -113
  396. data/vendor/plugins/haml/lib/sass/selector/simple.rbc +0 -1553
  397. data/vendor/plugins/haml/lib/sass/selector/simple_sequence.rb +0 -136
  398. data/vendor/plugins/haml/lib/sass/selector/simple_sequence.rbc +0 -2346
  399. data/vendor/plugins/haml/lib/sass/tree/charset_node.rb +0 -37
  400. data/vendor/plugins/haml/lib/sass/tree/charset_node.rbc +0 -606
  401. data/vendor/plugins/haml/lib/sass/tree/comment_node.rb +0 -128
  402. data/vendor/plugins/haml/lib/sass/tree/comment_node.rbc +0 -2397
  403. data/vendor/plugins/haml/lib/sass/tree/debug_node.rb +0 -36
  404. data/vendor/plugins/haml/lib/sass/tree/debug_node.rbc +0 -740
  405. data/vendor/plugins/haml/lib/sass/tree/directive_node.rb +0 -75
  406. data/vendor/plugins/haml/lib/sass/tree/directive_node.rbc +0 -1302
  407. data/vendor/plugins/haml/lib/sass/tree/extend_node.rb +0 -65
  408. data/vendor/plugins/haml/lib/sass/tree/extend_node.rbc +0 -1276
  409. data/vendor/plugins/haml/lib/sass/tree/for_node.rb +0 -67
  410. data/vendor/plugins/haml/lib/sass/tree/for_node.rbc +0 -1145
  411. data/vendor/plugins/haml/lib/sass/tree/if_node.rb +0 -81
  412. data/vendor/plugins/haml/lib/sass/tree/if_node.rbc +0 -1119
  413. data/vendor/plugins/haml/lib/sass/tree/import_node.rb +0 -102
  414. data/vendor/plugins/haml/lib/sass/tree/import_node.rbc +0 -2242
  415. data/vendor/plugins/haml/lib/sass/tree/mixin_def_node.rb +0 -60
  416. data/vendor/plugins/haml/lib/sass/tree/mixin_def_node.rbc +0 -1001
  417. data/vendor/plugins/haml/lib/sass/tree/mixin_node.rb +0 -123
  418. data/vendor/plugins/haml/lib/sass/tree/mixin_node.rbc +0 -3355
  419. data/vendor/plugins/haml/lib/sass/tree/node.rb +0 -465
  420. data/vendor/plugins/haml/lib/sass/tree/node.rbc +0 -5533
  421. data/vendor/plugins/haml/lib/sass/tree/prop_node.rb +0 -220
  422. data/vendor/plugins/haml/lib/sass/tree/prop_node.rbc +0 -3949
  423. data/vendor/plugins/haml/lib/sass/tree/root_node.rb +0 -157
  424. data/vendor/plugins/haml/lib/sass/tree/root_node.rbc +0 -3112
  425. data/vendor/plugins/haml/lib/sass/tree/rule_node.rb +0 -273
  426. data/vendor/plugins/haml/lib/sass/tree/rule_node.rbc +0 -5636
  427. data/vendor/plugins/haml/lib/sass/tree/variable_node.rb +0 -39
  428. data/vendor/plugins/haml/lib/sass/tree/variable_node.rbc +0 -845
  429. data/vendor/plugins/haml/lib/sass/tree/warn_node.rb +0 -42
  430. data/vendor/plugins/haml/lib/sass/tree/warn_node.rbc +0 -1043
  431. data/vendor/plugins/haml/lib/sass/tree/while_node.rb +0 -48
  432. data/vendor/plugins/haml/lib/sass/tree/while_node.rbc +0 -722
  433. data/vendor/plugins/haml/rails/init.rb +0 -1
  434. data/vendor/plugins/haml/test/benchmark.rb +0 -99
  435. data/vendor/plugins/haml/test/haml/engine_test.rb +0 -1805
  436. data/vendor/plugins/haml/test/haml/erb/_av_partial_1.erb +0 -12
  437. data/vendor/plugins/haml/test/haml/erb/_av_partial_2.erb +0 -8
  438. data/vendor/plugins/haml/test/haml/erb/action_view.erb +0 -62
  439. data/vendor/plugins/haml/test/haml/erb/standard.erb +0 -54
  440. data/vendor/plugins/haml/test/haml/helper_test.rb +0 -450
  441. data/vendor/plugins/haml/test/haml/html2haml/erb_tests.rb +0 -426
  442. data/vendor/plugins/haml/test/haml/html2haml_test.rb +0 -336
  443. data/vendor/plugins/haml/test/haml/markaby/standard.mab +0 -52
  444. data/vendor/plugins/haml/test/haml/mocks/article.rb +0 -6
  445. data/vendor/plugins/haml/test/haml/results/content_for_layout.xhtml +0 -12
  446. data/vendor/plugins/haml/test/haml/results/eval_suppressed.xhtml +0 -9
  447. data/vendor/plugins/haml/test/haml/results/filters.xhtml +0 -62
  448. data/vendor/plugins/haml/test/haml/results/helpers.xhtml +0 -70
  449. data/vendor/plugins/haml/test/haml/results/helpful.xhtml +0 -10
  450. data/vendor/plugins/haml/test/haml/results/just_stuff.xhtml +0 -70
  451. data/vendor/plugins/haml/test/haml/results/list.xhtml +0 -12
  452. data/vendor/plugins/haml/test/haml/results/nuke_inner_whitespace.xhtml +0 -40
  453. data/vendor/plugins/haml/test/haml/results/nuke_outer_whitespace.xhtml +0 -148
  454. data/vendor/plugins/haml/test/haml/results/original_engine.xhtml +0 -20
  455. data/vendor/plugins/haml/test/haml/results/partial_layout.xhtml +0 -5
  456. data/vendor/plugins/haml/test/haml/results/partials.xhtml +0 -21
  457. data/vendor/plugins/haml/test/haml/results/render_layout.xhtml +0 -3
  458. data/vendor/plugins/haml/test/haml/results/silent_script.xhtml +0 -74
  459. data/vendor/plugins/haml/test/haml/results/standard.xhtml +0 -162
  460. data/vendor/plugins/haml/test/haml/results/tag_parsing.xhtml +0 -23
  461. data/vendor/plugins/haml/test/haml/results/very_basic.xhtml +0 -5
  462. data/vendor/plugins/haml/test/haml/results/whitespace_handling.xhtml +0 -89
  463. data/vendor/plugins/haml/test/haml/spec/LICENSE +0 -14
  464. data/vendor/plugins/haml/test/haml/spec/README.md +0 -106
  465. data/vendor/plugins/haml/test/haml/spec/lua_haml_spec.lua +0 -38
  466. data/vendor/plugins/haml/test/haml/spec/perl_haml_test.pl +0 -81
  467. data/vendor/plugins/haml/test/haml/spec/ruby_haml_test.rb +0 -19
  468. data/vendor/plugins/haml/test/haml/spec/tests.json +0 -603
  469. data/vendor/plugins/haml/test/haml/spec_test.rb +0 -44
  470. data/vendor/plugins/haml/test/haml/template_test.rb +0 -417
  471. data/vendor/plugins/haml/test/haml/templates/_av_partial_1.haml +0 -9
  472. data/vendor/plugins/haml/test/haml/templates/_av_partial_1_ugly.haml +0 -9
  473. data/vendor/plugins/haml/test/haml/templates/_av_partial_2.haml +0 -5
  474. data/vendor/plugins/haml/test/haml/templates/_av_partial_2_ugly.haml +0 -5
  475. data/vendor/plugins/haml/test/haml/templates/_layout.erb +0 -3
  476. data/vendor/plugins/haml/test/haml/templates/_layout_for_partial.haml +0 -3
  477. data/vendor/plugins/haml/test/haml/templates/_partial.haml +0 -8
  478. data/vendor/plugins/haml/test/haml/templates/_text_area.haml +0 -3
  479. data/vendor/plugins/haml/test/haml/templates/action_view.haml +0 -47
  480. data/vendor/plugins/haml/test/haml/templates/action_view_ugly.haml +0 -47
  481. data/vendor/plugins/haml/test/haml/templates/breakage.haml +0 -8
  482. data/vendor/plugins/haml/test/haml/templates/content_for_layout.haml +0 -8
  483. data/vendor/plugins/haml/test/haml/templates/eval_suppressed.haml +0 -11
  484. data/vendor/plugins/haml/test/haml/templates/filters.haml +0 -66
  485. data/vendor/plugins/haml/test/haml/templates/helpers.haml +0 -55
  486. data/vendor/plugins/haml/test/haml/templates/helpful.haml +0 -11
  487. data/vendor/plugins/haml/test/haml/templates/just_stuff.haml +0 -85
  488. data/vendor/plugins/haml/test/haml/templates/list.haml +0 -12
  489. data/vendor/plugins/haml/test/haml/templates/nuke_inner_whitespace.haml +0 -32
  490. data/vendor/plugins/haml/test/haml/templates/nuke_outer_whitespace.haml +0 -144
  491. data/vendor/plugins/haml/test/haml/templates/original_engine.haml +0 -17
  492. data/vendor/plugins/haml/test/haml/templates/partial_layout.haml +0 -7
  493. data/vendor/plugins/haml/test/haml/templates/partialize.haml +0 -1
  494. data/vendor/plugins/haml/test/haml/templates/partials.haml +0 -12
  495. data/vendor/plugins/haml/test/haml/templates/render_layout.haml +0 -2
  496. data/vendor/plugins/haml/test/haml/templates/silent_script.haml +0 -40
  497. data/vendor/plugins/haml/test/haml/templates/standard.haml +0 -42
  498. data/vendor/plugins/haml/test/haml/templates/standard_ugly.haml +0 -42
  499. data/vendor/plugins/haml/test/haml/templates/tag_parsing.haml +0 -21
  500. data/vendor/plugins/haml/test/haml/templates/very_basic.haml +0 -4
  501. data/vendor/plugins/haml/test/haml/templates/whitespace_handling.haml +0 -87
  502. data/vendor/plugins/haml/test/haml/util/subset_map_test.rb +0 -91
  503. data/vendor/plugins/haml/test/haml/util_test.rb +0 -268
  504. data/vendor/plugins/haml/test/linked_rails.rb +0 -42
  505. data/vendor/plugins/haml/test/sass/callbacks_test.rb +0 -61
  506. data/vendor/plugins/haml/test/sass/conversion_test.rb +0 -1218
  507. data/vendor/plugins/haml/test/sass/css2sass_test.rb +0 -364
  508. data/vendor/plugins/haml/test/sass/data/hsl-rgb.txt +0 -319
  509. data/vendor/plugins/haml/test/sass/engine_test.rb +0 -2263
  510. data/vendor/plugins/haml/test/sass/extend_test.rb +0 -1348
  511. data/vendor/plugins/haml/test/sass/functions_test.rb +0 -556
  512. data/vendor/plugins/haml/test/sass/less_conversion_test.rb +0 -653
  513. data/vendor/plugins/haml/test/sass/more_results/more1.css +0 -9
  514. data/vendor/plugins/haml/test/sass/more_results/more1_with_line_comments.css +0 -26
  515. data/vendor/plugins/haml/test/sass/more_results/more_import.css +0 -29
  516. data/vendor/plugins/haml/test/sass/more_templates/_more_partial.sass +0 -2
  517. data/vendor/plugins/haml/test/sass/more_templates/more1.sass +0 -23
  518. data/vendor/plugins/haml/test/sass/more_templates/more_import.sass +0 -11
  519. data/vendor/plugins/haml/test/sass/plugin_test.rb +0 -433
  520. data/vendor/plugins/haml/test/sass/results/alt.css +0 -4
  521. data/vendor/plugins/haml/test/sass/results/basic.css +0 -9
  522. data/vendor/plugins/haml/test/sass/results/compact.css +0 -5
  523. data/vendor/plugins/haml/test/sass/results/complex.css +0 -86
  524. data/vendor/plugins/haml/test/sass/results/compressed.css +0 -1
  525. data/vendor/plugins/haml/test/sass/results/expanded.css +0 -19
  526. data/vendor/plugins/haml/test/sass/results/import.css +0 -31
  527. data/vendor/plugins/haml/test/sass/results/import_charset.css +0 -4
  528. data/vendor/plugins/haml/test/sass/results/import_charset_1_8.css +0 -4
  529. data/vendor/plugins/haml/test/sass/results/import_charset_ibm866.css +0 -4
  530. data/vendor/plugins/haml/test/sass/results/line_numbers.css +0 -49
  531. data/vendor/plugins/haml/test/sass/results/mixins.css +0 -95
  532. data/vendor/plugins/haml/test/sass/results/multiline.css +0 -24
  533. data/vendor/plugins/haml/test/sass/results/nested.css +0 -22
  534. data/vendor/plugins/haml/test/sass/results/options.css +0 -1
  535. data/vendor/plugins/haml/test/sass/results/parent_ref.css +0 -13
  536. data/vendor/plugins/haml/test/sass/results/script.css +0 -16
  537. data/vendor/plugins/haml/test/sass/results/scss_import.css +0 -31
  538. data/vendor/plugins/haml/test/sass/results/scss_importee.css +0 -2
  539. data/vendor/plugins/haml/test/sass/results/subdir/nested_subdir/nested_subdir.css +0 -1
  540. data/vendor/plugins/haml/test/sass/results/subdir/subdir.css +0 -3
  541. data/vendor/plugins/haml/test/sass/results/units.css +0 -11
  542. data/vendor/plugins/haml/test/sass/results/warn_imported.css +0 -0
  543. data/vendor/plugins/haml/test/sass/script_conversion_test.rb +0 -314
  544. data/vendor/plugins/haml/test/sass/script_test.rb +0 -470
  545. data/vendor/plugins/haml/test/sass/scss/css_test.rb +0 -916
  546. data/vendor/plugins/haml/test/sass/scss/rx_test.rb +0 -156
  547. data/vendor/plugins/haml/test/sass/scss/scss_test.rb +0 -1088
  548. data/vendor/plugins/haml/test/sass/scss/test_helper.rb +0 -37
  549. data/vendor/plugins/haml/test/sass/templates/_imported_charset_ibm866.sass +0 -4
  550. data/vendor/plugins/haml/test/sass/templates/_imported_charset_utf8.sass +0 -4
  551. data/vendor/plugins/haml/test/sass/templates/_partial.sass +0 -2
  552. data/vendor/plugins/haml/test/sass/templates/alt.sass +0 -16
  553. data/vendor/plugins/haml/test/sass/templates/basic.sass +0 -23
  554. data/vendor/plugins/haml/test/sass/templates/bork1.sass +0 -2
  555. data/vendor/plugins/haml/test/sass/templates/bork2.sass +0 -2
  556. data/vendor/plugins/haml/test/sass/templates/bork3.sass +0 -2
  557. data/vendor/plugins/haml/test/sass/templates/bork4.sass +0 -2
  558. data/vendor/plugins/haml/test/sass/templates/compact.sass +0 -17
  559. data/vendor/plugins/haml/test/sass/templates/complex.sass +0 -305
  560. data/vendor/plugins/haml/test/sass/templates/compressed.sass +0 -15
  561. data/vendor/plugins/haml/test/sass/templates/expanded.sass +0 -17
  562. data/vendor/plugins/haml/test/sass/templates/import.sass +0 -12
  563. data/vendor/plugins/haml/test/sass/templates/import_charset.sass +0 -7
  564. data/vendor/plugins/haml/test/sass/templates/import_charset_1_8.sass +0 -4
  565. data/vendor/plugins/haml/test/sass/templates/import_charset_ibm866.sass +0 -9
  566. data/vendor/plugins/haml/test/sass/templates/importee.less +0 -2
  567. data/vendor/plugins/haml/test/sass/templates/importee.sass +0 -19
  568. data/vendor/plugins/haml/test/sass/templates/line_numbers.sass +0 -13
  569. data/vendor/plugins/haml/test/sass/templates/mixin_bork.sass +0 -5
  570. data/vendor/plugins/haml/test/sass/templates/mixins.sass +0 -76
  571. data/vendor/plugins/haml/test/sass/templates/multiline.sass +0 -20
  572. data/vendor/plugins/haml/test/sass/templates/nested.sass +0 -25
  573. data/vendor/plugins/haml/test/sass/templates/nested_bork1.sass +0 -2
  574. data/vendor/plugins/haml/test/sass/templates/nested_bork2.sass +0 -2
  575. data/vendor/plugins/haml/test/sass/templates/nested_bork3.sass +0 -2
  576. data/vendor/plugins/haml/test/sass/templates/nested_bork4.sass +0 -2
  577. data/vendor/plugins/haml/test/sass/templates/nested_mixin_bork.sass +0 -6
  578. data/vendor/plugins/haml/test/sass/templates/options.sass +0 -2
  579. data/vendor/plugins/haml/test/sass/templates/parent_ref.sass +0 -25
  580. data/vendor/plugins/haml/test/sass/templates/script.sass +0 -101
  581. data/vendor/plugins/haml/test/sass/templates/scss_import.scss +0 -11
  582. data/vendor/plugins/haml/test/sass/templates/scss_importee.scss +0 -1
  583. data/vendor/plugins/haml/test/sass/templates/subdir/nested_subdir/_nested_partial.sass +0 -2
  584. data/vendor/plugins/haml/test/sass/templates/subdir/nested_subdir/nested_subdir.sass +0 -3
  585. data/vendor/plugins/haml/test/sass/templates/subdir/subdir.sass +0 -6
  586. data/vendor/plugins/haml/test/sass/templates/units.sass +0 -11
  587. data/vendor/plugins/haml/test/sass/templates/warn.sass +0 -3
  588. data/vendor/plugins/haml/test/sass/templates/warn_imported.sass +0 -4
  589. data/vendor/plugins/haml/test/test_helper.rb +0 -98
  590. data/vendor/plugins/haml/vendor/fssm/LICENSE +0 -20
  591. data/vendor/plugins/haml/vendor/fssm/README.markdown +0 -55
  592. data/vendor/plugins/haml/vendor/fssm/Rakefile +0 -59
  593. data/vendor/plugins/haml/vendor/fssm/VERSION.yml +0 -5
  594. data/vendor/plugins/haml/vendor/fssm/example.rb +0 -9
  595. data/vendor/plugins/haml/vendor/fssm/fssm.gemspec +0 -77
  596. data/vendor/plugins/haml/vendor/fssm/lib/fssm.rb +0 -33
  597. data/vendor/plugins/haml/vendor/fssm/lib/fssm/backends/fsevents.rb +0 -36
  598. data/vendor/plugins/haml/vendor/fssm/lib/fssm/backends/inotify.rb +0 -26
  599. data/vendor/plugins/haml/vendor/fssm/lib/fssm/backends/polling.rb +0 -25
  600. data/vendor/plugins/haml/vendor/fssm/lib/fssm/backends/rubycocoa/fsevents.rb +0 -131
  601. data/vendor/plugins/haml/vendor/fssm/lib/fssm/monitor.rb +0 -26
  602. data/vendor/plugins/haml/vendor/fssm/lib/fssm/path.rb +0 -91
  603. data/vendor/plugins/haml/vendor/fssm/lib/fssm/pathname.rb +0 -502
  604. data/vendor/plugins/haml/vendor/fssm/lib/fssm/state/directory.rb +0 -57
  605. data/vendor/plugins/haml/vendor/fssm/lib/fssm/state/file.rb +0 -24
  606. data/vendor/plugins/haml/vendor/fssm/lib/fssm/support.rb +0 -63
  607. data/vendor/plugins/haml/vendor/fssm/lib/fssm/tree.rb +0 -176
  608. data/vendor/plugins/haml/vendor/fssm/profile/prof-cache.rb +0 -40
  609. data/vendor/plugins/haml/vendor/fssm/profile/prof-fssm-pathname.html +0 -1231
  610. data/vendor/plugins/haml/vendor/fssm/profile/prof-pathname.rb +0 -68
  611. data/vendor/plugins/haml/vendor/fssm/profile/prof-plain-pathname.html +0 -988
  612. data/vendor/plugins/haml/vendor/fssm/profile/prof.html +0 -2379
  613. data/vendor/plugins/haml/vendor/fssm/spec/path_spec.rb +0 -75
  614. data/vendor/plugins/haml/vendor/fssm/spec/root/duck/quack.txt +0 -0
  615. data/vendor/plugins/haml/vendor/fssm/spec/root/file.css +0 -0
  616. data/vendor/plugins/haml/vendor/fssm/spec/root/file.rb +0 -0
  617. data/vendor/plugins/haml/vendor/fssm/spec/root/file.yml +0 -0
  618. data/vendor/plugins/haml/vendor/fssm/spec/root/moo/cow.txt +0 -0
  619. data/vendor/plugins/haml/vendor/fssm/spec/spec_helper.rb +0 -14
  620. data/vendor/plugins/haml/yard/callbacks.rb +0 -29
  621. data/vendor/plugins/haml/yard/default/fulldoc/html/css/common.sass +0 -26
  622. data/vendor/plugins/haml/yard/default/layout/html/footer.erb +0 -12
  623. data/vendor/plugins/haml/yard/inherited_hash.rb +0 -41
@@ -1,861 +0,0 @@
1
- module Sass::Script
2
- # Methods in this module are accessible from the SassScript context.
3
- # For example, you can write
4
- #
5
- # $color = hsl(120deg, 100%, 50%)
6
- #
7
- # and it will call {Sass::Script::Functions#hsl}.
8
- #
9
- # The following functions are provided:
10
- #
11
- # ## RGB Functions
12
- #
13
- # \{#rgb}
14
- # : Converts an `rgb(red, green, blue)` triplet into a color.
15
- #
16
- # \{#rgba}
17
- # : Converts an `rgba(red, green, blue, alpha)` quadruplet into a color.
18
- #
19
- # \{#red}
20
- # : Gets the red component of a color.
21
- #
22
- # \{#green}
23
- # : Gets the green component of a color.
24
- #
25
- # \{#blue}
26
- # : Gets the blue component of a color.
27
- #
28
- # \{#mix}
29
- # : Mixes two colors together.
30
- #
31
- # ## HSL Functions
32
- #
33
- # \{#hsl}
34
- # : Converts an `hsl(hue, saturation, lightness)` triplet into a color.
35
- #
36
- # \{#hsla}
37
- # : Converts an `hsla(hue, saturation, lightness, alpha)` quadruplet into a color.
38
- #
39
- # \{#hue}
40
- # : Gets the hue component of a color.
41
- #
42
- # \{#saturation}
43
- # : Gets the saturation component of a color.
44
- #
45
- # \{#lightness}
46
- # : Gets the lightness component of a color.
47
- #
48
- # \{#adjust_hue #adjust-hue}
49
- # : Changes the hue of a color.
50
- #
51
- # \{#lighten}
52
- # : Makes a color lighter.
53
- #
54
- # \{#darken}
55
- # : Makes a color darker.
56
- #
57
- # \{#saturate}
58
- # : Makes a color more saturated.
59
- #
60
- # \{#desaturate}
61
- # : Makes a color less saturated.
62
- #
63
- # \{#grayscale}
64
- # : Converts a color to grayscale.
65
- #
66
- # \{#complement}
67
- # : Returns the complement of a color.
68
- #
69
- # ## Opacity Functions
70
- #
71
- # \{#alpha} / \{#opacity}
72
- # : Gets the alpha component (opacity) of a color.
73
- #
74
- # \{#rgba}
75
- # : Sets the alpha component of a color.
76
- #
77
- # \{#opacify} / \{#fade_in #fade-in}
78
- # : Makes a color more opaque.
79
- #
80
- # \{#transparentize} / \{#fade_out #fade-out}
81
- # : Makes a color more transparent.
82
- #
83
- # ## String Functions
84
- #
85
- # \{#unquote}
86
- # : Removes the quotes from a string.
87
- #
88
- # \{#quote}
89
- # : Adds quotes to a string.
90
- #
91
- # ## Number Functions
92
- #
93
- # \{#percentage}
94
- # : Converts a unitless number to a percentage.
95
- #
96
- # \{#round}
97
- # : Rounds a number to the nearest whole number.
98
- #
99
- # \{#ceil}
100
- # : Rounds a number up to the nearest whole number.
101
- #
102
- # \{#floor}
103
- # : Rounds a number down to the nearest whole number.
104
- #
105
- # \{#abs}
106
- # : Returns the absolute value of a number.
107
- #
108
- # ## Introspection Functions
109
- #
110
- # \{#type_of}
111
- # : Returns the type of a value.
112
- #
113
- # \{#unit}
114
- # : Returns the units associated with a number.
115
- #
116
- # \{#unitless}
117
- # : Returns whether a number has units or not.
118
- #
119
- # \{#comparable}
120
- # : Returns whether two numbers can be added or compared.
121
- #
122
- # These functions are described in more detail below.
123
- #
124
- # ## Adding Custom Functions
125
- #
126
- # New Sass functions can be added by adding Ruby methods to this module.
127
- # For example:
128
- #
129
- # module Sass::Script::Functions
130
- # def reverse(string)
131
- # assert_type string, :String
132
- # Sass::Script::String.new(string.value.reverse)
133
- # end
134
- # end
135
- #
136
- # There are a few things to keep in mind when modifying this module.
137
- # First of all, the arguments passed are {Sass::Script::Literal} objects.
138
- # Literal objects are also expected to be returned.
139
- # This means that Ruby values must be unwrapped and wrapped.
140
- #
141
- # Most Literal objects support the {Sass::Script::Literal#value value} accessor
142
- # for getting their Ruby values.
143
- # Color objects, though, must be accessed using {Sass::Script::Color#rgb rgb},
144
- # {Sass::Script::Color#red red}, {Sass::Script::Color#blue green}, or {Sass::Script::Color#blue blue}.
145
- #
146
- # Second, making Ruby functions accessible from Sass introduces the temptation
147
- # to do things like database access within stylesheets.
148
- # This is generally a bad idea;
149
- # since Sass files are by default only compiled once,
150
- # dynamic code is not a great fit.
151
- #
152
- # If you really, really need to compile Sass on each request,
153
- # first make sure you have adequate caching set up.
154
- # Then you can use {Sass::Engine} to render the code,
155
- # using the {file:SASS_REFERENCE.md#custom-option `options` parameter}
156
- # to pass in data that {EvaluationContext#options can be accessed}
157
- # from your Sass functions.
158
- #
159
- # Within one of the functions in this module,
160
- # methods of {EvaluationContext} can be used.
161
- #
162
- # ### Caveats
163
- #
164
- # When creating new {Literal} objects within functions,
165
- # be aware that it's not safe to call {Literal#to_s #to_s}
166
- # (or other methods that use the string representation)
167
- # on those objects without first setting {Node#options= the #options attribute}.
168
- module Functions
169
- # The context in which methods in {Script::Functions} are evaluated.
170
- # That means that all instance methods of {EvaluationContext}
171
- # are available to use in functions.
172
- class EvaluationContext
173
- # The options hash for the {Sass::Engine} that is processing the function call
174
- #
175
- # @return [{Symbol => Object}]
176
- attr_reader :options
177
-
178
- # @param options [{Symbol => Object}] See \{#options}
179
- def initialize(options)
180
- @options = options
181
-
182
- # We need to include this individually in each instance
183
- # because of an icky Ruby restriction
184
- class << self; include Sass::Script::Functions; end
185
- end
186
-
187
- # Asserts that the type of a given SassScript value
188
- # is the expected type (designated by a symbol).
189
- # For example:
190
- #
191
- # assert_type value, :String
192
- # assert_type value, :Number
193
- #
194
- # Valid types are `:Bool`, `:Color`, `:Number`, and `:String`.
195
- # Note that `:String` will match both double-quoted strings
196
- # and unquoted identifiers.
197
- #
198
- # @param value [Sass::Script::Literal] A SassScript value
199
- # @param type [Symbol] The name of the type the value is expected to be
200
- def assert_type(value, type)
201
- return if value.is_a?(Sass::Script.const_get(type))
202
- raise ArgumentError.new("#{value.inspect} is not a #{type.to_s.downcase}")
203
- end
204
- end
205
-
206
- instance_methods.each { |m| undef_method m unless m.to_s =~ /^__/ }
207
-
208
-
209
- # Creates a {Color} object from red, green, and blue values.
210
- #
211
- # @param red [Number]
212
- # A number between 0 and 255 inclusive,
213
- # or between 0% and 100% inclusive
214
- # @param green [Number]
215
- # A number between 0 and 255 inclusive,
216
- # or between 0% and 100% inclusive
217
- # @param blue [Number]
218
- # A number between 0 and 255 inclusive,
219
- # or between 0% and 100% inclusive
220
- # @see #rgba
221
- # @return [Color]
222
- def rgb(red, green, blue)
223
- assert_type red, :Number
224
- assert_type green, :Number
225
- assert_type blue, :Number
226
-
227
- Color.new([red, green, blue].map do |c|
228
- v = c.value
229
- if c.numerator_units == ["%"] && c.denominator_units.empty?
230
- next v * 255 / 100.0 if (0..100).include?(v)
231
- raise ArgumentError.new("Color value #{c} must be between 0% and 100% inclusive")
232
- else
233
- next v if (0..255).include?(v)
234
- raise ArgumentError.new("Color value #{v} must be between 0 and 255 inclusive")
235
- end
236
- end)
237
- end
238
-
239
- # @see #rgb
240
- # @overload rgba(red, green, blue, alpha)
241
- # Creates a {Color} object from red, green, and blue values,
242
- # as well as an alpha channel indicating opacity.
243
- #
244
- # @param red [Number]
245
- # A number between 0 and 255 inclusive
246
- # @param green [Number]
247
- # A number between 0 and 255 inclusive
248
- # @param blue [Number]
249
- # A number between 0 and 255 inclusive
250
- # @param alpha [Number]
251
- # A number between 0 and 1
252
- # @return [Color]
253
- #
254
- # @overload rgba(color, alpha)
255
- # Sets the opacity of a color.
256
- #
257
- # @example
258
- # rgba(#102030, 0.5) => rgba(16, 32, 48, 0.5)
259
- # rgba(blue, 0.2) => rgba(0, 0, 255, 0.2)
260
- #
261
- # @param color [Color]
262
- # @param alpha [Number]
263
- # A number between 0 and 1
264
- # @return [Color]
265
- def rgba(*args)
266
- case args.size
267
- when 2
268
- color, alpha = args
269
-
270
- assert_type color, :Color
271
- assert_type alpha, :Number
272
-
273
- unless (0..1).include?(alpha.value)
274
- raise ArgumentError.new("Alpha channel #{alpha.value} must be between 0 and 1 inclusive")
275
- end
276
-
277
- color.with(:alpha => alpha.value)
278
- when 4
279
- red, green, blue, alpha = args
280
- rgba(rgb(red, green, blue), alpha)
281
- else
282
- raise ArgumentError.new("wrong number of arguments (#{args.size} for 4)")
283
- end
284
- end
285
-
286
- # Creates a {Color} object from hue, saturation, and lightness.
287
- # Uses the algorithm from the [CSS3 spec](http://www.w3.org/TR/css3-color/#hsl-color).
288
- #
289
- # @param hue [Number] The hue of the color.
290
- # Should be between 0 and 360 degrees, inclusive
291
- # @param saturation [Number] The saturation of the color.
292
- # Must be between `0%` and `100%`, inclusive
293
- # @param lightness [Number] The lightness of the color.
294
- # Must be between `0%` and `100%`, inclusive
295
- # @return [Color] The resulting color
296
- # @see #hsla
297
- # @raise [ArgumentError] if `saturation` or `lightness` are out of bounds
298
- def hsl(hue, saturation, lightness)
299
- hsla(hue, saturation, lightness, Number.new(1))
300
- end
301
-
302
- # Creates a {Color} object from hue, saturation, and lightness,
303
- # as well as an alpha channel indicating opacity.
304
- # Uses the algorithm from the [CSS3 spec](http://www.w3.org/TR/css3-color/#hsl-color).
305
- #
306
- # @param hue [Number] The hue of the color.
307
- # Should be between 0 and 360 degrees, inclusive
308
- # @param saturation [Number] The saturation of the color.
309
- # Must be between `0%` and `100%`, inclusive
310
- # @param lightness [Number] The lightness of the color.
311
- # Must be between `0%` and `100%`, inclusive
312
- # @param alpha [Number] The opacity of the color.
313
- # Must be between 0 and 1, inclusive
314
- # @return [Color] The resulting color
315
- # @see #hsl
316
- # @raise [ArgumentError] if `saturation`, `lightness`, or `alpha` are out of bounds
317
- def hsla(hue, saturation, lightness, alpha)
318
- assert_type hue, :Number
319
- assert_type saturation, :Number
320
- assert_type lightness, :Number
321
- assert_type alpha, :Number
322
-
323
- unless (0..1).include?(alpha.value)
324
- raise ArgumentError.new("Alpha channel #{alpha.value} must be between 0 and 1")
325
- end
326
-
327
- original_s = saturation
328
- original_l = lightness
329
- # This algorithm is from http://www.w3.org/TR/css3-color#hsl-color
330
- h, s, l = [hue, saturation, lightness].map { |a| a.value }
331
- raise ArgumentError.new("Saturation #{s} must be between 0% and 100%") unless (0..100).include?(s)
332
- raise ArgumentError.new("Lightness #{l} must be between 0% and 100%") unless (0..100).include?(l)
333
-
334
- Color.new(:hue => h, :saturation => s, :lightness => l, :alpha => alpha.value)
335
- end
336
-
337
- # Returns the red component of a color.
338
- #
339
- # @param color [Color]
340
- # @return [Number]
341
- # @raise [ArgumentError] If `color` isn't a color
342
- def red(color)
343
- assert_type color, :Color
344
- Sass::Script::Number.new(color.red)
345
- end
346
-
347
- # Returns the green component of a color.
348
- #
349
- # @param color [Color]
350
- # @return [Number]
351
- # @raise [ArgumentError] If `color` isn't a color
352
- def green(color)
353
- assert_type color, :Color
354
- Sass::Script::Number.new(color.green)
355
- end
356
-
357
- # Returns the blue component of a color.
358
- #
359
- # @param color [Color]
360
- # @return [Number]
361
- # @raise [ArgumentError] If `color` isn't a color
362
- def blue(color)
363
- assert_type color, :Color
364
- Sass::Script::Number.new(color.blue)
365
- end
366
-
367
- # Returns the hue component of a color.
368
- #
369
- # See [the CSS3 HSL specification](http://en.wikipedia.org/wiki/HSL_and_HSV#Conversion_from_RGB_to_HSL_or_HSV).
370
- #
371
- # Calculated from RGB where necessary via [this algorithm](http://en.wikipedia.org/wiki/HSL_and_HSV#Conversion_from_RGB_to_HSL_or_HSV).
372
- #
373
- # @param color [Color]
374
- # @return [Number] between 0deg and 360deg
375
- # @see #adjust_hue
376
- # @raise [ArgumentError] if `color` isn't a color
377
- def hue(color)
378
- assert_type color, :Color
379
- Sass::Script::Number.new(color.hue, ["deg"])
380
- end
381
-
382
- # Returns the saturation component of a color.
383
- #
384
- # See [the CSS3 HSL specification](http://en.wikipedia.org/wiki/HSL_and_HSV#Conversion_from_RGB_to_HSL_or_HSV).
385
- #
386
- # Calculated from RGB where necessary via [this algorithm](http://en.wikipedia.org/wiki/HSL_and_HSV#Conversion_from_RGB_to_HSL_or_HSV).
387
- #
388
- # @param color [Color]
389
- # @return [Number] between 0% and 100%
390
- # @see #saturate
391
- # @see #desaturate
392
- # @raise [ArgumentError] if `color` isn't a color
393
- def saturation(color)
394
- assert_type color, :Color
395
- Sass::Script::Number.new(color.saturation, ["%"])
396
- end
397
-
398
- # Returns the hue component of a color.
399
- #
400
- # See [the CSS3 HSL specification](http://en.wikipedia.org/wiki/HSL_and_HSV#Conversion_from_RGB_to_HSL_or_HSV).
401
- #
402
- # Calculated from RGB where necessary via [this algorithm](http://en.wikipedia.org/wiki/HSL_and_HSV#Conversion_from_RGB_to_HSL_or_HSV).
403
- #
404
- # @param color [Color]
405
- # @return [Number] between 0% and 100%
406
- # @see #lighten
407
- # @see #darken
408
- # @raise [ArgumentError] if `color` isn't a color
409
- def lightness(color)
410
- assert_type color, :Color
411
- Sass::Script::Number.new(color.lightness, ["%"])
412
- end
413
-
414
- # Returns the alpha component (opacity) of a color.
415
- # This is 1 unless otherwise specified.
416
- #
417
- # This function also supports the proprietary Microsoft
418
- # `alpha(opacity=20)` syntax.
419
- #
420
- # @overload def alpha(color)
421
- # @param color [Color]
422
- # @return [Number]
423
- # @see #opacify
424
- # @see #transparentize
425
- # @raise [ArgumentError] If `color` isn't a color
426
- def alpha(*args)
427
- if args.all? do |a|
428
- a.is_a?(Sass::Script::String) && a.type == :identifier &&
429
- a.value =~ /^[a-zA-Z]+\s*=/
430
- end
431
- # Support the proprietary MS alpha() function
432
- return Sass::Script::String.new("alpha(#{args.map {|a| a.to_s}.join(", ")})")
433
- end
434
-
435
- opacity(*args)
436
- end
437
-
438
- # Returns the alpha component (opacity) of a color.
439
- # This is 1 unless otherwise specified.
440
- #
441
- # @param color [Color]
442
- # @return [Number]
443
- # @see #opacify
444
- # @see #transparentize
445
- # @raise [ArgumentError] If `color` isn't a color
446
- def opacity(color)
447
- assert_type color, :Color
448
- Sass::Script::Number.new(color.alpha)
449
- end
450
-
451
- # Makes a color more opaque.
452
- # Takes a color and an amount between 0 and 1,
453
- # and returns a color with the opacity increased by that value.
454
- #
455
- # For example:
456
- #
457
- # opacify(rgba(0, 0, 0, 0.5), 0.1) => rgba(0, 0, 0, 0.6)
458
- # opacify(rgba(0, 0, 17, 0.8), 0.2) => #001
459
- #
460
- # @param color [Color]
461
- # @param amount [Number]
462
- # @return [Color]
463
- # @see #transparentize
464
- # @raise [ArgumentError] If `color` isn't a color,
465
- # or `number` isn't a number between 0 and 1
466
- def opacify(color, amount)
467
- adjust(color, amount, :alpha, 0..1, :+)
468
- end
469
- alias_method :fade_in, :opacify
470
-
471
- # Makes a color more transparent.
472
- # Takes a color and an amount between 0 and 1,
473
- # and returns a color with the opacity decreased by that value.
474
- #
475
- # For example:
476
- #
477
- # transparentize(rgba(0, 0, 0, 0.5), 0.1) => rgba(0, 0, 0, 0.4)
478
- # transparentize(rgba(0, 0, 0, 0.8), 0.2) => rgba(0, 0, 0, 0.6)
479
- #
480
- # @param color [Color]
481
- # @param amount [Number]
482
- # @return [Color]
483
- # @see #opacify
484
- # @raise [ArgumentError] If `color` isn't a color,
485
- # or `number` isn't a number between 0 and 1
486
- def transparentize(color, amount)
487
- adjust(color, amount, :alpha, 0..1, :-)
488
- end
489
- alias_method :fade_out, :transparentize
490
-
491
- # Makes a color lighter.
492
- # Takes a color and an amount between 0% and 100%,
493
- # and returns a color with the lightness increased by that value.
494
- #
495
- # For example:
496
- #
497
- # lighten(hsl(0, 0%, 0%), 30%) => hsl(0, 0, 30)
498
- # lighten(#800, 20%) => #e00
499
- #
500
- # @param color [Color]
501
- # @param amount [Number]
502
- # @return [Color]
503
- # @see #darken
504
- # @raise [ArgumentError] If `color` isn't a color,
505
- # or `number` isn't a number between 0% and 100%
506
- def lighten(color, amount)
507
- adjust(color, amount, :lightness, 0..100, :+, "%")
508
- end
509
-
510
- # Makes a color darker.
511
- # Takes a color and an amount between 0% and 100%,
512
- # and returns a color with the lightness decreased by that value.
513
- #
514
- # For example:
515
- #
516
- # darken(hsl(25, 100%, 80%), 30%) => hsl(25, 100%, 50%)
517
- # darken(#800, 20%) => #200
518
- #
519
- # @param color [Color]
520
- # @param amount [Number]
521
- # @return [Color]
522
- # @see #lighten
523
- # @raise [ArgumentError] If `color` isn't a color,
524
- # or `number` isn't a number between 0% and 100%
525
- def darken(color, amount)
526
- adjust(color, amount, :lightness, 0..100, :-, "%")
527
- end
528
-
529
- # Makes a color more saturated.
530
- # Takes a color and an amount between 0% and 100%,
531
- # and returns a color with the saturation increased by that value.
532
- #
533
- # For example:
534
- #
535
- # saturate(hsl(120, 30%, 90%), 20%) => hsl(120, 50%, 90%)
536
- # saturate(#855, 20%) => #9e3f3f
537
- #
538
- # @param color [Color]
539
- # @param amount [Number]
540
- # @return [Color]
541
- # @see #desaturate
542
- # @raise [ArgumentError] If `color` isn't a color,
543
- # or `number` isn't a number between 0% and 100%
544
- def saturate(color, amount)
545
- adjust(color, amount, :saturation, 0..100, :+, "%")
546
- end
547
-
548
- # Makes a color less saturated.
549
- # Takes a color and an amount between 0% and 100%,
550
- # and returns a color with the saturation decreased by that value.
551
- #
552
- # For example:
553
- #
554
- # desaturate(hsl(120, 30%, 90%), 20%) => hsl(120, 10%, 90%)
555
- # desaturate(#855, 20%) => #726b6b
556
- #
557
- # @param color [Color]
558
- # @param amount [Number]
559
- # @return [Color]
560
- # @see #saturate
561
- # @raise [ArgumentError] If `color` isn't a color,
562
- # or `number` isn't a number between 0% and 100%
563
- def desaturate(color, amount)
564
- adjust(color, amount, :saturation, 0..100, :-, "%")
565
- end
566
-
567
- # Changes the hue of a color while retaining the lightness and saturation.
568
- # Takes a color and a number of degrees (usually between -360deg and 360deg),
569
- # and returns a color with the hue rotated by that value.
570
- #
571
- # For example:
572
- #
573
- # adjust-hue(hsl(120, 30%, 90%), 60deg) => hsl(180, 30%, 90%)
574
- # adjust-hue(hsl(120, 30%, 90%), 060deg) => hsl(60, 30%, 90%)
575
- # adjust-hue(#811, 45deg) => #886a11
576
- #
577
- # @param color [Color]
578
- # @param amount [Number]
579
- # @return [Color]
580
- # @raise [ArgumentError] If `color` isn't a color, or `number` isn't a number
581
- def adjust_hue(color, degrees)
582
- assert_type color, :Color
583
- assert_type degrees, :Number
584
- color.with(:hue => color.hue + degrees.value)
585
- end
586
-
587
- # Mixes together two colors.
588
- # Specifically, takes the average of each of the RGB components,
589
- # optionally weighted by the given percentage.
590
- # The opacity of the colors is also considered when weighting the components.
591
- #
592
- # The weight specifies the amount of the first color that should be included
593
- # in the returned color.
594
- # The default, 50%, means that half the first color
595
- # and half the second color should be used.
596
- # 25% means that a quarter of the first color
597
- # and three quarters of the second color should be used.
598
- #
599
- # For example:
600
- #
601
- # mix(#f00, #00f) => #7f007f
602
- # mix(#f00, #00f, 25%) => #3f00bf
603
- # mix(rgba(255, 0, 0, 0.5), #00f) => rgba(63, 0, 191, 0.75)
604
- #
605
- # @overload mix(color1, color2, weight = 50%)
606
- # @param color1 [Color]
607
- # @param color2 [Color]
608
- # @param weight [Number] between 0% and 100%
609
- # @return [Color]
610
- # @raise [ArgumentError] if `color1` or `color2` aren't colors,
611
- # or `weight` isn't a number between 0% and 100%
612
- def mix(color1, color2, weight = Number.new(50))
613
- assert_type color1, :Color
614
- assert_type color2, :Color
615
- assert_type weight, :Number
616
-
617
- unless (0..100).include?(weight.value)
618
- raise ArgumentError.new("Weight #{weight} must be between 0% and 100%")
619
- end
620
-
621
- # This algorithm factors in both the user-provided weight
622
- # and the difference between the alpha values of the two colors
623
- # to decide how to perform the weighted average of the two RGB values.
624
- #
625
- # It works by first normalizing both parameters to be within [-1, 1],
626
- # where 1 indicates "only use color1", -1 indicates "only use color 0",
627
- # and all values in between indicated a proportionately weighted average.
628
- #
629
- # Once we have the normalized variables w and a,
630
- # we apply the formula (w + a)/(1 + w*a)
631
- # to get the combined weight (in [-1, 1]) of color1.
632
- # This formula has two especially nice properties:
633
- #
634
- # * When either w or a are -1 or 1, the combined weight is also that number
635
- # (cases where w * a == -1 are undefined, and handled as a special case).
636
- #
637
- # * When a is 0, the combined weight is w, and vice versa
638
- #
639
- # Finally, the weight of color1 is renormalized to be within [0, 1]
640
- # and the weight of color2 is given by 1 minus the weight of color1.
641
- p = weight.value/100.0
642
- w = p*2 - 1
643
- a = color1.alpha - color2.alpha
644
-
645
- w1 = (((w * a == -1) ? w : (w + a)/(1 + w*a)) + 1)/2.0
646
- w2 = 1 - w1
647
-
648
- rgb = color1.rgb.zip(color2.rgb).map {|v1, v2| v1*w1 + v2*w2}
649
- alpha = color1.alpha*p + color2.alpha*(1-p)
650
- Color.new(rgb + [alpha])
651
- end
652
-
653
- # Converts a color to grayscale.
654
- # This is identical to `desaturate(color, 100%)`.
655
- #
656
- # @param color [Color]
657
- # @return [Color]
658
- # @raise [ArgumentError] if `color` isn't a color
659
- # @see #desaturate
660
- def grayscale(color)
661
- desaturate color, Number.new(100)
662
- end
663
-
664
- # Returns the complement of a color.
665
- # This is identical to `adjust-hue(color, 180deg)`.
666
- #
667
- # @param color [Color]
668
- # @return [Color]
669
- # @raise [ArgumentError] if `color` isn't a color
670
- # @see #adjust_hue #adjust-hue
671
- def complement(color)
672
- adjust_hue color, Number.new(180)
673
- end
674
-
675
- # Removes quotes from a string if the string is quoted,
676
- # or returns the same string if it's not.
677
- #
678
- # @param str [String]
679
- # @return [String]
680
- # @raise [ArgumentError] if `str` isn't a string
681
- # @see #quote
682
- # @example
683
- # unquote("foo") => foo
684
- # unquote(foo) => foo
685
- def unquote(str)
686
- assert_type str, :String
687
- Sass::Script::String.new(str.value, :identifier)
688
- end
689
-
690
- # Add quotes to a string if the string isn't quoted,
691
- # or returns the same string if it is.
692
- #
693
- # @param str [String]
694
- # @return [String]
695
- # @raise [ArgumentError] if `str` isn't a string
696
- # @see #unquote
697
- # @example
698
- # quote("foo") => "foo"
699
- # quote(foo) => "foo"
700
- def quote(str)
701
- assert_type str, :String
702
- Sass::Script::String.new(str.value, :string)
703
- end
704
-
705
- # Inspects the type of the argument, returning it as an unquoted string.
706
- # For example:
707
- #
708
- # type-of(100px) => number
709
- # type-of(asdf) => string
710
- # type-of("asdf") => string
711
- # type-of(true) => bool
712
- # type-of(#fff) => color
713
- # type-of(blue) => color
714
- #
715
- # @param obj [Literal] The object to inspect
716
- # @return [String] The unquoted string name of the literal's type
717
- def type_of(obj)
718
- Sass::Script::String.new(obj.class.name.gsub(/Sass::Script::/,'').downcase)
719
- end
720
-
721
- # Inspects the unit of the number, returning it as a quoted string.
722
- # Complex units are sorted in alphabetical order by numerator and denominator.
723
- # For example:
724
- #
725
- # unit(100) => ""
726
- # unit(100px) => "px"
727
- # unit(3em) => "em"
728
- # unit(10px * 5em) => "em*px"
729
- # unit(10px * 5em / 30cm / 1rem) => "em*px/cm*rem"
730
- #
731
- # @param number [Literal] The number to inspect
732
- # @return [String] The unit(s) of the number
733
- # @raise [ArgumentError] if `number` isn't a number
734
- def unit(number)
735
- assert_type number, :Number
736
- Sass::Script::String.new(number.unit_str, :string)
737
- end
738
-
739
- # Inspects the unit of the number, returning a boolean indicating if it is unitless.
740
- # For example:
741
- #
742
- # unitless(100) => true
743
- # unitless(100px) => false
744
- #
745
- # @param number [Literal] The number to inspect
746
- # @return [Bool] Whether or not the number is unitless
747
- # @raise [ArgumentError] if `number` isn't a number
748
- def unitless(number)
749
- assert_type number, :Number
750
- Sass::Script::Bool.new(number.unitless?)
751
- end
752
-
753
- # Returns true if two numbers are similar enough to be added, subtracted, or compared.
754
- # For example:
755
- #
756
- # comparable(2px, 1px) => true
757
- # comparable(100px, 3em) => false
758
- # comparable(10cm, 3mm) => true
759
- #
760
- # @param number1 [Number]
761
- # @param number2 [Number]
762
- # @return [Bool] indicating if the numbers can be compared.
763
- # @raise [ArgumentError] if `number1` or `number2` aren't numbers
764
- def comparable(number1, number2)
765
- assert_type number1, :Number
766
- assert_type number2, :Number
767
- Sass::Script::Bool.new(number1.comparable_to?(number2))
768
- end
769
-
770
- # Converts a decimal number to a percentage.
771
- # For example:
772
- #
773
- # percentage(100px / 50px) => 200%
774
- #
775
- # @param value [Number] The decimal number to convert to a percentage
776
- # @return [Number] The percentage
777
- # @raise [ArgumentError] If `value` isn't a unitless number
778
- def percentage(value)
779
- unless value.is_a?(Sass::Script::Number) && value.unitless?
780
- raise ArgumentError.new("#{value.inspect} is not a unitless number")
781
- end
782
- Sass::Script::Number.new(value.value * 100, ['%'])
783
- end
784
-
785
- # Rounds a number to the nearest whole number.
786
- # For example:
787
- #
788
- # round(10.4px) => 10px
789
- # round(10.6px) => 11px
790
- #
791
- # @param value [Number] The number
792
- # @return [Number] The rounded number
793
- # @raise [Sass::SyntaxError] if `value` isn't a number
794
- def round(value)
795
- numeric_transformation(value) {|n| n.round}
796
- end
797
-
798
- # Rounds a number up to the nearest whole number.
799
- # For example:
800
- #
801
- # ciel(10.4px) => 11px
802
- # ciel(10.6px) => 11px
803
- #
804
- # @param value [Number] The number
805
- # @return [Number] The rounded number
806
- # @raise [Sass::SyntaxError] if `value` isn't a number
807
- def ceil(value)
808
- numeric_transformation(value) {|n| n.ceil}
809
- end
810
-
811
- # Rounds down to the nearest whole number.
812
- # For example:
813
- #
814
- # floor(10.4px) => 10px
815
- # floor(10.6px) => 10px
816
- #
817
- # @param value [Number] The number
818
- # @return [Number] The rounded number
819
- # @raise [Sass::SyntaxError] if `value` isn't a number
820
- def floor(value)
821
- numeric_transformation(value) {|n| n.floor}
822
- end
823
-
824
- # Finds the absolute value of a number.
825
- # For example:
826
- #
827
- # abs(10px) => 10px
828
- # abs(-10px) => 10px
829
- #
830
- # @param value [Number] The number
831
- # @return [Number] The absolute value
832
- # @raise [Sass::SyntaxError] if `value` isn't a number
833
- def abs(value)
834
- numeric_transformation(value) {|n| n.abs}
835
- end
836
-
837
- private
838
-
839
- # This method implements the pattern of transforming a numeric value into
840
- # another numeric value with the same units.
841
- # It yields a number to a block to perform the operation and return a number
842
- def numeric_transformation(value)
843
- assert_type value, :Number
844
- Sass::Script::Number.new(yield(value.value), value.numerator_units, value.denominator_units)
845
- end
846
-
847
- def adjust(color, amount, attr, range, op, units = "")
848
- assert_type color, :Color
849
- assert_type amount, :Number
850
- unless range.include?(amount.value)
851
- raise ArgumentError.new("Amount #{amount} must be between #{range.first}#{units} and #{range.last}#{units}")
852
- end
853
-
854
- # TODO: is it worth restricting here,
855
- # or should we do so in the Color constructor itself,
856
- # and allow clipping in rgb() et al?
857
- color.with(attr => Haml::Util.restrict(
858
- color.send(attr).send(op, amount.value), range))
859
- end
860
- end
861
- end