Skip to content
Browse files

upgrading haml gem

  • Loading branch information...
1 parent 0ba6c4b commit 59e2b30cac23e37b7221c8876ada85ffcf25406e @rick committed Jul 23, 2010
Showing with 0 additions and 9,933 deletions.
  1. +0 −253 vendor/gems/haml-2.0.9/.specification
  2. +0 −138 vendor/gems/haml-2.0.9/FAQ
  3. +0 −319 vendor/gems/haml-2.0.9/README.rdoc
  4. +0 −184 vendor/gems/haml-2.0.9/Rakefile
  5. +0 −1 vendor/gems/haml-2.0.9/VERSION
  6. +0 −331 vendor/gems/haml-2.0.9/extra/haml-mode.el
  7. +0 −89 vendor/gems/haml-2.0.9/extra/sass-mode.el
  8. +0 −8 vendor/gems/haml-2.0.9/init.rb
  9. +0 −1,018 vendor/gems/haml-2.0.9/lib/haml.rb
  10. +0 −240 vendor/gems/haml-2.0.9/lib/haml/buffer.rb
  11. +0 −265 vendor/gems/haml-2.0.9/lib/haml/engine.rb
  12. +0 −374 vendor/gems/haml-2.0.9/lib/haml/exec.rb
  13. +0 −276 vendor/gems/haml-2.0.9/lib/haml/filters.rb
  14. +0 −465 vendor/gems/haml-2.0.9/lib/haml/helpers.rb
  15. +0 −45 vendor/gems/haml-2.0.9/lib/haml/helpers/action_view_extensions.rb
  16. +0 −181 vendor/gems/haml-2.0.9/lib/haml/helpers/action_view_mods.rb
  17. +0 −222 vendor/gems/haml-2.0.9/lib/haml/html.rb
  18. +0 −811 vendor/gems/haml-2.0.9/lib/haml/precompiler.rb
  19. +0 −51 vendor/gems/haml-2.0.9/lib/haml/template.rb
  20. +0 −23 vendor/gems/haml-2.0.9/lib/haml/util.rb
  21. +0 −47 vendor/gems/haml-2.0.9/lib/haml/version.rb
  22. +0 −873 vendor/gems/haml-2.0.9/lib/sass.rb
  23. +0 −216 vendor/gems/haml-2.0.9/lib/sass/constant.rb
  24. +0 −101 vendor/gems/haml-2.0.9/lib/sass/constant/color.rb
  25. +0 −54 vendor/gems/haml-2.0.9/lib/sass/constant/literal.rb
  26. +0 −9 vendor/gems/haml-2.0.9/lib/sass/constant/nil.rb
  27. +0 −87 vendor/gems/haml-2.0.9/lib/sass/constant/number.rb
  28. +0 −30 vendor/gems/haml-2.0.9/lib/sass/constant/operation.rb
  29. +0 −22 vendor/gems/haml-2.0.9/lib/sass/constant/string.rb
  30. +0 −394 vendor/gems/haml-2.0.9/lib/sass/css.rb
  31. +0 −466 vendor/gems/haml-2.0.9/lib/sass/engine.rb
  32. +0 −35 vendor/gems/haml-2.0.9/lib/sass/error.rb
  33. +0 −169 vendor/gems/haml-2.0.9/lib/sass/plugin.rb
  34. +0 −56 vendor/gems/haml-2.0.9/lib/sass/plugin/merb.rb
  35. +0 −24 vendor/gems/haml-2.0.9/lib/sass/plugin/rails.rb
  36. +0 −57 vendor/gems/haml-2.0.9/lib/sass/tree/attr_node.rb
  37. +0 −20 vendor/gems/haml-2.0.9/lib/sass/tree/comment_node.rb
  38. +0 −46 vendor/gems/haml-2.0.9/lib/sass/tree/directive_node.rb
  39. +0 −46 vendor/gems/haml-2.0.9/lib/sass/tree/node.rb
  40. +0 −93 vendor/gems/haml-2.0.9/lib/sass/tree/rule_node.rb
  41. +0 −20 vendor/gems/haml-2.0.9/lib/sass/tree/value_node.rb
  42. +0 −657 vendor/gems/haml-2.0.9/test/haml/engine_test.rb
  43. +0 −92 vendor/gems/haml-2.0.9/test/haml/html2haml_test.rb
  44. +0 −204 vendor/gems/haml-2.0.9/test/haml/template_test.rb
  45. +0 −3 vendor/gems/haml-2.0.9/test/haml/templates/partial_layout.haml
  46. +0 −12 vendor/gems/haml-2.0.9/test/linked_rails.rb
  47. +0 −193 vendor/gems/haml-2.0.9/test/sass/css2sass_test.rb
  48. +0 −294 vendor/gems/haml-2.0.9/test/sass/engine_test.rb
  49. +0 −161 vendor/gems/haml-2.0.9/test/sass/plugin_test.rb
  50. +0 −1 vendor/gems/haml-2.0.9/test/sass/results/compressed.css
  51. +0 −16 vendor/gems/haml-2.0.9/test/sass/results/constants.css
  52. +0 −1 vendor/gems/haml-2.0.9/test/sass/results/subdir/subdir.css
  53. +0 −2 vendor/gems/haml-2.0.9/test/sass/templates/bork.sass
  54. +0 −100 vendor/gems/haml-2.0.9/test/sass/templates/constants.sass
  55. +0 −11 vendor/gems/haml-2.0.9/test/sass/templates/import.sass
  56. +0 −14 vendor/gems/haml-2.0.9/test/sass/templates/importee.sass
  57. +0 −13 vendor/gems/haml-2.0.9/test/test_helper.rb
