Skip to content

Commit

Permalink
tweaks to get this work on sinatra 0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
technoweenie committed Jan 31, 2009
1 parent a9d903e commit 3198a6f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
13 changes: 3 additions & 10 deletions islostonyet.rb
Expand Up @@ -10,15 +10,6 @@ class Rack::Request
alias request_uri fullpath
end

module Sinatra
module Sass
private
def render_sass(content, options = {})
::Sass::Engine.new(content, options).render
end
end
end

configure do
require File.join(File.dirname(__FILE__), 'config', 'lost.rb')
end
Expand All @@ -30,7 +21,7 @@ def render_sass(content, options = {})

get '/stylesheets/:name.css' do
content_type 'text/css', :charset => 'utf-8'
sass :"stylesheets/#{params[:name]}", :style => :compact, :load_paths => [File.join(Sinatra.application.options.views, 'stylesheets')]
sass :"stylesheets/#{params[:name]}", :sass => {:style => :compact, :load_paths => [File.join(Sinatra::Application.views, 'stylesheets')]}
end

get '/' do
Expand All @@ -48,10 +39,12 @@ def render_sass(content, options = {})
@body_class = "widget"
haml :widget
end

get '/widget.js' do
content_type 'text/javascript', :charset => 'utf-8'
haml :widget_js, :layout => false
end

get '/widget.css' do
content_type 'text/css', :charset => 'utf-8'
sass :"stylesheets/#{IsLOSTOnYet.show_abbrev.downcase}_widget", :style => :compact, :load_paths => [File.join(Sinatra.application.options.views, 'stylesheets')]
Expand Down
2 changes: 1 addition & 1 deletion test/episode_test.rb
Expand Up @@ -6,7 +6,7 @@ class EpisodeTest < Test::Unit::TestCase
end

it "parses season from code" do
IsLOSTOnYet::Episode.new("s50e40").season.should == 50
IsLOSTOnYet::Episode.new("s50e40").season.should == 501
end

it "parses episode number from code" do
Expand Down
2 changes: 2 additions & 0 deletions test/test_helper.rb
Expand Up @@ -11,6 +11,8 @@
gem 'jeremymcanally-context' # sudo gem install jeremymcanally-context --source=http://gems.github.com
gem 'jeremymcanally-matchy' # sudo gem install jeremymcanally-matchy --source=http://gems.github.com

$:.unshift '/Users/technoweenie/p/plugins/matchy/lib'

require 'rr'
require 'context'
require 'matchy'
Expand Down

0 comments on commit 3198a6f

Please sign in to comment.