Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Let's move every configuration file into config/

... Except for config.ru, because that makes us add arguments to rackup,
and that just plain sucks.
  • Loading branch information...
commit d0121a6634b679752b33d7bf33db530581f4f7c2 1 parent f62170e
@steveklabnik steveklabnik authored
View
2  README.md
@@ -41,7 +41,7 @@ Then do:
Copy the config file; if you have actual Twitter API keys, you can add yours,
but this file just needs to exist for the server to work.
- $ cp config.yml.sample config.yml
+ $ cp config/config.yml.sample config/config.yml
Then update your gemset:
View
2  config.ru
@@ -4,7 +4,7 @@ require 'bundler/setup'
require File.dirname(__FILE__) + '/rstatus'
unless ENV['RACK_ENV'] == "production"
- config = YAML.load_file('config.yml')[ENV['RACK_ENV']]
+ config = YAML.load_file('config/config.yml')[ENV['RACK_ENV']]
config.each do |key, value|
ENV[key] = value
View
8 config.rb → config/config.rb
@@ -1,4 +1,4 @@
-require_relative 'lib/rstatus/session'
+require_relative '../lib/rstatus/session'
class Rstatus
# The `PONY_VIA_OPTIONS` hash is used to configure `pony`. Basically, we only
@@ -37,7 +37,7 @@ class Rstatus
use Rack::Timeout
Rack::Timeout.timeout = 10
- set :root, File.dirname(__FILE__)
+ set :root, File.join(File.dirname(__FILE__), "..")
set :haml, :escape_html => true
# This method enables the ability for our forms to use the _method hack for
@@ -58,11 +58,11 @@ class Rstatus
MongoMapper.database = "rstatus-#{settings.environment}"
end
- Compass.add_project_configuration(File.join(File.dirname(__FILE__), 'config', 'compass.config'))
+ Compass.add_project_configuration(File.join(File.dirname(__FILE__), 'compass.config'))
MongoMapperExt.init
# now that we've connected to the db, let's load our models.
- require_relative 'models/all'
+ require_relative '../models/all'
end
helpers Sinatra::UserHelper
View
0  config.yml.sample → config/config.yml.sample
File renamed without changes
View
2  rstatus.rb
@@ -74,7 +74,7 @@
#methods and routes and such.
class Rstatus < Sinatra::Base; end;
-require_relative "config"
+require_relative "config/config"
Dir.glob("controllers/*.rb").each { |r| require_relative r }
Please sign in to comment.
Something went wrong with that request. Please try again.