ignore cap files, move auth config to yaml file
This commit is contained in:
parent
51f3650ce2
commit
d8da87cbd9
6 changed files with 6 additions and 17 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,3 +2,4 @@
|
||||||
db/*.sqlite3
|
db/*.sqlite3
|
||||||
log/*.log
|
log/*.log
|
||||||
tmp/**/*
|
tmp/**/*
|
||||||
|
Capfile
|
||||||
|
|
|
@ -5,11 +5,7 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def auth_server_icon_url
|
def auth_server_icon_url
|
||||||
# TODO: if auth servers expand, don't hardcode path
|
"http://#{Openneo::Auth.config.auth_server}/favicon.png"
|
||||||
URI::HTTP.build(
|
|
||||||
:host => Openneo::Auth.config.auth_server,
|
|
||||||
:path => '/favicon.png'
|
|
||||||
).to_s
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def body_class
|
def body_class
|
||||||
|
|
2
config/.gitignore
vendored
2
config/.gitignore
vendored
|
@ -1 +1,3 @@
|
||||||
database.yml
|
database.yml
|
||||||
|
deploy.rb
|
||||||
|
openneo_auth.yml
|
||||||
|
|
|
@ -21,8 +21,3 @@ OpenneoImpressItems::Application.configure do
|
||||||
end
|
end
|
||||||
|
|
||||||
RemoteImpressHost = 'beta.impress.openneo.net'
|
RemoteImpressHost = 'beta.impress.openneo.net'
|
||||||
OPENNEO_AUTH_CONFIG = {
|
|
||||||
:app => 'beta.items.impress',
|
|
||||||
:auth_server => 'openneo-id',
|
|
||||||
:secret => 'zaheh2draswAb8eneca$3an?2ADAsTuwra8h7BujUBr_w--p2-a@e?u!taQux3tr'
|
|
||||||
}
|
|
||||||
|
|
|
@ -25,9 +25,3 @@ end
|
||||||
RemoteImpressHost = 'beta.impress.openneo.net'
|
RemoteImpressHost = 'beta.impress.openneo.net'
|
||||||
|
|
||||||
USE_FIBER_POOL = true
|
USE_FIBER_POOL = true
|
||||||
|
|
||||||
OPENNEO_AUTH_CONFIG = {
|
|
||||||
:app => 'beta.items.impress',
|
|
||||||
:auth_server => 'beta.id.openneo.net',
|
|
||||||
:secret => 'zaheh2draswAb8eneca$3an?2ADAsTuwra8h7BujUBr_w--p2-a@e?u!taQux3tr'
|
|
||||||
}
|
|
||||||
|
|
|
@ -4,9 +4,10 @@ Rails.configuration.middleware.use RailsWarden::Manager do |manager|
|
||||||
end
|
end
|
||||||
|
|
||||||
require 'openneo-auth'
|
require 'openneo-auth'
|
||||||
|
require 'yaml'
|
||||||
|
|
||||||
Openneo::Auth.configure do |config|
|
Openneo::Auth.configure do |config|
|
||||||
OPENNEO_AUTH_CONFIG.each do |key, value|
|
YAML.load_file(Rails.root.join('config', 'openneo_auth.yml'))[Rails.env].each do |key, value|
|
||||||
config.send("#{key}=", value)
|
config.send("#{key}=", value)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue