mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-21 15:54:22 +01:00
prepare app to receive navi_gami plugin
This commit is contained in:
parent
822705c54c
commit
3cf75d794f
@ -64,8 +64,14 @@ module Fablab
|
|||||||
config.web_console.whitelisted_ips << '10.0.2.2' #vagrant
|
config.web_console.whitelisted_ips << '10.0.2.2' #vagrant
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# enable the app to find locales in plugins locales directory
|
||||||
config.i18n.load_path += Dir["#{Rails.root}/plugins/*/config/locales/*.yml"]
|
config.i18n.load_path += Dir["#{Rails.root}/plugins/*/config/locales/*.yml"]
|
||||||
|
|
||||||
|
# enable the app to find views in plugins views directory
|
||||||
|
Dir["#{Rails.root}/plugins/*/views"].each do |path|
|
||||||
|
Rails.application.config.paths['app/views'] << path
|
||||||
|
end
|
||||||
|
|
||||||
FabManager.activate_plugins!
|
FabManager.activate_plugins!
|
||||||
|
|
||||||
config.after_initialize do
|
config.after_initialize do
|
||||||
|
@ -31,6 +31,8 @@ development:
|
|||||||
openlab_app_secret: <%= ENV["OPENLAB_APP_SECRET"] %>
|
openlab_app_secret: <%= ENV["OPENLAB_APP_SECRET"] %>
|
||||||
openlab_app_id: <%= ENV["OPENLAB_APP_ID"] %>
|
openlab_app_id: <%= ENV["OPENLAB_APP_ID"] %>
|
||||||
openlab_base_uri: <%= ENV["OPENLAB_BASE_URI"] %>
|
openlab_base_uri: <%= ENV["OPENLAB_BASE_URI"] %>
|
||||||
|
navinum_api_login: <%= ENV["NAVINUM_API_LOGIN"] %>
|
||||||
|
navinum_api_password: <%= ENV["NAVINUM_API_PASSWORD"] %>
|
||||||
|
|
||||||
test:
|
test:
|
||||||
secret_key_base: 83daf5e7b80d990f037407bab78dff9904aaf3c195a50f84fa8695a22287e707dfbd9524b403b1dcf116ae1d8c06844c3d7ed942564e5b46be6ae3ead93a9d30
|
secret_key_base: 83daf5e7b80d990f037407bab78dff9904aaf3c195a50f84fa8695a22287e707dfbd9524b403b1dcf116ae1d8c06844c3d7ed942564e5b46be6ae3ead93a9d30
|
||||||
@ -53,6 +55,8 @@ test:
|
|||||||
openlab_app_secret:
|
openlab_app_secret:
|
||||||
openlab_app_id:
|
openlab_app_id:
|
||||||
openlab_base_uri:
|
openlab_base_uri:
|
||||||
|
navinum_api_login:
|
||||||
|
navinum_api_password:
|
||||||
|
|
||||||
staging:
|
staging:
|
||||||
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
||||||
@ -82,6 +86,8 @@ staging:
|
|||||||
openlab_app_secret: <%= ENV["OPENLAB_APP_SECRET"] %>
|
openlab_app_secret: <%= ENV["OPENLAB_APP_SECRET"] %>
|
||||||
openlab_app_id: <%= ENV["OPENLAB_APP_ID"] %>
|
openlab_app_id: <%= ENV["OPENLAB_APP_ID"] %>
|
||||||
openlab_base_uri: <%= ENV["OPENLAB_BASE_URI"] %>
|
openlab_base_uri: <%= ENV["OPENLAB_BASE_URI"] %>
|
||||||
|
navinum_api_login: <%= ENV["NAVINUM_API_LOGIN"] %>
|
||||||
|
navinum_api_password: <%= ENV["NAVINUM_API_PASSWORD"] %>
|
||||||
|
|
||||||
# Do not keep production secrets in the repository,
|
# Do not keep production secrets in the repository,
|
||||||
# instead read values from the environment.
|
# instead read values from the environment.
|
||||||
@ -114,3 +120,5 @@ production:
|
|||||||
openlab_app_id: <%= ENV["OPENLAB_APP_ID"] %>
|
openlab_app_id: <%= ENV["OPENLAB_APP_ID"] %>
|
||||||
openlab_base_uri: <%= ENV["OPENLAB_BASE_URI"] %>
|
openlab_base_uri: <%= ENV["OPENLAB_BASE_URI"] %>
|
||||||
google_analytics_id: <%= ENV["GA_ID"] %>
|
google_analytics_id: <%= ENV["GA_ID"] %>
|
||||||
|
navinum_api_login: <%= ENV["NAVINUM_API_LOGIN"] %>
|
||||||
|
navinum_api_password: <%= ENV["NAVINUM_API_PASSWORD"] %>
|
||||||
|
@ -47,3 +47,7 @@ UIB_DATE_FORMAT=dd/MM/yyyy
|
|||||||
|
|
||||||
OPENLAB_APP_SECRET: 'fSF9jZEWxjHyqjAzzg34jd92'
|
OPENLAB_APP_SECRET: 'fSF9jZEWxjHyqjAzzg34jd92'
|
||||||
OPENLAB_APP_ID: 'xLn9CmryyURNNHZiDRYVRXbv'
|
OPENLAB_APP_ID: 'xLn9CmryyURNNHZiDRYVRXbv'
|
||||||
|
|
||||||
|
|
||||||
|
NAVINUM_API_LOGIN:
|
||||||
|
NAVINUM_API_PASSWORD:
|
||||||
|
@ -3,7 +3,7 @@ require 'plugin_registry'
|
|||||||
|
|
||||||
module Plugin
|
module Plugin
|
||||||
class Instance
|
class Instance
|
||||||
attr_accessor :path
|
attr_accessor :path#, :directory
|
||||||
|
|
||||||
[:assets, :initializers, :javascripts, :styles].each do |att|
|
[:assets, :initializers, :javascripts, :styles].each do |att|
|
||||||
class_eval %Q{
|
class_eval %Q{
|
||||||
@ -28,6 +28,7 @@ module Plugin
|
|||||||
def initialize(metadata=nil, path=nil)
|
def initialize(metadata=nil, path=nil)
|
||||||
@metadata = metadata
|
@metadata = metadata
|
||||||
@path = path
|
@path = path
|
||||||
|
#@directory = path.match(/(.*)\/plugin.rb/)[1]
|
||||||
@idx = 0
|
@idx = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user