Sorry, we could not display the entire diff because too many files (509) changed.
View
253 vendor/gems/haml-2.0.9/.specification
@@ -1,253 +0,0 @@
---- !ruby/object:Gem::Specification
-name: haml
-version: !ruby/object:Gem::Version
- hash: 29
- segments:
- - 2
- - 0
- - 9
- version: 2.0.9
-platform: ruby
-authors:
-- Nathan Weizenbaum
-- Hampton Catlin
-autorequire:
-bindir: bin
-cert_chain: []
-
-date: 2009-02-21 00:00:00 -06:00
-default_executable:
-dependencies: []
-
-description: Haml (HTML Abstraction Markup Language) is a layer on top of XHTML or XML that's designed to express the structure of XHTML or XML documents in a non-repetitive, elegant, easy way, using indentation rather than closing tags and allowing Ruby to be embedded with ease. It was originally envisioned as a plugin for Ruby on Rails, but it can function as a stand-alone templating engine.
-email: haml@googlegroups.com
-executables:
-- haml
-- html2haml
-- sass
-- css2sass
-extensions: []
-
-extra_rdoc_files:
-- FAQ
-- MIT-LICENSE
-- VERSION
-- README.rdoc
-- REVISION
-files:
-- rails/init.rb
-- lib/sass.rb
-- lib/sass
-- lib/sass/css.rb
-- lib/sass/error.rb
-- lib/sass/tree
-- lib/sass/tree/comment_node.rb
-- lib/sass/tree/node.rb
-- lib/sass/tree/value_node.rb
-- lib/sass/tree/directive_node.rb
-- lib/sass/tree/attr_node.rb
-- lib/sass/tree/rule_node.rb
-- lib/sass/plugin
-- lib/sass/plugin/rails.rb
-- lib/sass/plugin/merb.rb
-- lib/sass/constant.rb
-- lib/sass/engine.rb
-- lib/sass/plugin.rb
-- lib/sass/constant
-- lib/sass/constant/number.rb
-- lib/sass/constant/operation.rb
-- lib/sass/constant/literal.rb
-- lib/sass/constant/color.rb
-- lib/sass/constant/string.rb
-- lib/sass/constant/nil.rb
-- lib/haml
-- lib/haml/filters.rb
-- lib/haml/exec.rb
-- lib/haml/error.rb
-- lib/haml/template.rb
-- lib/haml/engine.rb
-- lib/haml/version.rb
-- lib/haml/template
-- lib/haml/template/patch.rb
-- lib/haml/template/plugin.rb
-- lib/haml/helpers.rb
-- lib/haml/buffer.rb
-- lib/haml/html.rb
-- lib/haml/precompiler.rb
-- lib/haml/util.rb
-- lib/haml/helpers
-- lib/haml/helpers/action_view_mods.rb
-- lib/haml/helpers/action_view_extensions.rb
-- lib/haml.rb
-- bin/sass
-- bin/css2sass
-- bin/html2haml
-- bin/haml
-- test/linked_rails.rb
-- test/benchmark.rb
-- test/sass
-- test/sass/css2sass_test.rb
-- test/sass/results
-- test/sass/results/constants.css
-- test/sass/results/parent_ref.css
-- test/sass/results/compressed.css
-- test/sass/results/complex.css
-- test/sass/results/compact.css
-- test/sass/results/mixins.css
-- test/sass/results/alt.css
-- test/sass/results/subdir
-- test/sass/results/subdir/subdir.css
-- test/sass/results/subdir/nested_subdir
-- test/sass/results/subdir/nested_subdir/nested_subdir.css
-- test/sass/results/nested.css
-- test/sass/results/import.css
-- test/sass/results/multiline.css
-- test/sass/results/basic.css
-- test/sass/results/expanded.css
-- test/sass/templates
-- test/sass/templates/basic.sass
-- test/sass/templates/bork.sass
-- test/sass/templates/compressed.sass
-- test/sass/templates/import.sass
-- test/sass/templates/constants.sass
-- test/sass/templates/expanded.sass
-- test/sass/templates/nested.sass
-- test/sass/templates/_partial.sass
-- test/sass/templates/compact.sass
-- test/sass/templates/subdir
-- test/sass/templates/subdir/subdir.sass
-- test/sass/templates/subdir/nested_subdir
-- test/sass/templates/subdir/nested_subdir/nested_subdir.sass
-- test/sass/templates/parent_ref.sass
-- test/sass/templates/alt.sass
-- test/sass/templates/importee.sass
-- test/sass/templates/mixins.sass
-- test/sass/templates/multiline.sass
-- test/sass/templates/complex.sass
-- test/sass/templates/bork2.sass
-- test/sass/engine_test.rb
-- test/sass/plugin_test.rb
-- test/haml
-- test/haml/mocks
-- test/haml/mocks/article.rb
-- test/haml/rhtml
-- test/haml/rhtml/_av_partial_2.rhtml
-- test/haml/rhtml/standard.rhtml
-- test/haml/rhtml/_av_partial_1.rhtml
-- test/haml/rhtml/action_view.rhtml
-- test/haml/html2haml_test.rb
-- test/haml/template_test.rb
-- test/haml/helper_test.rb
-- test/haml/results
-- test/haml/results/tag_parsing.xhtml
-- test/haml/results/content_for_layout.xhtml
-- test/haml/results/helpers.xhtml
-- test/haml/results/original_engine.xhtml
-- test/haml/results/very_basic.xhtml
-- test/haml/results/helpful.xhtml
-- test/haml/results/list.xhtml
-- test/haml/results/partials.xhtml
-- test/haml/results/eval_suppressed.xhtml
-- test/haml/results/nuke_inner_whitespace.xhtml
-- test/haml/results/whitespace_handling.xhtml
-- test/haml/results/render_layout.xhtml
-- test/haml/results/silent_script.xhtml
-- test/haml/results/standard.xhtml
-- test/haml/results/just_stuff.xhtml
-- test/haml/results/partial_layout.xhtml
-- test/haml/results/filters.xhtml
-- test/haml/results/nuke_outer_whitespace.xhtml
-- test/haml/markaby
-- test/haml/markaby/standard.mab
-- test/haml/templates
-- test/haml/templates/tag_parsing.haml
-- test/haml/templates/nuke_inner_whitespace.haml
-- test/haml/templates/partial_layout.haml
-- test/haml/templates/_av_partial_2_ugly.haml
-- test/haml/templates/partials.haml
-- test/haml/templates/_layout_for_partial.haml
-- test/haml/templates/original_engine.haml
-- test/haml/templates/helpers.haml
-- test/haml/templates/_layout.erb
-- test/haml/templates/action_view_ugly.haml
-- test/haml/templates/content_for_layout.haml
-- test/haml/templates/silent_script.haml
-- test/haml/templates/very_basic.haml
-- test/haml/templates/render_layout.haml
-- test/haml/templates/filters.haml
-- test/haml/templates/_av_partial_1.haml
-- test/haml/templates/standard_ugly.haml
-- test/haml/templates/_partial.haml
-- test/haml/templates/nuke_outer_whitespace.haml
-- test/haml/templates/breakage.haml
-- test/haml/templates/list.haml
-- test/haml/templates/standard.haml
-- test/haml/templates/whitespace_handling.haml
-- test/haml/templates/eval_suppressed.haml
-- test/haml/templates/action_view.haml
-- test/haml/templates/_av_partial_2.haml
-- test/haml/templates/partialize.haml
-- test/haml/templates/just_stuff.haml
-- test/haml/templates/helpful.haml
-- test/haml/templates/_av_partial_1_ugly.haml
-- test/haml/templates/_text_area.haml
-- test/haml/engine_test.rb
-- test/test_helper.rb
-- test/rails
-- extra/haml-mode.el
-- extra/sass-mode.el
-- Rakefile
-- init.rb
-- FAQ
-- MIT-LICENSE
-- VERSION
-- README.rdoc
-- REVISION
-has_rdoc: true
-homepage: http://haml.hamptoncatlin.com/
-licenses:
-post_install_message:
-rdoc_options:
-- --title
-- Haml
-- --main
-- README.rdoc
-- --exclude
-- lib/haml/buffer.rb
-- --line-numbers
-- --inline-source
-require_paths:
-- lib
-required_ruby_version: !ruby/object:Gem::Requirement
- requirements:
- - - ">="
- - !ruby/object:Gem::Version
- hash: 3
- segments:
- - 0
- version: "0"
- version:
-required_rubygems_version: !ruby/object:Gem::Requirement
- requirements:
- - - ">="
- - !ruby/object:Gem::Version
- hash: 3
- segments:
- - 0
- version: "0"
- version:
-requirements: []
-
-rubyforge_project: haml
-rubygems_version: 1.3.7
-signing_key:
-specification_version: 2
-summary: An elegant, structured XHTML/XML templating engine. Comes with Sass, a similar CSS templating engine.
-test_files:
-- test/sass/css2sass_test.rb
-- test/sass/engine_test.rb
-- test/sass/plugin_test.rb
-- test/haml/html2haml_test.rb
-- test/haml/template_test.rb
-- test/haml/helper_test.rb
-- test/haml/engine_test.rb
View
138 vendor/gems/haml-2.0.9/FAQ
@@ -1,138 +0,0 @@
-= Frequently Asked Questions
-
-== Haml
-
-=== How do I put a punctuation mark after an element, like "<tt>I like <strong>cake</strong>!</tt>"?
-
-Expressing the structure of a document
-and expressing inline formatting are two very different problems.
-Haml is mostly designed for structure,
-so the best way to deal with formatting is to leave it to other languages
-that are designed for it.
-You could use Textile:
-
- %p
- :textile
- I like *cake*!
-
-or Markdown:
-
- %p
- :markdown
- I like **cake**!
-
-or plain old XHTML:
-
- %p I like <strong>cake</strong>!
-
-If you're inserting something that's generated by a helper, like a link,
-then it's even easier:
-
- %p== I like #{link_to 'chocolate', 'http://franschocolates.com'}!
-
-=== How do I stop Haml from indenting the contents of my +pre+ and +textarea+ tags?
-
-Because Haml automatically indents the HTML source code,
-the contents of whitespace-sensitive tags like +pre+ and +textarea+
-can get screwed up.
-The solution is to replace the newlines inside these tags
-with HTML newline entities (<tt>&#x000A;</tt>),
-which Haml does using the Haml::Helpers#preserve and Haml::Helpers#find_and_preserve helpers.
-
-Normally, Haml will do this for you automatically
-when you're using a tag that needs it
-(this can be customized using the <tt>:preserve</tt> option;
-see the Options section of the {Haml reference}(../classes/Haml.html)).
-For example,
-
- %p
- %textarea= "Foo\nBar"
-
-will be compiled to
-
- <p>
- <textarea>Foo&#x000A;Bar</textarea>
- </p>
-
-However, if a helper is generating the tag,
-Haml can't detect that and so you'll have to call +find_and_preserve+ yourself.
-You can also use <tt>~</tt>, which is the same as <tt>=</tt>
-except that it automatically runs +find_and_preserve+ on its input.
-For example:
-
- %p= find_and_preserve "<textarea>Foo\nBar</textarea>"
-
-is the same as
-
- %p~ "<textarea>Foo\nBar</textarea>"
-
-and renders
-
- <p><textarea>Foo&#x000A;Bar</textarea></p>
-
-=== How do I make my long lines of Ruby code look nicer in my Haml document?
-
-Put them in a helper or your model.
-
-Haml purposefully makes it annoying to put lots of Ruby code into your templates,
-because lots of code doesn't belong in the view.
-If you take that huge +link_to_remote+ call
-and move it to a +update_sidebar_link+ helper,
-it'll make your view both easier to read and more semantic.
-
-If you absolutely must put lots of code in your template,
-Haml offers a somewhat awkward multiline-continuation tool.
-Put a <tt>|</tt> (pipe character) at the end of each line you want to be merged into one
-(including the last line!).
-For example:
-
- %p= @this.is(way.too.much). |
- code("and I should"). |
- really_move.it.into( |
- :a => @helper) |
-
-=== I have Haml installed. Why is Rails (only looking for <tt>.html.erb</tt> files | rendering Haml files as plain text | rendering Haml files as blank pages)?
-
-There are several reasons these things might be happening.
-First of all, make sure vendor/plugins/haml really exists
-and has an init.rb file in there.
-Then try restarting Mongrel or WEBrick or whatever you might be using.
-
-Finally, if none of these work,
-chances are you've got some localization plugin like Globalize installed.
-Such plugins often don't play nicely with Haml.
-Luckily, there's usually an easy fix.
-For Globalize, just edit globalize/lib/globalize/rails/action_view.rb
-and change
-
- @@re_extension = /\.(rjs|rhtml|rxml)$/
-
-to
-
- @@re_extension = /\.(rjs|rhtml|rxml|erb|builder|haml)$/
-
-For other plugins, a little searching will probably turn up a way to fix them as well.
-
-== Sass
-
-=== Can I use a variable from my controller in my Sass file?
-
-No. Sass files aren't views.
-They're compiled once into static CSS files,
-then left along until they're changed and need to be compiled again.
-Not only don't you want to be running a full request cycle
-every time someone requests a stylesheet,
-but it's not a great idea to put much logic in there anyway
-due to how browsers handle them.
-
-If you really need some sort of dynamic CSS,
-the best thing to do is put only the snippet you need to dynamically set
-in the +head+ of your HTML document.
-
-== You still haven't answered my question!
-
-Sorry! Try looking at the Haml or Sass references,
-in the doucmentation for the haml and Sass modules, respectively.
-If you can't find an answer there,
-feel free to ask in #haml on irc.freenode.net
-or send an email to the {mailing list}[http://groups.google.com/group/haml?hl=en].
View
0 vendor/gems/haml-2.0.9/MIT-LICENSE
Sorry, we could not display the changes to this file because there were too many other changes to display.
View
319 vendor/gems/haml-2.0.9/README.rdoc
@@ -1,319 +0,0 @@
-= Haml and Sass
-
-Haml and Sass are templating engines
-for the two most common types of documents on the web:
-HTML and CSS, respectively.
-They are designed to make it both easier and more pleasant
-to code HTML and CSS documents,
-by eliminating redundancy,
-reflecting the underlying structure that the document represents,
-and providing elegant, easily understandable, and powerful syntax.
-
-== Using
-
-There are several ways to use Haml and Sass.
-They can be used as a plugin for Rails or Merb,
-or embedded on their own in other applications.
-The first step of all of these is to install the Haml gem:
-
- gem install haml
-
-To install Haml and Sass as a Rails plugin,
-just run <tt>haml --rails path/to/rails/app</tt>
-and both Haml and Sass will be installed.
-Views with the <tt>.haml</tt> (or <tt>.html.haml</tt> for edge)
-extension will automatically use Haml.
-Sass is a little more complicated;
-<tt>.sass</tt> files should be placed in public/stylesheets/sass,
-where they'll be automatically compiled
-to corresponding CSS files in public/stylesheets when needed
-(the Sass template directory is customizable...
-see the Sass module docs for details).
-
-For Merb, <tt>.html.haml</tt> views will work without any further modification.
-To enable Sass, you also need to add a dependency.
-To do so, just add
-
- dependency "merb-haml"
-
-to config/dependencies.rb (or config/init.rb in a flat/very flat Merb application).
-Then it'll work just like it does in Rails.
-
-To use Haml and Sass programatically,
-check out the RDocs for the Haml and Sass modules.
-
-== Formatting
-
-=== Haml
-
-The most basic element of Haml
-is a shorthand for creating HTML tags:
-
- %tagname{ :attr1 => 'value1', :attr2 => 'value2' } Contents
-
-No end-tag is needed; Haml handles that automatically.
-Adding <tt>class</tt> and <tt>id</tt> attributes is even easier.
-Haml uses the same syntax as the CSS that styles the document:
-
- %tagname#id.class
-
-In fact, when you're using the <tt><div></tt> tag,
-it becomes <em>even easier</em>.
-Because <tt><div></tt> is such a common element,
-a tag without a name defaults to a div. So
-
- #foo Hello!
-
-becomes
-
- <div id='foo'>Hello!</div>
-
-Haml uses indentation
-to bring the individual elements to represent the HTML structure.
-A tag's children are indented two spaces more than the parent tag.
-Again, a closing tag is automatically added.
-For example:
-
- %ul
- %li Salt
- %li Pepper
-
-becomes:
-
- <ul>
- <li>Salt</li>
- <li>Pepper</li>
- </ul>
-
-You can also put plain text as a child of an element:
-
- %p
- Hello,
- World!
-
-It's even possible to embed Ruby code into Haml documents.
-An equals sign, <tt>=</tt>, will output the result of the code.
-A hyphen, <tt>-</tt>, will run the code but not output the result.
-You can even use control statements
-like <tt>if</tt> and <tt>while</tt>:
-
- %p
- Date/Time:
- - now = DateTime.now
- %strong= now
- - if now > DateTime.parse("December 31, 2006")
- = "Happy new " + "year!"
-
-Haml provides far more tools than those presented here.
-Check out the reference documentation in the Haml module.
-
-=== Sass
-
-At its most basic,
-Sass is just another way of writing CSS.
-Although it's very much like normal CSS,
-the basic syntax offers a few helpful features:
-tabulation (using *two spaces*)
-indicates the attributes in a rule,
-rather than non-DRY brackets;
-and newlines indicate the end of an attribute,
-rather than a semicolon.
-For example:
-
- #main
- :background-color #f00
- :width 98%
-
-becomes:
-
- #main {
- background-color: #f00;
- width: 98% }
-
-However, Sass provides much more than a way to make CSS look nice.
-In CSS, it's important to have accurate selectors,
-so your styles don't just apply to everything.
-However, in order to do this,
-you need to use nested element selectors.
-These get very ugly very quickly.
-I'm sure everyone's had to write something like
-"#main .sidebar .top p h1 a",
-followed by
-"#main .sidebar .top p h1 a:visited" and
-"#main .sidebar .top p h1 a:hover".
-Well, Sass gets rid of that.
-Like Haml, it uses indentation to indicate the structure of the document.
-So, what was:
-
- #main {
- width: 90%;
- }
- #main p {
- border-style: solid;
- border-width: 1px;
- border-color: #00f;
- }
- #main p a {
- text-decoration: none;
- font-weight: bold;
- }
- #main p a:hover {
- text-decoration: underline;
- }
-
-becomes:
-
- #main
- :width 90%
- p
- :border-style solid
- :border-width 1px
- :border-color #00f
- a
- :text-decoration none
- :font-weight bold
- a:hover
- :text-decoration underline
-
-Pretty nice, no? Well, it gets better.
-One of the main complaints against CSS is that it doesn't allow constants.
-What if have a color or a width you re-use all the time?
-In CSS, you just have to re-type it each time,
-which is a nightmare when you decide to change it later.
-Not so for Sass!
-You can use the "!" character to set constants.
-Then, if you put "=" after your attribute name,
-you can set it to a constant.
-For example:
-
- !note_bg= #55aaff
-
- #main
- :width 70%
- .note
- :background-color= !note_bg
- p
- :width 5em
- :background-color= !note_bg
-
-becomes:
-
- #main {
- width: 70%; }
- #main .note {
- background-color: #55aaff; }
- #main p {
- width: 5em;
- background-color: #55aaff; }
-
-You can even do simple arithmetic operations with constants,
-adding numbers and even colors together:
-
- !main_bg= #46ar12
- !main_width= 40em
-
- #main
- :background-color= !main_bg
- :width= !main_width
- .sidebar
- :background-color= !main_bg + #333333
- :width= !main_width - 25em
-
-becomes:
-
- #main {
- background-color: #46a312;
- width: 40em; }
- #main .sidebar {
- background-color: #79d645;
- width: 15em; }
-
-Taking the idea of constants a bit further are mixins.
-These let you group whole swathes of CSS attributes into a single
-directive and then include those anywhere you want:
-
- =blue-border
- :border
- :color blue
- :width 2px
- :style dotted
-
- .comment
- +blue-border
- :padding 2px
- :margin 10px 0
-
- .reply
- +blue-border
-
-becomes:
-
- .comment {
- border-color: blue;
- border-width: 2px;
- border-style: dotted;
- padding: 2px;
- margin: 10px 0;
- }
-
- .reply {
- border-color: blue;
- border-width: 2px;
- border-style: dotted;
- }
-
-A comprehensive list of features is in
-the documentation for the Sass module.
-
-== Executables
-
-The Haml gem includes several executables that are useful
-for dealing with Haml and Sass from the command line.
-
-=== +haml+
-
-The +haml+ executable transforms a source Haml file into HTML.
-See <tt>haml --help</tt> for further information and options.
-
-=== +sass+
-
-The +sass+ executable transforms a source Sass file into CSS.
-See <tt>sass --help</tt> for further information and options.
-
-=== <tt>html2haml</tt>
-
-The <tt>html2haml</tt> executable attempts to transform HTML,
-optionally with ERB markup, into Haml code.
-Since HTML is so variable, this transformation is not always perfect;
-it's a good idea to have a human check the output of this tool.
-See <tt>html2haml --help</tt> for further information and options.
-
-=== <tt>css2sass</tt>
-
-The <tt>css2sass</tt> executable attempts to transform CSS into Sass code.
-This transformation attempts to use Sass nesting where possible.
-See <tt>css2sass --help</tt> for further information and options.
-
-== Authors
-
-Haml and Sass are designed by Hampton Catlin (hcatlin) and he is the author
-of the original implementation. However, Hampton doesn't even know his way
-around the code anymore and mostly just concentrates on the language issues.
-Hampton lives in Toronto, Ontario (though he's an American by birth) and
-is a partner at Unspace Interactive.
-
-Nathan Weizenbaum is the primary maintainer and architect of the "modern" Ruby
-implementation of Haml. His hard work has kept the project alive by endlessly
-answering forum posts, fixing bugs, refactoring, finding speed improvements,
-writing documentation, implementing new features, and getting Hampton
-coffee (a fitting task for a boy-genius). Nathan lives in Seattle, Washington and
-while not being a student at University of Washington he consults for
-Unspace Interactive and Microsoft.
-
-If you use this software, you must pay Hampton a compliment. And
-buy Nathan some jelly beans. Maybe pet a kitten. Yeah. Pet that kitty.
-
-Some of the work on Haml was supported by Unspace Interactive.
-
-Beyond that, the implementation is licensed under the MIT License.
-Ok, fine, I guess that means compliments aren't *required*.
View
0 vendor/gems/haml-2.0.9/REVISION
Sorry, we could not display the changes to this file because there were too many other changes to display.
View
184 vendor/gems/haml-2.0.9/Rakefile
@@ -1,184 +0,0 @@
-require 'rubygems'
-require 'rake'
-
-# ----- Benchmarking -----
-
-desc <<END
-Benchmark haml against ERb.
- TIMES=n sets the number of runs. Defaults to 1000.
-END
-task :benchmark do
- sh "ruby test/benchmark.rb #{ENV['TIMES']}"
-end
-
-# ----- Default: Testing ------
-
-if ENV["RUN_CODE_RUN"] == "true"
- task :default => :"test:rails_compatibility"
-else
- task :default => :test
-end
-
-require 'rake/testtask'
-
-Rake::TestTask.new do |t|
- t.libs << 'lib'
- test_files = FileList['test/**/*_test.rb']
- test_files.exclude('test/rails/*')
- t.test_files = test_files
- t.verbose = true
-end
-Rake::Task[:test].send(:add_comment, <<END)
-To run with an alternate version of Rails, make test/rails a symlink to that version.
-END
-
-# ----- Packaging -----
-
-require 'rake/gempackagetask'
-load 'haml.gemspec'
-
-Rake::GemPackageTask.new(HAML_GEMSPEC) do |pkg|
- if Rake.application.top_level_tasks.include?('release')
- pkg.need_tar_gz = true
- pkg.need_tar_bz2 = true
- pkg.need_zip = true
- end
-end
-
-task :revision_file do
- require 'lib/haml'
-
- if Haml.version[:rev] && !Rake.application.top_level_tasks.include?('release')
- File.open('REVISION', 'w') { |f| f.puts Haml.version[:rev] }
- elsif Rake.application.top_level_tasks.include?('release')
- File.open('REVISION', 'w') { |f| f.puts "(release)" }
- else
- File.open('REVISION', 'w') { |f| f.puts "(unknown)" }
- end
-end
-Rake::Task[:package].prerequisites.insert(0, :revision_file)
-
-# We also need to get rid of this file after packaging.
-at_exit { File.delete('REVISION') rescue nil }
-
-desc "Install Haml as a gem."
-task :install => [:package] do
- sudo = RUBY_PLATFORM =~ /win32/ ? '' : 'sudo'
- sh %{#{sudo} gem install --no-ri pkg/haml-#{File.read('VERSION').strip}}
-end
-
-desc "Release a new Haml package to Rubyforge. Requires the NAME and VERSION flags."
-task :release => [:package] do
- name, version = ENV['NAME'], ENV['VERSION']
- raise "Must supply NAME and VERSION for release task." unless name && version
- sh %{rubyforge login}
- sh %{rubyforge add_release haml haml "#{name} (v#{version})" pkg/haml-#{version}.gem}
- sh %{rubyforge add_file haml haml "#{name} (v#{version})" pkg/haml-#{version}.tar.gz}
- sh %{rubyforge add_file haml haml "#{name} (v#{version})" pkg/haml-#{version}.tar.bz2}
- sh %{rubyforge add_file haml haml "#{name} (v#{version})" pkg/haml-#{version}.zip}
-end
-
-# ----- Documentation -----
-
-begin
- require 'hanna/rdoctask'
-rescue LoadError
- require 'rake/rdoctask'
-end
-
-Rake::RDocTask.new do |rdoc|
- rdoc.title = 'Haml/Sass'
- rdoc.options << '--line-numbers' << '--inline-source'
- rdoc.rdoc_files.include(*FileList.new('*') do |list|
- list.exclude(/(^|[^.a-z])[a-z]+/)
- list.exclude('TODO')
- end.to_a)
- rdoc.rdoc_files.include('lib/**/*.rb')
- rdoc.rdoc_files.exclude('TODO')
- rdoc.rdoc_files.exclude('lib/haml/buffer.rb')
- rdoc.rdoc_files.exclude('lib/sass/tree/*')
- rdoc.rdoc_dir = 'rdoc'
- rdoc.main = 'README.rdoc'
-end
-
-# ----- Coverage -----
-
-begin
- require 'rcov/rcovtask'
-
- Rcov::RcovTask.new do |t|
- t.test_files = FileList['test/**/*_test.rb']
- t.rcov_opts << '-x' << '"^\/"'
- if ENV['NON_NATIVE']
- t.rcov_opts << "--no-rcovrt"
- end
- t.verbose = true
- end
-rescue LoadError; end
-
-# ----- Profiling -----
-
-begin
- require 'ruby-prof'
-
- desc <<END
-Run a profile of haml.
- ENGINE=str sets the engine to be profiled. Defaults to Haml.
- TIMES=n sets the number of runs. Defaults to 1000.
- FILE=str sets the file to profile.
- Defaults to 'standard' for Haml and 'complex' for Sass.
- OUTPUT=str sets the ruby-prof output format.
- Can be Flat, CallInfo, or Graph. Defaults to Flat. Defaults to Flat.
-END
- task :profile do
- engine = (ENV['ENGINE'] || 'haml').downcase
- times = (ENV['TIMES'] || '1000').to_i
- file = ENV['FILE']
-
- if engine == 'sass'
- require 'lib/sass'
-
- file = File.read("#{File.dirname(__FILE__)}/test/sass/templates/#{file || 'complex'}.sass")
- result = RubyProf.profile { times.times { Sass::Engine.new(file).render } }
- else
- require 'lib/haml'
-
- file = File.read("#{File.dirname(__FILE__)}/test/haml/templates/#{file || 'standard'}.haml")
- obj = Object.new
- Haml::Engine.new(file).def_method(obj, :render)
- result = RubyProf.profile { times.times { obj.render } }
- end
-
- RubyProf.const_get("#{(ENV['OUTPUT'] || 'Flat').capitalize}Printer").new(result).print
- end
-rescue LoadError; end
-
-# ----- Testing Multiple Rails Versions -----
-
-rails_versions = [
- "v2.3.0",
- "v2.2.2",
- "v2.1.2",
- "v2.0.5"
-]
-
-namespace :test do
- desc "Test all supported versions of rails. This takes a while."
- task :rails_compatibility do
- `rm -rf test/rails`
- puts "Checking out rails. Please wait."
- `git clone git://github.com/rails/rails.git test/rails` rescue nil
- begin
- rails_versions.each do |version|
- Dir.chdir "test/rails" do
- `git checkout #{version}`
- end
- puts "Testing Rails #{version}"
- Rake::Task['test'].reenable
- Rake::Task['test'].execute
- end
- ensure
- `rm -rf test/rails`
- end
- end
-end
View
1 vendor/gems/haml-2.0.9/VERSION
@@ -1 +0,0 @@
-2.0.9
View
0 vendor/gems/haml-2.0.9/bin/css2sass
Sorry, we could not display the changes to this file because there were too many other changes to display.
View
0 vendor/gems/haml-2.0.9/bin/haml
Sorry, we could not display the changes to this file because there were too many other changes to display.
View
0 vendor/gems/haml-2.0.9/bin/html2haml
Sorry, we could not display the changes to this file because there were too many other changes to display.
View
0 vendor/gems/haml-2.0.9/bin/sass
Sorry, we could not display the changes to this file because there were too many other changes to display.
View
331 vendor/gems/haml-2.0.9/extra/haml-mode.el
@@ -1,331 +0,0 @@
-;;; haml-mode.el -- Major mode for editing Haml files
-;;; Written by Nathan Weizenbaum
-
-;;; Because Haml's indentation schema is similar
-;;; to that of YAML and Python, many indentation-related
-;;; functions are similar to those in yaml-mode and python-mode.
-
-;;; To install, save this somewhere and add the following to your .emacs file:
-;;;
-;;; (add-to-list 'load-path "/path/to/haml-mode.el")
-;;; (require 'haml-mode nil 't)
-;;; (add-to-list 'auto-mode-alist '("\\.haml$" . haml-mode))
-;;;
-
-;;; Code:
-
-(eval-when-compile (require 'cl))
-
-;; User definable variables
-
-(defgroup haml nil
- "Support for the Haml template language."
- :group 'languages
- :prefix "haml-")
-
-(defcustom haml-mode-hook nil
- "Hook run when entering Haml mode."
- :type 'hook
- :group 'haml)
-
-(defcustom haml-indent-offset 2
- "Amount of offset per level of indentation."
- :type 'integer
- :group 'haml)
-
-(defcustom haml-backspace-backdents-nesting t
- "Non-nil to have `haml-electric-backspace' re-indent all code
-nested beneath the backspaced line be re-indented along with the
-line itself."
- :type 'boolean
- :group 'haml)
-
-(defface haml-tab-face
- '((((class color)) (:background "hotpink"))
- (t (:reverse-video t)))
- "Face to use for highlighting tabs in Haml files."
- :group 'faces
- :group 'haml)
-
-(defvar haml-indent-function 'haml-indent-p
- "This function should look at the current line and return true
-if the next line could be nested within this line.")
-
-(defvar haml-block-openers
- `("^ *\\([%\\.#][^ \t]*\\)\\(\\[.*\\]\\)?\\({.*}\\)?\\(\\[.*\\]\\)?[ \t]*$"
- "^ *[-=].*do[ \t]*\\(|.*|[ \t]*\\)?$"
- ,(concat "^ *-[ \t]*\\("
- (regexp-opt '("else" "elsif" "rescue" "ensure" "when"))
- "\\)")
- "^ */\\(\\[.*\\]\\)?[ \t]*$"
- "^ *-#"
- "^ *:")
- "A list of regexps that match lines of Haml that could have
-text nested beneath them.")
-
-;; Font lock
-
-(defconst haml-font-lock-keywords
- '(("^ *\\(\t\\)" 1 'haml-tab-face)
- ("^!!!.*" 0 font-lock-constant-face)
- ("\\('[^']*'\\)" 1 font-lock-string-face append)
- ("\\(\"[^\"]*\"\\)" 1 font-lock-string-face append)
- ("&?:\\w+" 0 font-lock-constant-face append)
- ("@[a-z0-9_]+" 0 font-lock-variable-name-face append)
- ("| *$" 0 font-lock-string-face)
- ("^[ \t]*\\(/.*\\)$" 1 font-lock-comment-face append)
- ("^ *\\(#[a-z0-9_]+\/?\\)" 1 font-lock-keyword-face)
- ("^ *\\(\\.[a-z0-9_]+\/?\\)" 1 font-lock-type-face)
- ("^ *\\(%[a-z0-9_]+\/?\\)" 1 font-lock-function-name-face)
- ("^ *\\(#[a-z0-9_]+\/?\\)" (1 font-lock-keyword-face)
- ("\\.[a-z0-9_]+" nil nil (0 font-lock-type-face)))
- ("^ *\\(\\.[a-z0-9_]+\/?\\)" (1 font-lock-type-face)
- ("\\.[a-z0-9_]+" nil nil (0 font-lock-type-face)))
- ("^ *\\(\\.[a-z0-9_]+\/?\\)" (1 font-lock-type-face)
- ("\\#[a-z0-9_]+" nil nil (0 font-lock-keyword-face)))
- ("^ *\\(%[a-z0-9_]+\/?\\)" (1 font-lock-function-name-face)
- ("\\.[a-z0-9_]+" nil nil (0 font-lock-type-face)))
- ("^ *\\(%[a-z0-9_]+\/?\\)" (1 font-lock-function-name-face)
- ("\\#[a-z0-9_]+" nil nil (0 font-lock-keyword-face)))
- ("^ *\\([~=-] .*\\)" 1 font-lock-preprocessor-face prepend)
- ("^ *[\\.#%a-z0-9_]+\\([~=-] .*\\)" 1 font-lock-preprocessor-face prepend)
- ("^ *[\\.#%a-z0-9_]+\\({[^}]+}\\)" 1 font-lock-preprocessor-face prepend)
- ("^ *[\\.#%a-z0-9_]+\\(\\[[^]]+\\]\\)" 1 font-lock-preprocessor-face prepend)))
-
-;; Mode setup
-
-(defvar haml-mode-syntax-table
- (let ((table (make-syntax-table)))
- (modify-syntax-entry ?: "." table)
- (modify-syntax-entry ?_ "w" table)
- table)
- "Syntax table in use in haml-mode buffers.")
-
-(defvar haml-mode-map
- (let ((map (make-sparse-keymap)))
- (define-key map [backspace] 'haml-electric-backspace)
- (define-key map "\C-?" 'haml-electric-backspace)
- (define-key map "\C-\M-f" 'haml-forward-sexp)
- (define-key map "\C-\M-b" 'haml-backward-sexp)
- (define-key map "\C-\M-u" 'haml-up-list)
- (define-key map "\C-\M-d" 'haml-down-list)
- (define-key map "\C-C\C-k" 'haml-kill-line-and-indent)
- map))
-
-;;;###autoload
-(define-derived-mode haml-mode fundamental-mode "Haml"
- "Major mode for editing Haml files.
-
-\\{haml-mode-map}"
- (set-syntax-table haml-mode-syntax-table)
- (set (make-local-variable 'indent-line-function) 'haml-indent-line)
- (set (make-local-variable 'indent-region-function) 'haml-indent-region)
- (set (make-local-variable 'forward-sexp-function) 'haml-forward-sexp)
- (setq indent-tabs-mode nil)
- (setq font-lock-defaults '((haml-font-lock-keywords) nil t)))
-
-;; Navigation
-
-(defun haml-forward-through-whitespace (&optional backward)
- "Move the point forward at least one line, until it reaches
-either the end of the buffer or a line with no whitespace.
-
-If `backward' is non-nil, move the point backward instead."
- (let ((arg (if backward -1 1))
- (endp (if backward 'bobp 'eobp)))
- (loop do (forward-line arg)
- while (and (not (funcall endp))
- (looking-at "^[ \t]*$")))))
-
-(defun haml-at-indent-p ()
- "Returns whether or not the point is at the first
-non-whitespace character in a line or whitespace preceding that
-character."
- (let ((opoint (point)))
- (save-excursion
- (back-to-indentation)
- (>= (point) opoint))))
-
-(defun haml-forward-sexp (&optional arg)
- "Move forward across one nested expression.
-With `arg', do it that many times. Negative arg -N means move
-backward across N balanced expressions.
-
-A sexp in Haml is defined as a line of Haml code as well as any
-lines nested beneath it."
- (interactive "p")
- (or arg (setq arg 1))
- (if (and (< arg 0) (not (haml-at-indent-p)))
- (back-to-indentation)
- (while (/= arg 0)
- (let ((indent (current-indentation)))
- (loop do (haml-forward-through-whitespace (< arg 0))
- while (and (not (eobp))
- (not (bobp))
- (> (current-indentation) indent)))
- (back-to-indentation)
- (setq arg (+ arg (if (> arg 0) -1 1)))))))
-
-(defun haml-backward-sexp (&optional arg)
- "Move backward across one nested expression.
-With ARG, do it that many times. Negative arg -N means move
-forward across N balanced expressions.
-
-A sexp in Haml is defined as a line of Haml code as well as any
-lines nested beneath it."
- (interactive "p")
- (haml-forward-sexp (if arg (- arg) -1)))
-
-(defun haml-up-list (&optional arg)
- "Move out of one level of nesting.
-With ARG, do this that many times."
- (interactive "p")
- (or arg (setq arg 1))
- (while (> arg 0)
- (let ((indent (current-indentation)))
- (loop do (haml-forward-through-whitespace t)
- while (and (not (bobp))
- (>= (current-indentation) indent)))
- (setq arg (- arg 1))))
- (back-to-indentation))
-
-(defun haml-down-list (&optional arg)
- "Move down one level of nesting.
-With ARG, do this that many times."
- (interactive "p")
- (or arg (setq arg 1))
- (while (> arg 0)
- (let ((indent (current-indentation)))
- (haml-forward-through-whitespace)
- (when (<= (current-indentation) indent)
- (haml-forward-through-whitespace t)
- (back-to-indentation)
- (error "Nothing is nested beneath this line"))
- (setq arg (- arg 1))))
- (back-to-indentation))
-
-(defun haml-mark-sexp-but-not-next-line ()
- "Marks the next Haml sexp, but puts the mark at the end of the
-last line of the sexp rather than the first non-whitespace
-character of the next line."
- (mark-sexp)
- (set-mark
- (save-excursion
- (goto-char (mark))
- (forward-line -1)
- (end-of-line)
- (point))))
-
-;; Indentation and electric keys
-
-(defun haml-indent-p ()
- "Returns true if the current line can have lines nested beneath it."
- (loop for opener in haml-block-openers
- if (looking-at opener) return t
- finally return nil))
-
-(defun haml-compute-indentation ()
- "Calculate the maximum sensible indentation for the current line."
- (save-excursion
- (beginning-of-line)
- (if (bobp) 0
- (haml-forward-through-whitespace t)
- (+ (current-indentation)
- (if (funcall haml-indent-function) haml-indent-offset
- 0)))))
-
-(defun haml-indent-region (start end)
- "Indent each nonblank line in the region.
-This is done by indenting the first line based on
-`haml-compute-indentation' and preserving the relative
-indentation of the rest of the region.
-
-If this command is used multiple times in a row, it will cycle
-between possible indentations."
- (save-excursion
- (goto-char end)
- (setq end (point-marker))
- (goto-char start)
- (let (this-line-column current-column
- (next-line-column
- (if (and (equal last-command this-command) (/= (current-indentation) 0))
- (* (/ (- (current-indentation) 1) haml-indent-offset) haml-indent-offset)
- (haml-compute-indentation))))
- (while (< (point) end)
- (setq this-line-column next-line-column
- current-column (current-indentation))
- ;; Delete whitespace chars at beginning of line
- (delete-horizontal-space)
- (unless (eolp)
- (setq next-line-column (save-excursion
- (loop do (forward-line 1)
- while (and (not (eobp)) (looking-at "^[ \t]*$")))
- (+ this-line-column
- (- (current-indentation) current-column))))
- ;; Don't indent an empty line
- (unless (eolp) (indent-to this-line-column)))
- (forward-line 1)))
- (move-marker end nil)))
-
-(defun haml-indent-line ()
- "Indent the current line.
-The first time this command is used, the line will be indented to the
-maximum sensible indentation. Each immediately subsequent usage will
-back-dent the line by `haml-indent-offset' spaces. On reaching column
-0, it will cycle back to the maximum sensible indentation."
- (interactive "*")
- (let ((ci (current-indentation))
- (cc (current-column))
- (need (haml-compute-indentation)))
- (save-excursion
- (beginning-of-line)
- (delete-horizontal-space)
- (if (and (equal last-command this-command) (/= ci 0))
- (indent-to (* (/ (- ci 1) haml-indent-offset) haml-indent-offset))
- (indent-to need)))
- (if (< (current-column) (current-indentation))
- (forward-to-indentation 0))))
-
-(defun haml-reindent-region-by (n)
- "Add N spaces to the beginning of each line in the region.
-If N is negative, will remove the spaces instead. Assumes all
-lines in the region have indentation >= that of the first line."
- (let ((ci (current-indentation)))
- (save-excursion
- (replace-regexp (concat "^" (make-string ci ? ))
- (make-string (max 0 (+ ci n)) ? )
- nil (point) (mark)))))
-
-(defun haml-electric-backspace (arg)
- "Delete characters or back-dent the current line.
-If invoked following only whitespace on a line, will back-dent
-the line and all nested lines to the immediately previous
-multiple of `haml-indent-offset' spaces.
-
-Set `haml-backspace-backdents-nesting' to nil to just back-dent
-the current line."
- (interactive "*p")
- (if (or (/= (current-indentation) (current-column))
- (bolp)
- (looking-at "^[ \t]+$"))
- (backward-delete-char arg)
- (let ((ci (current-column)))
- (beginning-of-line)
- (if haml-backspace-backdents-nesting
- (haml-mark-sexp-but-not-next-line)
- (set-mark (save-excursion (end-of-line) (point))))
- (haml-reindent-region-by (* (- arg) haml-indent-offset))
- (back-to-indentation)
- (pop-mark))))
-
-(defun haml-kill-line-and-indent ()
- "Kill the current line, and re-indent all lines nested beneath it."
- (interactive)
- (beginning-of-line)
- (haml-mark-sexp-but-not-next-line)
- (kill-line 1)
- (haml-reindent-region-by (* -1 haml-indent-offset)))
-
-;; Setup/Activation
-
-(provide 'haml-mode)
View
89 vendor/gems/haml-2.0.9/extra/sass-mode.el
@@ -1,89 +0,0 @@
-;;; sass-mode.el -- Major mode for editing Sass files
-;;; Written by Nathan Weizenbaum
-
-;;; Because Sass's indentation schema is similar
-;;; to that of YAML and Python, many indentation-related
-;;; functions are similar to those in yaml-mode and python-mode.
-
-;;; To install, save this somewhere and add the following to your .emacs file:
-;;;
-;;; (add-to-list 'load-path "/path/to/sass-mode.el")
-;;; (require 'sass-mode nil 't)
-;;; (add-to-list 'auto-mode-alist '("\\.sass$" . sass-mode))
-;;;
-
-;;; Code:
-
-(require 'haml-mode)
-
-;; User definable variables
-
-(defgroup sass nil
- "Support for the Sass template language."
- :group 'languages
- :prefix "sass-")
-
-(defcustom sass-mode-hook nil
- "Hook run when entering Sass mode."
- :type 'hook
- :group 'sass)
-
-(defcustom sass-indent-offset 2
- "Amount of offset per level of indentation."
- :type 'integer
- :group 'sass)
-
-(defvar sass-non-block-openers
- '("^ *:[^ \t]+[ \t]+[^ \t]"
- "^ *[^ \t:]+[ \t]*[=:][ \t]*[^ \t]")
- "A list of regexps that match lines of Sass that couldn't have
-text nested beneath them.")
-
-;; Font lock
-
-(defconst sass-font-lock-keywords
- '(("^ *\\(\t\\)" 1 'haml-tab-face)
- ("^@.*" 0 font-lock-constant-face)
- ("\\(\'[^']*'\\)" 1 font-lock-string-face append)
- ("\\(\"[^\"]*\"\\)" 1 font-lock-string-face append)
- ("\\(#[0-9a-fA-F]\\{3\\}\\{1,2\\}\\>\\)" 1 font-lock-string-face append)
- ("\\(:[A-Za-z-]+\\|[A-Za-z-]+:\\)" 0 font-lock-constant-face append)
- ("![a-z0-9_-]+" 0 font-lock-variable-name-face append)
- ("^ *\\(/[/*].*\\)$" 1 font-lock-comment-face append)
- ("\\(?:^\\|,\\) *\\(#[a-z0-9_-]+\/?\\)" 1 font-lock-keyword-face)
- ("\\(?:^\\|,\\) *\\(\\.[a-z0-9_-]+\/?\\)" 1 font-lock-type-face)
- ("\\(?:^\\|,\\) *\\(&\\|[a-z0-9_]+\/?\\)" 1 font-lock-function-name-face)
- ("\\([=]\\)" 0 font-lock-preprocessor-face prepend)
- ("\\(?:^\\|,\\) *\\(#[a-z0-9_]+\/?\\)" (1 font-lock-keyword-face)
- ("\\.[a-z0-9_-]+" nil nil (0 font-lock-type-face)))
- ("\\(?:^\\|,\\) *\\(\\.[a-z0-9_]+\/?\\)" (1 font-lock-type-face)
- ("\\.[a-z0-9_-]+" nil nil (0 font-lock-type-face)))
- ("\\(?:^\\|,\\) *\\(\\.[a-z0-9_]+\/?\\)" (1 font-lock-type-face)
- ("\\#[a-z0-9_-]+" nil nil (0 font-lock-keyword-face)))
- ("\\(?:^\\|,\\) *\\(&\\|[a-z0-9_]+\/?\\)" (1 font-lock-function-name-face)
- ("\\.[a-z0-9_-]+" nil nil (0 font-lock-type-face)))
- ("\\(?:^\\|,\\) *\\(&\\|[a-z0-9_]+\/?\\)" (1 font-lock-function-name-face)
- ("\\#[a-z0-9_-]+" nil nil (0 font-lock-keyword-face)))))
-
-;; Constants
-
-;; Mode setup
-
-;;;###autoload
-(define-derived-mode sass-mode haml-mode "Sass"
- "Major mode for editing Sass files."
- (set (make-local-variable 'haml-indent-function) 'sass-indent-p)
- (set (make-local-variable 'haml-indent-offset) sass-indent-offset)
- (setq font-lock-defaults '(sass-font-lock-keywords nil t)))
-
-;; Indentation
-
-(defun sass-indent-p ()
- "Returns true if the current line can have lines nested beneath it."
- (loop for opener in sass-non-block-openers
- unless (looking-at opener) return t
- return nil))
-
-;; Setup/Activation
-
-(provide 'sass-mode)
View
8 vendor/gems/haml-2.0.9/init.rb
@@ -1,8 +0,0 @@
-begin
- require File.join(File.dirname(__FILE__), 'lib', 'haml') # From here
-rescue LoadError
- require 'haml' # From gem
-end
-
-# Load Haml and Sass
-Haml.init_rails(binding)
View
1,018 vendor/gems/haml-2.0.9/lib/haml.rb
@@ -1,1018 +0,0 @@
-dir = File.dirname(__FILE__)
-$LOAD_PATH.unshift dir unless $LOAD_PATH.include?(dir)
-
-require 'haml/version'
-
-# = Haml (XHTML Abstraction Markup Language)
-#
-# Haml is a markup language
-# that's used to cleanly and simply describe the XHTML of any web document,
-# without the use of inline code.
-# Haml functions as a replacement
-# for inline page templating systems such as PHP, ERB, and ASP.
-# However, Haml avoids the need for explicitly coding XHTML into the template,
-# because it is actually an abstract description of the XHTML,
-# with some code to generate dynamic content.
-#
-# == Features
-#
-# * Whitespace active
-# * Well-formatted markup
-# * DRY
-# * Follows CSS conventions
-# * Integrates Ruby code
-# * Implements Rails templates with the .haml extension
-#
-# == Using Haml
-#
-# Haml can be used in three ways:
-# as a plugin for Ruby on Rails,
-# as a standalone Ruby module,
-# and as a command-line tool.
-# The first step for all of these is to install the Haml gem:
-#
-# gem install haml
-#
-# To enable it as a Rails plugin,
-# then run
-#
-# haml --rails path/to/rails/app
-#
-# Once it's installed, all view files with the ".html.haml" extension
-# will be compiled using Haml.
-#
-# To run Haml from the command line, just use
-#
-# haml input.haml output.html
-#
-# Use <tt>haml --help</tt> for full documentation.
-#
-# You can access instance variables in Haml templates
-# the same way you do in ERb templates.
-# Helper methods are also available in Haml templates.
-# For example (this example uses Rails, but the principle for Merb is the same):
-#
-# # file: app/controllers/movies_controller.rb
-#
-# class MoviesController < ApplicationController
-# def index
-# @title = "Teen Wolf"
-# end
-# end
-#
-# -# file: app/views/movies/index.haml
-#
-# #content
-# .title
-# %h1= @title
-# = link_to 'Home', home_url
-#
-# may be compiled to:
-#
-# <div id='content'>
-# <div class='title'>
-# <h1>Teen Wolf</h1>
-# <a href='/'>Home</a>
-# </div>
-# </div>
-#
-# === Ruby Module
-#
-# Haml can also be used completely separately from Rails and ActionView.
-# To do this, install the gem with RubyGems:
-#
-# gem install haml
-#
-# You can then use it by including the "haml" gem in Ruby code,
-# and using Haml::Engine like so:
-#
-# engine = Haml::Engine.new("%p Haml code!")
-# engine.render #=> "<p>Haml code!</p>\n"
-#
-# == Characters with meaning to Haml
-#
-# Various characters, when placed at a certain point in a line,
-# instruct Haml to render different types of things.
-#
-# === XHTML Tags
-#
-# These characters render XHTML tags.
-#
-# ==== %
-#
-#
-# The percent character is placed at the beginning of a line.
-# It's followed immediately by the name of an element,
-# then optionally by modifiers (see below), a space,
-# and text to be rendered inside the element.
-# It creates an element in the form of <tt><element></element></tt>.
-# For example:
-#
-# %one
-# %two
-# %three Hey there
-#
-# is compiled to:
-#
-# <one>
-# <two>
-# <three>Hey there</three>
-# </two>
-# </one>
-#
-# Any string is a valid element name;
-# Haml will automatically generate opening and closing tags for any element.
-#
-# ==== {}
-#
-# Brackets represent a Ruby hash
-# that is used for specifying the attributes of an element.
-# It is literally evaluated as a Ruby hash,
-# so logic will work in it and local variables may be used.
-# Quote characters within the attribute
-# will be replaced by appropriate escape sequences.
-# The hash is placed after the tag is defined.
-# For example:
-#
-# %head{ :name => "doc_head" }
-# %script{ 'type' => "text/" + "javascript",
-# :src => "javascripts/script_#{2 + 7}" }
-#
-# is compiled to:
-#
-# <head name='doc_head'>
-# <script src='javascripts/script_9' type='text/javascript'>
-# </script>
-# </head>
-#
-# ===== Attribute Methods
-#
-# A Ruby method call that returns a hash
-# can be substituted for the hash contents.
-# For example, Haml::Helpers defines the following method:
-#
-# def html_attrs(lang = 'en-US')
-# {:xmlns => "http://www.w3.org/1999/xhtml", 'xml:lang' => lang, :lang => lang}
-# end
-#
-# This can then be used in Haml, like so:
-#
-# %html{html_attrs('fr-fr')}
-#
-# This is compiled to:
-#
-# <html lang='fr-fr' xml:lang='fr-fr' xmlns='http://www.w3.org/1999/xhtml'>
-# </html>
-#
-# You can use as many such attribute methods as you want
-# by separating them with commas,
-# like a Ruby argument list.
-# All the hashes will me merged together, from left to right.
-# For example, if you defined
-#
-# def hash1
-# {:bread => 'white', :filling => 'peanut butter and jelly'}
-# end
-#
-# def hash2
-# {:bread => 'whole wheat'}
-# end
-#
-# then
-#
-# %sandwich{hash1, hash2, :delicious => true}/
-#
-# would compile to:
-#
-# <sandwich bread='whole wheat' delicious='true' filling='peanut butter and jelly' />
-#
-# Note that the Haml attributes list has the same syntax as a Ruby method call.
-# This means that any attribute methods must come before the hash literal.
-#
-# ===== Boolean Attributes
-#
-# Some attributes, such as "checked" for <tt>input</tt> tags or "selected" for <tt>option</tt> tags,
-# are "boolean" in the sense that their values don't matter -
-# it only matters whether or not they're present.
-# In HTML (but not XHTML), these attributes can be written as
-#
-# <input selected>
-#
-# To do this in Haml, just assign a Ruby true value to the attribute:
-#
-# %input{:selected => true}
-#
-# In XHTML, the only valid value for these attributes is the name of the attribute.
-# Thus this will render in XHTML as
-#
-# <input selected='selected'>
-#
-# To set these attributes to false, simply assign them to a Ruby false value.
-# In both XHTML and HTML
-#
-# %input{:selected => false}
-#
-# will just render as
-#
-# <input>
-#
-# ==== []
-#
-# Square brackets follow a tag definition and contain a Ruby object
-# that is used to set the class and id of that tag.
-# The class is set to the object's class
-# (transformed to use underlines rather than camel case)
-# and the id is set to the object's class, followed by its id.
-# Because the id of an object is normally an obscure implementation detail,
-# this is most useful for elements that represent instances of Models.
-# Additionally, the second argument (if present) will be used as a prefix for
-# both the id and class attributes.
-# For example:
-#
-# # file: app/controllers/users_controller.rb
-#
-# def show
-# @user = CrazyUser.find(15)
-# end
-#
-# -# file: app/views/users/show.haml
-#
-# %div[@user, :greeting]
-# %bar[290]/
-# Hello!
-#
-# is compiled to:
-#
-# <div class='greeting_crazy_user' id='greeting_crazy_user_15'>
-# <bar class='fixnum' id='fixnum_581' />
-# Hello!
-# </div>
-#
-# ==== /
-#
-# The forward slash character, when placed at the end of a tag definition,
-# causes the tag to be self-closed.
-# For example:
-#
-# %br/
-# %meta{'http-equiv' => 'Content-Type', :content => 'text/html'}/
-#
-# is compiled to:
-#
-# <br />
-# <meta http-equiv='Content-Type' content='text/html' />
-#
-# Some tags are automatically closed, as long as they have no content.
-# +meta+, +img+, +link+, +script+, +br+, and +hr+ tags are closed by default.
-# This list can be customized by setting the <tt>:autoclose</tt> option (see below).
-# For example:
-#
-# %br
-# %meta{'http-equiv' => 'Content-Type', :content => 'text/html'}
-#
-# is also compiled to:
-#
-# <br />
-# <meta http-equiv='Content-Type' content='text/html' />
-#
-# ==== . and #
-#
-# The period and pound sign are borrowed from CSS.
-# They are used as shortcuts to specify the <tt>class</tt>
-# and <tt>id</tt> attributes of an element, respectively.
-# Multiple class names can be specified in a similar way to CSS,
-# by chaining the class names together with periods.
-# They are placed immediately after the tag and before an attributes hash.
-# For example:
-#
-# %div#things
-# %span#rice Chicken Fried
-# %p.beans{ :food => 'true' } The magical fruit
-# %h1.class.otherclass#id La La La
-#
-# is compiled to:
-#
-# <div id='things'>
-# <span id='rice'>Chicken Fried</span>
-# <p class='beans' food='true'>The magical fruit</p>
-# <h1 class='class otherclass' id='id'>La La La</h1>
-# </div>
-#
-# And,
-#
-# #content
-# .articles
-# .article.title
-# Doogie Howser Comes Out
-# .article.date
-# 2006-11-05
-# .article.entry
-# Neil Patrick Harris would like to dispel any rumors that he is straight
-#
-# is compiled to:
-#
-# <div id='content'>
-# <div class='articles'>
-# <div class='article title'>Doogie Howser Comes Out</div>
-# <div class='article date'>2006-11-05</div>
-# <div class='article entry'>
-# Neil Patrick Harris would like to dispel any rumors that he is straight
-# </div>
-# </div>
-# </div>
-#
-# ==== Implicit Div Elements
-#
-# Because the div element is used so often, it is the default element.
-# If you only define a class and/or id using the <tt>.</tt> or <tt>#</tt> syntax,
-# a div element is automatically used.
-# For example:
-#
-# #collection
-# .item
-# .description What a cool item!
-#
-# is the same as:
-#
-# %div{:id => collection}
-# %div{:class => 'item'}
-# %div{:class => 'description'} What a cool item!
-#
-# and is compiled to:
-#
-# <div id='collection'>
-# <div class='item'>
-# <div class='description'>What a cool item!</div>
-# </div>
-# </div>
-#
-# ==== > and <
-#
-# <tt>></tt> and <tt><</tt> give you more control over the whitespace near a tag.
-# <tt>></tt> will remove all whitespace surrounding a tag,
-# while <tt><</tt> will remove all whitespace immediately within a tag.
-# You can think of them as alligators eating the whitespace:
-# <tt>></tt> faces out of the tag and eats the whitespace on the outside,
-# and <tt><</tt> faces into the tag and eats the whitespace on the inside.
-# They're placed at the end of a tag definition,
-# after class, id, and attribute declarations
-# but before <tt>/</tt> or <tt>=</tt>.
-# For example:
-#
-# %blockquote<
-# %div
-# Foo!
-#
-# is compiled to:
-#
-# <blockquote><div>
-# Foo!
-# </div></blockquote>
-#
-# And:
-#
-# %img
-# %img>
-# %img
-#
-# is compiled to:
-#
-# <img /><img /><img />
-#
-# And:
-#
-# %p<= "Foo\nBar"
-#
-# is compiled to:
-#
-# <p>Foo
-# Bar</p>
-#
-# And finally:
-#
-# %img
-# %pre><
-# foo
-# bar
-# %img
-#
-# is compiled to:
-#
-# <img /><pre>foo
-# bar</pre><img />
-#
-# ==== =
-#
-# <tt>=</tt> is placed at the end of a tag definition,
-# after class, id, and attribute declarations.
-# It's just a shortcut for inserting Ruby code into an element.
-# It works the same as <tt>=</tt> without a tag:
-# it inserts the result of the Ruby code into the template.
-# However, if the result is short enough,
-# it is displayed entirely on one line.
-# For example:
-#
-# %p= "hello"
-#
-# is not quite the same as:
-#
-# %p
-# = "hello"
-#
-# It's compiled to:
-#
-# <p>hello</p>
-#
-# ==== ~
-#
-# ~ works just like =, except that it runs Haml::Helpers#find_and_preserve on its input.
-# For example,
-#
-# ~ "Foo\n<pre>Bar\nBaz</pre>"
-#
-# is the same as:
-#
-# = find_and_preserve("Foo\n<pre>Bar\nBaz</pre>")
-#
-# and is compiled to:
-#
-# Foo
-# <pre>Bar&#x000A;Baz</pre>
-#
-# See also Whitespace Preservation, below.
-#
-# === XHTML Helpers
-#
-# ==== No Special Character
-#
-# If no special character appears at the beginning of a line,
-# the line is rendered as plain text.
-# For example:
-#
-# %gee
-# %whiz
-# Wow this is cool!
-#
-# is compiled to:
-#
-# <gee>
-# <whiz>
-# Wow this is cool!
-# </whiz>
-# </gee>
-#
-# ==== !!!
-#
-# When describing XHTML documents with Haml,
-# you can have a document type or XML prolog generated automatically
-# by including the characters <tt>!!!</tt>.
-# For example:
-#
-# !!! XML
-# !!!
-# %html
-# %head
-# %title Myspace
-# %body
-# %h1 I am the international space station
-# %p Sign my guestbook
-#
-# is compiled to:
-#
-# <?xml version='1.0' encoding='utf-8' ?>
-# <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-# <html>
-# <head>
-# <title>Myspace</title>
-# </head>
-# <body>
-# <h1>I am the international space station</h1>
-# <p>Sign my guestbook</p>
-# </body>
-# </html>
-#
-# You can also specify the version and type of XHTML after the <tt>!!!</tt>.
-# XHTML 1.0 Strict, Transitional, and Frameset and XHTML 1.1 are supported.
-# The default version is 1.0 and the default type is Transitional.
-# For example:
-#
-# !!! 1.1
-#
-# is compiled to:
-#
-# <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-#
-# and
-#
-# !!! Strict
-#
-# is compiled to:
-#
-# <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-#
-# while
-#
-# !!! Basic
-#
-# is compiled to:
-#
-# <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">
-#
-# and
-#
-# !!! Mobile
-#
-# is compiled to:
-#
-# <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">
-#
-# If you're not using the UTF-8 character set for your document,
-# you can specify which encoding should appear
-# in the XML prolog in a similar way.
-# For example:
-#
-# !!! XML iso-8859-1
-#
-# is compiled to:
-#
-# <?xml version='1.0' encoding='iso-8859-1' ?>
-#
-# ==== /
-#
-# The forward slash character, when placed at the beginning of a line,
-# wraps all text after it in an HTML comment.
-# For example:
-#
-# %peanutbutterjelly
-# / This is the peanutbutterjelly element
-# I like sandwiches!
-#
-# is compiled to:
-#
-# <peanutbutterjelly>
-# <!-- This is the peanutbutterjelly element -->
-# I like sandwiches!
-# </peanutbutterjelly>
-#
-# The forward slash can also wrap indented sections of code. For example:
-#
-# /
-# %p This doesn't render...
-# %div
-# %h1 Because it's commented out!
-#
-# is compiled to:
-#
-# <!--
-# <p>This doesn't render...</p>
-# <div>
-# <h1>Because it's commented out!</h1>
-# </div>
-# -->
-#
-# You can also use Internet Explorer conditional comments
-# (about)[http://www.quirksmode.org/css/condcom.html]
-# by enclosing the condition in square brackets after the <tt>/</tt>.
-# For example:
-#
-# /[if IE]
-# %a{ :href => 'http://www.mozilla.com/en-US/firefox/' }
-# %h1 Get Firefox
-#
-# is compiled to:
-#
-# <!--[if IE]>
-# <a href='http://www.mozilla.com/en-US/firefox/'>
-# <h1>Get Firefox</h1>
-# </a>
-# <![endif]-->
-#
-# ==== \
-#
-# The backslash character escapes the first character of a line,
-# allowing use of otherwise interpreted characters as plain text.
-# For example:
-#
-# %title
-# = @title
-# \- MySite
-#
-# is compiled to:
-#
-# <title>
-# MyPage
-# - MySite
-# </title>
-#
-# ==== |
-#
-# The pipe character designates a multiline string.
-# It's placed at the end of a line
-# and means that all following lines that end with <tt>|</tt>
-# will be evaluated as though they were on the same line.
-# For example:
-#
-# %whoo
-# %hoo I think this might get |
-# pretty long so I should |
-# probably make it |
-# multiline so it doesn't |
-# look awful. |
-# %p This is short.
-#
-# is compiled to:
-#
-# <whoo>
-# <hoo>
-# I think this might get pretty long so I should probably make it multiline so it doesn't look awful.
-# </hoo>
-# <p>This is short</p>
-# </whoo>
-#
-# ==== :
-#
-# The colon character designates a filter.
-# This allows you to pass an indented block of text as input
-# to another filtering program and add the result to the output of Haml.
-# The syntax is simply a colon followed by the name of the filter.
-# For example,
-#
-# %p
-# :markdown
-# Textile
-# =======
-#
-# Hello, *World*
-#
-# is compiled to
-#
-# <p>
-# <h1>Textile</h1>
-#
-# <p>Hello, <em>World</em></p>
-# </p>
-#
-# Filters can have Ruby code interpolated, like with ==.
-# For example,
-#
-# - flavor = "raspberry"
-# #content
-# :textile
-# I *really* prefer _#{h flavor}_ jam.
-#
-# is compiled to
-#
-# <div id='content'>
-# <p>I <strong>really</strong> prefer <em>raspberry</em> jam.</p>
-# </div>
-#
-# Haml has the following filters defined:
-#
-# [plain] Does not parse the filtered text.
-# This is useful for large blocks of text without HTML tags,
-# when you don't want lines starting with <tt>.</tt> or <tt>-</tt>
-# to be parsed.
-#
-# [javascript] Surrounds the filtered text with <script> and CDATA tags.
-# Useful for including inline Javascript.
-#
-# [escaped] Works the same as plain, but HTML-escapes the text
-# before placing it in the document.
-#
-# [ruby] Parses the filtered text with the normal Ruby interpreter.
-# All output sent to <tt>$stdout</tt>, like with +puts+,
-# is output into the Haml document.
-# Not available if the <tt>suppress_eval</tt> option is set to true.
-# The Ruby code is evaluated in the same context as the Haml template.
-#
-# [preserve] Inserts the filtered text into the template with whitespace preserved.
-# <tt>preserve</tt>d blocks of text aren't indented,
-# and newlines are replaced with the HTML escape code for newlines,
-# to preserve nice-looking output.
-# See also Whitespace Preservation, below.
-#
-# [erb] Parses the filtered text with ERB, like an RHTML template.
-# Not available if the <tt>suppress_eval</tt> option is set to true.
-# Embedded Ruby code is evaluated in the same context as the Haml template.
-#
-# [sass] Parses the filtered text with Sass to produce CSS output.
-#
-# [textile] Parses the filtered text with Textile (http://www.textism.com/tools/textile).
-# Only works if RedCloth is installed.
-#
-# [markdown] Parses the filtered text with Markdown (http://daringfireball.net/projects/markdown).
-# Only works if RDiscount, RPeg-Markdown, Maruku, or BlueCloth are installed.
-#
-# [maruku] Parses the filtered text with Maruku, which has some non-standard extensions to Markdown.
-#
-# You can also define your own filters (see Haml::Filters).
-#
-# === Ruby evaluators
-#
-# ==== =
-#
-# The equals character is followed by Ruby code,
-# which is evaluated and the output inserted into the document as plain text.
-# For example:
-#
-# %p
-# = ['hi', 'there', 'reader!'].join " "
-# = "yo"
-#
-# is compiled to:
-#
-# <p>
-# hi there reader!
-# yo
-# </p>
-#
-# If the <tt>:escape_html</tt> option is set, <tt>=</tt> will sanitize any
-# HTML-sensitive characters generated by the script. For example:
-#
-# = '<script>alert("I\'m evil!");</script>'
-#
-# would be compiled to
-#
-# &lt;script&gt;alert(&quot;I'm evil!&quot;);&lt;/script&gt;
-#
-# ==== -
-#
-# The hyphen character makes the text following it into "silent script":
-# Ruby script that is evaluated, but not output.
-#
-# <b>It is not recommended that you use this widely;
-# almost all processing code and logic should be restricted
-# to the Controller, the Helper, or partials.</b>
-#
-# For example:
-#
-# - foo = "hello"
-# - foo << " there"
-# - foo << " you!"
-# %p= foo
-#
-# is compiled to:
-#
-# <p>
-# hello there you!
-# </p>
-#
-# ==== ==
-#
-# Two equals characters interpolates Ruby code into plain text,
-# similarly to Ruby string interpolation.
-# For example,
-#
-# %p== This is #{h quality} cake!
-#
-# is the same as
-#
-# %p= "This is #{h quality} cake!"
-#
-# and might compile to
-#
-# <p>This is scrumptious cake!</p>
-#
-# Backslashes can be used to escape "#{" strings,
-# but they don't act as escapes anywhere else in the string.
-# For example:
-#
-# %p
-# == \\ Look at \\#{h word} lack of backslash: \#{foo}
-#
-# might compile to
-#
-# <p>
-# \\ Look at \yon lack of backslash: #{foo}
-# </p>
-#
-# ==== &=
-#
-# An ampersand followed by one or two equals characters
-# evaluates Ruby code just like the equals without the ampersand,
-# but sanitizes any HTML-sensitive characters in the result of the code.
-# For example:
-#
-# &= "I like cheese & crackers"
-#
-# compiles to
-#
-# I like cheese &amp; crackers
-#
-# If the <tt>:escape_html</tt> option is set,
-# &= behaves identically to =.
-#
-# ==== !=
-#
-# An exclamation mark followed by one or two equals characters
-# evaluates Ruby code just like the equals would,
-# but never sanitizes the HTML.
-#
-# By default, the single equals doesn't sanitize HTML either.
-# However, if the <tt>:escape_html</tt> option is set, = will sanitize the HTML, but != still won't.
-# For example, if <tt>:escape_html</tt> is set:
-#
-# = "I feel <strong>!"
-# != "I feel <strong>!"
-#
-# compiles to
-#
-# I feel &lt;strong&gt;!
-# I feel <strong>!
-#
-# ===== Blocks
-#
-# Ruby blocks, like XHTML tags, don't need to be explicitly closed in Haml.
-# Rather, they're automatically closed, based on indentation.
-# A block begins whenever the indentation is increased
-# after a silent script command.
-# It ends when the indentation decreases
-# (as long as it's not an +else+ clause or something similar).
-# For example:
-#
-# - (42...47).each do |i|
-# %p= i
-# %p See, I can count!
-#
-# is compiled to:
-#
-# <p>
-# 42
-# </p>
-# <p>
-# 43
-# </p>
-# <p>
-# 44
-# </p>
-# <p>
-# 45
-# </p>
-# <p>
-# 46
-# </p>
-#
-# Another example:
-#
-# %p
-# - case 2
-# - when 1
-# = "1!"
-# - when 2
-# = "2?"
-# - when 3
-# = "3."
-#
-# is compiled to:
-#
-# <p>
-# 2?
-# </p>
-#
-# ==== -#
-#
-# The hyphen followed immediately by the pound sign
-# signifies a silent comment.
-# Any text following this isn't rendered in the resulting document
-# at all.
-#
-# For example:
-#
-# %p foo
-# -# This is a comment
-# %p bar
-#
-# is compiled to:
-#
-# <p>foo</p>
-# <p>bar</p>
-#
-# You can also nest text beneath a silent comment.
-# None of this text will be rendered.
-# For example:
-#
-# %p foo
-# -#
-# This won't be displayed
-# Nor will this
-# %p bar
-#
-# is compiled to:
-#
-# <p>foo</p>
-# <p>bar</p>
-#
-# == Other Useful Things
-#
-# === Whitespace Preservation
-#
-# Sometimes you don't want Haml to indent all your text.
-# For example, tags like +pre+ and +textarea+ are whitespace-sensitive;
-# indenting the text makes them render wrong.
-#
-# Haml deals with this by "preserving" newlines before they're put into the document --
-# converting them to the XHTML whitespace escape code, <tt>&#x000A;</tt>.
-# Then Haml won't try to re-format the indentation.
-#
-# Literal +textarea+ and +pre+ tags automatically preserve their content.
-# Dynamically can't be caught automatically,
-# and so should be passed through Haml::Helpers#find_and_preserve or the <tt>~</tt> command,
-# which has the same effect (see above).
-#
-# Blocks of literal text can be preserved using the :preserve filter (see above).
-#
-# === Helpers
-#
-# Haml offers a bunch of helpers that are useful
-# for doing stuff like preserving whitespace,
-# creating nicely indented output for user-defined helpers,
-# and other useful things.
-# The helpers are all documented in the Haml::Helpers and Haml::Helpers::ActionViewExtensions modules.
-#
-# === Haml Options
-#
-# Options can be set by setting the <tt>Haml::Template.options</tt> hash
-# in <tt>environment.rb</tt> in Rails...
-#
-# Haml::Template.options[:format] = :html5
-#
-# ...or by setting the <tt>Merb::Plugin.config[:haml]</tt> hash in <tt>init.rb</tt> in Merb...
-#
-# Merb::Plugin.config[:haml][:format] = :html5
-#
-# ...or by passing an options hash to Haml::Engine.new.
-# Available options are:
-#
-# [<tt>:format</tt>] Determines the output format. The default is :xhtml.
-# Other options are :html4 and :html5, which are
-# identical to :xhtml except there are no self-closing tags,
-# XML prolog is ignored and correct DOCTYPEs are generated.
-#
-# [<tt>:escape_html</tt>] Sets whether or not to escape HTML-sensitive characters in script.
-# If this is true, = behaves like &=;
-# otherwise, it behaves like !=.
-# Note that if this is set, != should be used for yielding to subtemplates
-# and rendering partials.
-# Defaults to false.
-#
-# [<tt>:suppress_eval</tt>] Whether or not attribute hashes and Ruby scripts
-# designated by <tt>=</tt> or <tt>~</tt> should be
-# evaluated. If this is true, said scripts are
-# rendered as empty strings. Defaults to false.
-#
-# [<tt>:attr_wrapper</tt>] The character that should wrap element attributes.
-# This defaults to <tt>'</tt> (an apostrophe). Characters
-# of this type within the attributes will be escaped
-# (e.g. by replacing them with <tt>&apos;</tt>) if
-# the character is an apostrophe or a quotation mark.
-#
-# [<tt>:filename</tt>] The name of the Haml file being parsed.
-# This is only used as information when exceptions are raised.
-# This is automatically assigned when working through ActionView,
-# so it's really only useful for the user to assign
-# when dealing with Haml programatically.
-#
-# [<tt>:line</tt>] The line offset of the Haml template being parsed.
-# This is useful for inline templates,
-# similar to the last argument to Kernel#eval.
-#
-# [<tt>:autoclose</tt>] A list of tag names that should be automatically self-closed
-# if they have no content.
-# Defaults to <tt>['meta', 'img', 'link', 'br', 'hr', 'input', 'area', 'param', 'col', 'base']</tt>.
-#
-# [<tt>:preserve</tt>] A list of tag names that should automatically have their newlines preserved
-# using the Haml::Helpers#preserve helper.
-# This means that any content given on the same line as the tag will be preserved.
-# For example:
-#
-# %textarea= "Foo\nBar"
-#
-# compiles to:
-#
-# <textarea>Foo&&#x000A;Bar</textarea>
-#
-# Defaults to <tt>['textarea', 'pre']</tt>.
-#
-# See also Whitespace Preservation, above.
-#
-module Haml
-
- extend Haml::Version
-
- # A string representing the version of Haml.
- # A more fine-grained representation is available from Haml.version.
- VERSION = version[:string] unless defined?(Haml::VERSION)
-
- # This method is called by init.rb,
- # which is run by Rails on startup.
- # We use it rather than putting stuff straight into init.rb
- # so we can change the initialization behavior
- # without modifying the file itself.
- def self.init_rails(binding)
- # No &method here for Rails 2.1 compatibility
- %w[haml/template sass sass/plugin].each {|f| require f}
- end
-end
-
-require 'haml/util'
-require 'haml/engine'
View
240 vendor/gems/haml-2.0.9/lib/haml/buffer.rb
@@ -1,240 +0,0 @@
-module Haml
- # This class is used only internally. It holds the buffer of XHTML that
- # is eventually output by Haml::Engine's to_html method. It's called
- # from within the precompiled code, and helps reduce the amount of
- # processing done within instance_eval'd code.
- class Buffer
- include Haml::Helpers
-
- # The string that holds the compiled XHTML. This is aliased as
- # _erbout for compatibility with ERB-specific code.
- attr_accessor :buffer
-
- # The options hash passed in from Haml::Engine.
- attr_accessor :options
-
- # The Buffer for the enclosing Haml document.
- # This is set for partials and similar sorts of nested templates.
- # It's nil at the top level (see #toplevel?).
- attr_accessor :upper
-
- # See #active?
- attr_writer :active
-
- # True if the format is XHTML
- def xhtml?
- not html?
- end
-
- # True if the format is any flavor of HTML
- def html?
- html4? or html5?
- end
-
- # True if the format is HTML4
- def html4?
- @options[:format] == :html4
- end
-
- # True if the format is HTML5
- def html5?
- @options[:format] == :html5
- end
-
- # True if this buffer is a top-level template,
- # as opposed to a nested partial.
- def toplevel?
- upper.nil?
- end
-
- # True if this buffer is currently being used to render a Haml template.
- # However, this returns false if a subtemplate is being rendered,
- # even if it's a subtemplate of this buffer's template.
- def active?
- @active
- end
-
- # Gets the current tabulation of the document.
- def tabulation
- @real_tabs + @tabulation
- end
-
- # Sets the current tabulation of the document.
- def tabulation=(val)
- val = val - @real_tabs
- @tabulation = val > -1 ? val : 0
- end
-
- # Creates a new buffer.
- def initialize(upper = nil, options = {})
- @active = true
- @upper = upper
- @options = {
- :attr_wrapper => "'",
- :ugly => false,
- :format => :xhtml
- }.merge options
- @buffer = ""
- @tabulation = 0
-
- # The number of tabs that Engine thinks we should have
- # @real_tabs + @tabulation is the number of tabs actually output
- @real_tabs = 0
- end
-
- # Renders +text+ with the proper tabulation. This also deals with
- # making a possible one-line tag one line or not.
- def push_text(text, dont_tab_up = false, tab_change = 0)
- if @tabulation > 0 && !@options[:ugly]
- # Have to push every line in by the extra user set tabulation.
- # Don&