slim-2.0.0.pre.6/ 0000755 0001750 0001750 00000000000 12121046025 012423 5 ustar lunar lunar slim-2.0.0.pre.6/metadata.yml 0000644 0001750 0001750 00000011712 12121046025 014730 0 ustar lunar lunar --- !ruby/object:Gem::Specification name: slim version: !ruby/object:Gem::Version version: 2.0.0.pre.6 prerelease: 6 platform: ruby authors: - Daniel Mendler - Andrew Stone - Fred Wu autorequire: bindir: bin cert_chain: [] date: 2013-02-12 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: temple requirement: !ruby/object:Gem::Requirement none: false requirements: - - ~> - !ruby/object:Gem::Version version: 0.6.2 type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement none: false requirements: - - ~> - !ruby/object:Gem::Version version: 0.6.2 - !ruby/object:Gem::Dependency name: tilt requirement: !ruby/object:Gem::Requirement none: false requirements: - - ~> - !ruby/object:Gem::Version version: 1.3.3 type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement none: false requirements: - - ~> - !ruby/object:Gem::Version version: 1.3.3 description: Slim is a template language whose goal is reduce the syntax to the essential parts without becoming cryptic. email: - mail@daniel-mendler.de - andy@stonean.com - ifredwu@gmail.com executables: - slimrb extensions: [] extra_rdoc_files: [] files: - .gitignore - .travis.yml - .yardopts - CHANGES - Gemfile - LICENSE - README.md - Rakefile - benchmarks/context.rb - benchmarks/profile-parser.rb - benchmarks/profile-render.rb - benchmarks/run-benchmarks.rb - benchmarks/run-diffbench.rb - benchmarks/view.erb - benchmarks/view.haml - benchmarks/view.slim - bin/slimrb - kill-travis.sh - lib/slim.rb - lib/slim/code_attributes.rb - lib/slim/command.rb - lib/slim/controls.rb - lib/slim/embedded.rb - lib/slim/end_inserter.rb - lib/slim/engine.rb - lib/slim/filter.rb - lib/slim/grammar.rb - lib/slim/interpolation.rb - lib/slim/logic_less.rb - lib/slim/logic_less/context.rb - lib/slim/logic_less/filter.rb - lib/slim/parser.rb - lib/slim/splat/builder.rb - lib/slim/splat/filter.rb - lib/slim/template.rb - lib/slim/translator.rb - lib/slim/version.rb - slim.gemspec - test/core/helper.rb - test/core/test_code_blocks.rb - test/core/test_code_escaping.rb - test/core/test_code_evaluation.rb - test/core/test_code_output.rb - test/core/test_code_structure.rb - test/core/test_embedded_engines.rb - test/core/test_encoding.rb - test/core/test_html_attributes.rb - test/core/test_html_escaping.rb - test/core/test_html_structure.rb - test/core/test_parser_errors.rb - test/core/test_pretty.rb - test/core/test_ruby_errors.rb - test/core/test_slim_template.rb - test/core/test_tabs.rb - test/core/test_text_interpolation.rb - test/core/test_thread_options.rb - test/core/test_unicode.rb - test/literate/TESTS.md - test/literate/helper.rb - test/literate/run.rb - test/logic_less/test_logic_less.rb - test/rails/Rakefile - test/rails/app/controllers/application_controller.rb - test/rails/app/controllers/parents_controller.rb - test/rails/app/controllers/slim_controller.rb - test/rails/app/helpers/application_helper.rb - test/rails/app/models/child.rb - test/rails/app/models/parent.rb - test/rails/app/views/layouts/application.html.slim - test/rails/app/views/parents/_form.html.slim - test/rails/app/views/parents/edit.html.slim - test/rails/app/views/parents/new.html.slim - test/rails/app/views/parents/show.html.slim - test/rails/app/views/slim/_partial.html.slim - test/rails/app/views/slim/content_for.html.slim - test/rails/app/views/slim/erb.html.erb - test/rails/app/views/slim/integers.html.slim - test/rails/app/views/slim/no_layout.html.slim - test/rails/app/views/slim/normal.html.slim - test/rails/app/views/slim/partial.html.slim - test/rails/app/views/slim/thread_options.html.slim - test/rails/app/views/slim/variables.html.slim - test/rails/config.ru - test/rails/config/application.rb - test/rails/config/boot.rb - test/rails/config/database.yml - test/rails/config/environment.rb - test/rails/config/environments/test.rb - test/rails/config/initializers/backtrace_silencers.rb - test/rails/config/initializers/inflections.rb - test/rails/config/initializers/mime_types.rb - test/rails/config/initializers/secret_token.rb - test/rails/config/initializers/session_store.rb - test/rails/config/locales/en.yml - test/rails/config/routes.rb - test/rails/db/migrate/20101220223037_parents_and_children.rb - test/rails/script/rails - test/rails/test/helper.rb - test/rails/test/test_slim.rb - test/translator/test_translator.rb homepage: http://slim-lang.com/ licenses: [] post_install_message: rdoc_options: [] require_paths: - lib required_ruby_version: !ruby/object:Gem::Requirement none: false requirements: - - ! '>=' - !ruby/object:Gem::Version version: '0' required_rubygems_version: !ruby/object:Gem::Requirement none: false requirements: - - ! '>' - !ruby/object:Gem::Version version: 1.3.1 requirements: [] rubyforge_project: slim rubygems_version: 1.8.24 signing_key: specification_version: 3 summary: Slim is a template language. test_files: [] slim-2.0.0.pre.6/test/ 0000755 0001750 0001750 00000000000 12121046025 013402 5 ustar lunar lunar slim-2.0.0.pre.6/test/translator/ 0000755 0001750 0001750 00000000000 12121046025 015573 5 ustar lunar lunar slim-2.0.0.pre.6/test/translator/test_translator.rb 0000644 0001750 0001750 00000003512 12121046025 021351 0 ustar lunar lunar require 'helper' require 'slim/translator' class TestSlimTranslator < TestSlim def setup super Slim::Engine.set_default_options :tr => true, :tr_fn => 'TestSlimTranslator.tr' end def self.tr(s) s.upcase end def self.tr_reverse(s) s.reverse.gsub(/(\d+)%/, '%\1') end def test_no_translation_of_embedded source = %q{ markdown: #Header Hello from #{"Markdown!"} #{1+2} * one * two } assert_html "
Hello from Markdown!
\n\n3
\n\nHello from Markdown!
\n\n3
\n\ntranslate Hello World from @env this\nsecond line\nthird 3 line
", source, :tr => false assert_html "TRANSLATE Hello World from @env THIS\nSECOND LINE\nTHIRD 3 LINE
", source, :tr_mode => :dynamic assert_html "TRANSLATE Hello World from @env THIS\nSECOND LINE\nTHIRD 3 LINE
", source, :tr_mode => :static end def test_translation_reverse source = %q{ ' alpha #{1} beta #{2} gamma #{3} } assert_html "3 ammag 2 ateb 1 ahpla ", source, :tr_mode => :dynamic, :tr_fn => 'TestSlimTranslator.tr_reverse' assert_html "3 ammag 2 ateb 1 ahpla ", source, :tr_mode => :static, :tr_fn => 'TestSlimTranslator.tr_reverse' end end slim-2.0.0.pre.6/test/rails/ 0000755 0001750 0001750 00000000000 12121046025 014514 5 ustar lunar lunar slim-2.0.0.pre.6/test/rails/test/ 0000755 0001750 0001750 00000000000 12121046025 015473 5 ustar lunar lunar slim-2.0.0.pre.6/test/rails/test/test_slim.rb 0000644 0001750 0001750 00000005324 12121046025 020027 0 ustar lunar lunar require File.expand_path('../helper', __FILE__) class TestSlim < ActionDispatch::IntegrationTest test "normal view" do get "slim/normal" assert_response :success assert_template "slim/normal" assert_template "layouts/application" assert_html "With a partial!
" end if ::Rails::VERSION::MAJOR == 3 && ::Rails::VERSION::MINOR >= 1 && Object.const_defined?(:Fiber) puts 'Streaming test enabled' test "streaming" do get "slim/streaming" output = "2f\r\nPage content
Hello Streaming!
Hello Streaming!
\r\n14\r\n1337
" end test "render thread_options" do get "slim/thread_options", :attr => 'role' assert_html 'Test
' get "slim/thread_options", :attr => 'id' # Overwriting doesn't work because of caching assert_html 'Test
' end test "content_for" do get "slim/content_for" assert_html "Page content
Hello Slim!
Hello Slim!
", :heading => 'Heading set from a view' end test "nested_attributes_form" do post "parents", 'parent[name]' => "p1", 'parent[children_attributes][0][name]' => "c1" get "parents/1/edit" assert_match %r{action="/parents/1"}, @response.body assert_match %r{#{expected}