haml-contrib-1.0.0.1/0000755000004100000410000000000012151164276014263 5ustar www-datawww-datahaml-contrib-1.0.0.1/test/0000755000004100000410000000000012151164276015242 5ustar www-datawww-datahaml-contrib-1.0.0.1/test/test_helper.rb0000644000004100000410000000053412151164276020107 0ustar www-datawww-datarequire "rubygems" require "bundler/setup" require "haml" require "minitest/autorun" MiniTest::Unit::TestCase.send :include, Module.new { def render(text, options = {}, &block) scope = options.delete(:scope) || Object.new locals = options.delete(:locals) || {} Haml::Engine.new(text, options).to_html(scope, locals, &block) end }haml-contrib-1.0.0.1/test/php_filter_test.rb0000644000004100000410000000070112151164276020760 0ustar www-datawww-datarequire "test_helper" require "haml/filters/php" class PHPFilterTest < Minitest::Unit::TestCase def test_should_render haml = ":php\n foo\n bar" html = "\n" assert_equal html, render(haml) end def test_should_interpolate scope = Object.new.instance_eval {foo = "bar"; binding} haml = ":php\n \#{foo}" html = "\n" assert_equal html, render(haml, :scope => scope) end endhaml-contrib-1.0.0.1/Changlog.md0000644000004100000410000000017612151164276016333 0ustar www-datawww-data# Haml Contrib Changelog ## 1.0.0.1 (2013-05-28) * Officially released MIT License. ## 1.0 (2013-02-13) * Initial release.haml-contrib-1.0.0.1/README.md0000644000004100000410000000306612151164276015547 0ustar www-datawww-data# Haml Contrib This project contains various useful extensions to the Haml template language's Ruby implementation. Such extensions are useful enough to be distributed, but not widely used or on-topic enough to belong in Haml proper. This gives the Haml project a reasonable way to both demote current functionality, such as the Textile and Maruku filters, and add new experimental functionality that may later be added to the core. Haml-contrib requires Haml 4.0 or later. ## License Copyright (c) 2006-2013 Hampton Catlil, Nathan Weizenbaum and Norman Clarke Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. haml-contrib-1.0.0.1/checksums.yaml.gz0000444000004100000410000000041312151164276017547 0ustar www-datawww-dataQe;V@E"gV6TމVp{n+/g=|_>W,_KVRԂh]}__{"1sv8*ZRcv3`"w(3|K-m{4穕0xGYZƞDy±1L1{K?R58ώaŇ`!Vsag`9G4fd] 죫9)XʧF)X@1)qhaml-contrib-1.0.0.1/metadata.yml0000644000004100000410000000375712151164276016602 0ustar www-datawww-data--- !ruby/object:Gem::Specification name: haml-contrib version: !ruby/object:Gem::Version version: 1.0.0.1 platform: ruby authors: - Norman Clarke autorequire: bindir: bin cert_chain: [] date: 2013-05-28 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: haml requirement: !ruby/object:Gem::Requirement requirements: - - '>=' - !ruby/object:Gem::Version version: 3.2.0.alpha.13 type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - '>=' - !ruby/object:Gem::Version version: 3.2.0.alpha.13 - !ruby/object:Gem::Dependency name: minitest requirement: !ruby/object:Gem::Requirement requirements: - - '>=' - !ruby/object:Gem::Version version: '0' type: :development prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - '>=' - !ruby/object:Gem::Version version: '0' description: Addons for the Ruby implementation of the Haml template language. email: - norman@njclarke.com executables: [] extensions: [] extra_rdoc_files: [] files: - lib/haml/filters/builder.rb - lib/haml/filters/markaby.rb - lib/haml/filters/maruku.rb - lib/haml/filters/nokogiri.rb - lib/haml/filters/php.rb - lib/haml/filters/textile.rb - lib/haml/filters/wiki.rb - lib/haml/filters/yajl.rb - test/php_filter_test.rb - test/test_helper.rb - Changlog.md - README.md homepage: http://haml.info/ licenses: - MIT metadata: {} post_install_message: rdoc_options: [] require_paths: - lib required_ruby_version: !ruby/object:Gem::Requirement requirements: - - '>=' - !ruby/object:Gem::Version version: '0' required_rubygems_version: !ruby/object:Gem::Requirement requirements: - - '>=' - !ruby/object:Gem::Version version: '0' requirements: [] rubyforge_project: rubygems_version: 2.0.3 signing_key: specification_version: 4 summary: Addons to Haml test_files: - test/php_filter_test.rb - test/test_helper.rb has_rdoc: false haml-contrib-1.0.0.1/lib/0000755000004100000410000000000012151164276015031 5ustar www-datawww-datahaml-contrib-1.0.0.1/lib/haml/0000755000004100000410000000000012151164276015752 5ustar www-datawww-datahaml-contrib-1.0.0.1/lib/haml/filters/0000755000004100000410000000000012151164276017422 5ustar www-datawww-datahaml-contrib-1.0.0.1/lib/haml/filters/yajl.rb0000644000004100000410000000005112151164276020702 0ustar www-datawww-dataHaml::Filters.register_tilt_filter "Yajl"haml-contrib-1.0.0.1/lib/haml/filters/php.rb0000644000004100000410000000073612151164276020544 0ustar www-datawww-data# A PHP Filter for Haml. This simply wraps code inside tags. While this # may seem like a strange idea, some people use Haml to generate mostly static # HTML documents that then include small amounts of PHP. # # This code also serves as an example of how to implement a simple filter for # Haml. module Haml module Filters module PHP include Base def render(text) "" % text.rstrip.gsub("\n", "\n ") end end end endhaml-contrib-1.0.0.1/lib/haml/filters/builder.rb0000644000004100000410000000010212151164276021366 0ustar www-datawww-dataHaml::Filters.register_tilt_filter "Builder", :precompiled => truehaml-contrib-1.0.0.1/lib/haml/filters/markaby.rb0000644000004100000410000000010212151164276021366 0ustar www-datawww-dataHaml::Filters.register_tilt_filter "Markaby", :extension => "mab"haml-contrib-1.0.0.1/lib/haml/filters/maruku.rb0000644000004100000410000000012412151164276021250 0ustar www-datawww-dataHaml::Filters.register_tilt_filter "Maruku", :template_class => Tilt::MarukuTemplatehaml-contrib-1.0.0.1/lib/haml/filters/textile.rb0000644000004100000410000000005412151164276021424 0ustar www-datawww-dataHaml::Filters.register_tilt_filter "Textile"haml-contrib-1.0.0.1/lib/haml/filters/wiki.rb0000644000004100000410000000005112151164276020706 0ustar www-datawww-dataHaml::Filters.register_tilt_filter "Wiki"haml-contrib-1.0.0.1/lib/haml/filters/nokogiri.rb0000644000004100000410000000010312151164276021562 0ustar www-datawww-dataHaml::Filters.register_tilt_filter "Nokogiri", :precompiled => true