RAILS_ENV=test for travis #40

This commit is contained in:
Alexander Meindl 2019-03-13 07:57:50 +01:00
parent f32d4c3870
commit 57fac45dd7
2 changed files with 14 additions and 12 deletions

View File

@ -27,7 +27,7 @@ before_install:
- export REDMINE_GIT_REPO=git://github.com/redmine/redmine.git
- export REDMINE_PATH=$HOME/redmine
- export BUNDLE_GEMFILE=$REDMINE_PATH/Gemfile
- export REDMINE_LANG=en
- export RAILS_ENV=test
- git clone $REDMINE_GIT_REPO $REDMINE_PATH
- cd $REDMINE_PATH
- if [[ "$REDMINE_VER" != "master" ]]; then git checkout -b $REDMINE_VER origin/$REDMINE_VER; fi

24
init.rb
View File

@ -38,17 +38,19 @@ Redmine::Plugin.register :additionals do
RedCloth3::ALLOWED_TAGS << 'div'
end
Rails.configuration.to_prepare do
Additionals.setup
end
if ActiveRecord::Base.connection.table_exists?(:settings)
Rails.configuration.to_prepare do
Additionals.setup
end
Rails.application.config.after_initialize do
FONTAWESOME_ICONS = { fab: AdditionalsFontAwesome.load_icons(:fab),
far: AdditionalsFontAwesome.load_icons(:far),
fas: AdditionalsFontAwesome.load_icons(:fas) }.freeze
end
Rails.application.config.after_initialize do
FONTAWESOME_ICONS = { fab: AdditionalsFontAwesome.load_icons(:fab),
far: AdditionalsFontAwesome.load_icons(:far),
fas: AdditionalsFontAwesome.load_icons(:fas) }.freeze
end
Rails.application.paths['app/overrides'] ||= []
Dir.glob(Rails.root.join('plugins', '*', 'app', 'overrides')).each do |dir|
Rails.application.paths['app/overrides'] << dir unless Rails.application.paths['app/overrides'].include?(dir)
Rails.application.paths['app/overrides'] ||= []
Dir.glob(Rails.root.join('plugins', '*', 'app', 'overrides')).each do |dir|
Rails.application.paths['app/overrides'] << dir unless Rails.application.paths['app/overrides'].include?(dir)
end
end