Add config setting for using local persona js file

openid
Marcin Kulik 11 years ago
parent bf8b49b108
commit 4e3c9a5d28

@ -8,7 +8,7 @@ html[lang="en"]
= stylesheet_link_tag "application", :media => "all"
= javascript_include_tag "application"
= javascript_include_tag "player"
- if Rails.env.development?
- if CFG.local_persona_js?
= javascript_include_tag "persona-include.js"
- else
= javascript_include_tag "https://login.persona.org/include.js"

@ -12,7 +12,8 @@ defaults = {
AWS_SECRET_ACCESS_KEY: nil,
AWS_REGION: nil,
AWS_BUCKET: nil,
SECRET_TOKEN: '21deaa1a1228e119434aa783ecb4af21be7513ff1f5b8c1d8894241e5fc70ad395db72c8c1b0508a0ebb994ed88a8d73f6c84e44f7a4bc554a40d77f9844d2f4'
SECRET_TOKEN: '21deaa1a1228e119434aa783ecb4af21be7513ff1f5b8c1d8894241e5fc70ad395db72c8c1b0508a0ebb994ed88a8d73f6c84e44f7a4bc554a40d77f9844d2f4',
LOCAL_PERSONA_JS: true
}.stringify_keys!
cfg_file = File.expand_path(File.dirname(__FILE__) + '/asciinema.yml')
@ -39,6 +40,10 @@ module Asciinema
@cfg.key?(key) || super
end
def local_persona_js?
local_persona_js.to_s == 'true'
end
def [](key)
send(key)
end

Loading…
Cancel
Save