From a5bf4664f28a12cc89098b08df3f09df1d133e36 Mon Sep 17 00:00:00 2001 From: did Date: Wed, 1 Jun 2011 23:47:06 +0200 Subject: [PATCH] [bushido] pass the metrics token to bushido.js --- config/environments/development.rb | 3 ++- lib/locomotive/hosting/bushido/middleware.rb | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/config/environments/development.rb b/config/environments/development.rb index 1f07c786..c98a6c95 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -35,6 +35,7 @@ Locomotive::Application.configure do # 'BUSHIDO_APP' => 'san_francisco', # 'BUSHIDO_HOST' => 'bushi.do', # 'LOCOMOTIVE_SITE_NAME' => 'Locomotive TEST', - # 'BUSHIDO_CLAIMED' => 'true' + # 'BUSHIDO_CLAIMED' => 'true', + # 'BUSHIDO_METRICS_TOKEN' => 'foobar' # } end \ No newline at end of file diff --git a/lib/locomotive/hosting/bushido/middleware.rb b/lib/locomotive/hosting/bushido/middleware.rb index 50a250b2..10df1bf7 100644 --- a/lib/locomotive/hosting/bushido/middleware.rb +++ b/lib/locomotive/hosting/bushido/middleware.rb @@ -12,8 +12,9 @@ module Locomotive def initialize(app, opts = {}) @app = app - @bushido_app_name = ENV['BUSHIDO_APP'] - @bushido_claimed = ::Locomotive.bushido_app_claimed? + @bushido_app_name = ENV['BUSHIDO_APP'] + @bushido_metrics_token = ENV['BUSHIDO_METRICS_TOKEN'] + @bushido_claimed = ::Locomotive.bushido_app_claimed? end def call(env) @@ -27,6 +28,7 @@ module Locomotive