Skip to content

Commit

Permalink
Adds "collector_mounting" configuration option.
Browse files Browse the repository at this point in the history
Collector mounting can now be disabled in config/snowfinch.yml.
If the configuration option is missing, the collector will be mounted
(default).
  • Loading branch information
jcxplorer committed May 29, 2011
1 parent d724c4c commit ffe6032
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
9 changes: 1 addition & 8 deletions config.ru
@@ -1,11 +1,4 @@
# This file is used by Rack-based servers to start the application. # This file is used by Rack-based servers to start the application.


require ::File.expand_path('../config/environment', __FILE__) require ::File.expand_path('../config/environment', __FILE__)

run Snowfinch::Application
map "/" do
run Snowfinch::Application
end

map "/collector" do
run Snowfinch::Collector
end
4 changes: 3 additions & 1 deletion config/routes.rb
Expand Up @@ -2,7 +2,9 @@


devise_for :users devise_for :users


match "/collector" => Snowfinch::Collector unless Snowfinch.configuration[:mount_collector] == false
match "/collector" => Snowfinch::Collector
end


resources :sites do resources :sites do
member do member do
Expand Down
23 changes: 13 additions & 10 deletions config/snowfinch.yml
@@ -1,17 +1,20 @@
development: development:
host: "snowfinch.rails.fi:3000" host: "localhost:3000"
collector_uri: "http://snowfinch.rails.fi:3000/collector" collector_uri: "http://localhost:3000/collector"
mailer_sender: "support@snowfinch.net" mount_collector: true
mailer_sender: "snowfinch@example.com"
mongo_database: "snowfinch" mongo_database: "snowfinch"


test: test:
host: "snowfinch.rails.fi:3000" host: "localhost:3000"
collector_uri: "http://snowfinch.rails.fi:3000/collector" collector_uri: "http://localhost:3000/collector"
mailer_sender: "support@snowfinch.net" mount_collector: true
mongo_database: "snowfinch_test" mailer_sender: "snowfinch@example.com"
mongo_database: "snowfinch"


production: production:
host: "nest.snowfinch.net" host: "example.com"
collector_uri: "http://nest.snowfinch.net/collector" collector_uri: "http://example.com/collector"
mailer_sender: "support@snowfinch.net" mount_collector: true
mailer_sender: "snowfinch@example.com"
mongo_database: "snowfinch" mongo_database: "snowfinch"

0 comments on commit ffe6032

Please sign in to comment.