Sha256: 0e228de7c37dd29c3973769fc67739938822674d0727429c7ab0df5be9008398
Contents?: true
Size: 944 Bytes
Versions: 34
Compression:
Stored size: 944 Bytes
Contents
require_relative 'plugin_factory/version' require_relative 'plugin_factory/load' ######################################################################################################################## class Fanforce::PluginFactory def self.generate(plugin_base_dir) require_relative 'plugin_factory/plugin' require_relative 'plugin_factory/load_sprockets' if ENV['RACK_ENV'] == 'development' Fanforce::Plugin.load(plugin_base_dir) end end ######################################################################################################################## # The following is run if file is required from config.ru or Rakefile if caller[0].split(':')[0] =~ /^(.+)\/(config\.ru|Rakefile)$/ plugin_base_dir = $1 loader_filename = $2 ENV['RACK_ENV'] ||= 'development' Fanforce::PluginFactory.generate(plugin_base_dir) load "#{Fanforce::Plugin.config.factory_dir}/Rakefile" if loader_filename == 'Rakefile' end
Version data entries
34 entries across 34 versions & 1 rubygems