From 87e3bc293c5e49c170165ff9dba2405333447626 Mon Sep 17 00:00:00 2001 From: Wlodek Bzyl Date: Mon, 1 Jun 2009 23:12:22 +0200 Subject: [PATCH] Renamed files. --- examples/rsummer/config.ru | 16 ++++--------- examples/rsummer/summer.rb | 21 +++++++++++++++++ sinatra-static-assets.gemspec | 44 +++++++++++++++++------------------ 3 files changed, 48 insertions(+), 33 deletions(-) create mode 100644 examples/rsummer/summer.rb diff --git a/examples/rsummer/config.ru b/examples/rsummer/config.ru index a4f7af0..08ae258 100644 --- a/examples/rsummer/config.ru +++ b/examples/rsummer/config.ru @@ -1,14 +1,8 @@ -require 'mapp' +require 'summer' -Mapp1 = Rack::Builder.new do - use Rack::ShowExceptions - use Rack::Lint +use Rack::ShowExceptions +use Rack::Lint - use Rack::Static, :urls => ["/stylesheets", "/images"], :root => "public" - - map '/' do - run Sinatra::Mapp1.new - end +map '/' do + run Sinatra::Summer.new end - -run Mapp1 diff --git a/examples/rsummer/summer.rb b/examples/rsummer/summer.rb new file mode 100644 index 0000000..c343276 --- /dev/null +++ b/examples/rsummer/summer.rb @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- + +require 'sinatra/base' + +gem 'wbzyl-sinatra-static-assets' +require 'sinatra/static_assets' + +module Sinatra + class Summer < Sinatra::Base + helpers Sinatra::UrlForHelper + helpers Sinatra::StaticAssets + + set :app_file, __FILE__ + set :static, true + + get '/?' do + @title = "Tatra Mountains, Błyszcz (2159 m)" + erb :app + end + end +end diff --git a/sinatra-static-assets.gemspec b/sinatra-static-assets.gemspec index d3ee640..508a29f 100644 --- a/sinatra-static-assets.gemspec +++ b/sinatra-static-assets.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |s| s.name = %q{sinatra-static-assets} - s.version = "0.1.0" + s.version = "0.1.1" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Wlodek Bzyl"] @@ -20,25 +20,25 @@ Gem::Specification.new do |s| s.files = [ "TODO", "VERSION.yml", - "examples/mapp1/config.ru", - "examples/mapp1/mapp.rb", - "examples/mapp1/public/images/tatry1.jpg", - "examples/mapp1/public/javascripts/mapp.js", - "examples/mapp1/public/stylesheets/mapp.css", - "examples/mapp1/public/stylesheets/src/background.png", - "examples/mapp1/tmp/always_restart.txt", - "examples/mapp1/views/app.erb", - "examples/mapp1/views/layout.erb", - "examples/mapp2/config.ru", - "examples/mapp2/mapp.rb", - "examples/mapp2/public/images/tatry2.jpg", - "examples/mapp2/public/javascripts/mapp.js", - "examples/mapp2/public/stylesheets/mapp.css", - "examples/mapp2/public/stylesheets/src/background.png", - "examples/mapp2/tmp/always_restart.txt", - "examples/mapp2/views/layout.erb", - "examples/mapp2/views/mapp.erb", - "examples/mconfig.ru", + "examples/rconfig.ru", + "examples/rsummer/config.ru", + "examples/rsummer/public/images/tatry1.jpg", + "examples/rsummer/public/javascripts/mapp.js", + "examples/rsummer/public/stylesheets/mapp.css", + "examples/rsummer/public/stylesheets/src/background.png", + "examples/rsummer/summer.rb", + "examples/rsummer/tmp/always_restart.txt", + "examples/rsummer/views/app.erb", + "examples/rsummer/views/layout.erb", + "examples/rwinter/config.ru", + "examples/rwinter/mapp.rb", + "examples/rwinter/public/images/tatry2.jpg", + "examples/rwinter/public/javascripts/mapp.js", + "examples/rwinter/public/stylesheets/mapp.css", + "examples/rwinter/public/stylesheets/src/background.png", + "examples/rwinter/tmp/always_restart.txt", + "examples/rwinter/views/layout.erb", + "examples/rwinter/views/mapp.erb", "examples/summer/config.ru", "examples/summer/public/images/tatry1.jpg", "examples/summer/public/javascripts/app.js", @@ -72,8 +72,8 @@ Gem::Specification.new do |s| "test/test_helper.rb", "test/sinatra_static_assets_test.rb", "examples/summer/summer.rb", - "examples/mapp2/mapp.rb", - "examples/mapp1/mapp.rb", + "examples/rsummer/summer.rb", + "examples/rwinter/mapp.rb", "examples/winter/app2.rb" ]