projects
/
arvados.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9607252
)
use ORVOS_API_TOKEN environment variable in rails console
author
Tom Clegg <tom@clinicalfuture.com>
Thu, 21 Mar 2013 17:13:20 +0000
(10:13 -0700)
committer
Tom Clegg <tom@clinicalfuture.com>
Thu, 21 Mar 2013 17:13:20 +0000
(10:13 -0700)
config/boot.rb
patch
|
blob
|
history
diff --git
a/config/boot.rb
b/config/boot.rb
index 4489e58688ca642d8e0e9489f6896f49f9b89da6..f6d584d5611222a520085f2868b2bfb50ecf97e7 100644
(file)
--- a/
config/boot.rb
+++ b/
config/boot.rb
@@
-4,3
+4,13
@@
require 'rubygems'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
+
+# Use ORVOS_API_TOKEN environment variable (if set) in console
+require 'rails'
+module OrvosApiClientConsoleMode
+ class Railtie < Rails::Railtie
+ console do
+ Thread.current[:orvos_api_token] ||= ENV['ORVOS_API_TOKEN']
+ end
+ end
+end