Permalink
Browse files

Updated to work with ruby 1.9.2

  • Loading branch information...
1 parent 98b80d6 commit 361911038c404122a69a77d1326a6dd157aa2457 @mrako committed Oct 20, 2011
Showing with 17 additions and 11 deletions.
  1. +3 −3 Gemfile.lock
  2. +3 −1 config.ru
  3. +4 −3 init.rb
  4. +1 −1 spec/controllers/app_spec.rb
  5. +6 −3 spec/spec_helper.rb
View
@@ -18,9 +18,9 @@ GEM
diff-lcs (~> 1.1.2)
rspec-mocks (2.7.0)
sinatra (1.3.1)
- rack (>= 1.3.4, ~> 1.3)
- rack-protection (>= 1.1.2, ~> 1.1)
- tilt (>= 1.3.3, ~> 1.3)
+ rack (~> 1.3, >= 1.3.4)
+ rack-protection (~> 1.1, >= 1.1.2)
+ tilt (~> 1.3, >= 1.3.3)
tilt (1.3.3)
PLATFORMS
View
@@ -1,4 +1,6 @@
-require 'init'
+path = File.expand_path "../", __FILE__
+
+require "#{path}/init"
set :run, false
set :environment, :production
View
@@ -11,7 +11,7 @@
status 404
end
-
+set :views, File.dirname(__FILE__) + "/views"
# Else read the local configuration
@config = YAML.load_file("config/database.yml")
@@ -30,8 +30,9 @@
MongoMapper.connection.connect
+path = File.expand_path "../", __FILE__
-Dir["models/*.rb"].each{ |file| require file }
+Dir["#{path}/models/*.rb"].each{ |file| require file }
-Dir["controllers/*.rb"].each{ |file| load file }
+Dir["#{path}/controllers/*.rb"].each{ |file| load file }
@@ -1,6 +1,6 @@
require File.dirname(__FILE__) + '/../spec_helper'
-require 'init'
+require "#{root_path}/../init"
describe "controller" do
include Rack::Test::Methods
View
@@ -2,8 +2,11 @@
require 'sinatra'
require 'rack/test'
-set :environment, :test
-set :views, File.dirname(__FILE__) + "/../views"
+def root_path
+ File.expand_path "../", __FILE__
+end
+set :environment, :test
+set :views, "#{root_path}/../views"
-Dir["app/models/*.rb"].each{ |file| require file }
+Dir["#{root_path}/app/models/*.rb"].each{ |file| require file }

0 comments on commit 3619110

Please sign in to comment.