Sha256: 1ff9cda9cdaa12f155b379416f901be952da915066fbf3d1e19d75227605d7c9

Contents?: true

Size: 872 Bytes

Versions: 3

Compression:

Stored size: 872 Bytes

Contents

path = File.expand_path("../lib" + File.dirname(__FILE__))
$:.unshift(path) unless $:.include?(path)

require 'rubygems'

require 'sinatra'
require 'sinatra/static_assets'

get "/url_for" do
  content_type "text/plain"
  <<"EOD"
#{url_for("/")}
#{url_for("/foo")}
#{url_for("/foo", :full)}
EOD
end

get "/image_tag" do
  content_type "text/plain"
  <<"EOD"
#{image_tag("/images/foo.jpg", :alt => "[foo image]")}
EOD
end

get "/stylesheet_link_tag" do
  content_type "text/plain"
  <<"EOD"
#{stylesheet_link_tag("/stylesheets/winter.css", "/stylesheets/summer.css", :media => "projection")}
EOD
end

get "/javascript_script_tag" do
  content_type "text/plain"
  <<"EOD"
#{javascript_script_tag "/javascripts/summer.js", :charset => "iso-8859-2"}
EOD
end

get "/link_to_tag" do
  content_type "text/plain"
  <<"EOD"
#{link_to "Tatry Mountains Rescue Team", "/topr"}
EOD
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sinatra-static-assets-1.0.2 test/sinatra_app.rb
sinatra-static-assets-1.0.1 test/sinatra_app.rb
sinatra-static-assets-1.0.0 test/sinatra_app.rb