Class: Boot

Inherits:
Object
  • Object
show all
Defined in:
lib/configuration_extensions/configuration_extensions.rb

Direct Known Subclasses

AppBoot, GemBoot, VendorBoot

Instance Method Summary collapse

Instance Method Details

#load_initializerObject



280
281
282
283
284
285
286
287
288
289
290
291
# File 'lib/configuration_extensions/configuration_extensions.rb', line 280

def load_initializer
  begin
    require 'trusty_cms'
    require 'trusty_cms/initializer'
  rescue LoadError => _
    $stderr.puts %(TrustyCms could not be initialized. #{load_error_message})
    exit 1
  end
  TrustyCms::Initializer.run(:set_load_path)
  TrustyCms::Initializer.run(:install_gem_spec_stubs)
  Rails::GemDependency.add_frozen_gem_path
end

#load_mutexObject

RubyGems from version 1.6 does not require thread but Rails depend on it This should newer rails do automaticly



271
272
273
274
275
276
277
278
# File 'lib/configuration_extensions/configuration_extensions.rb', line 271

def load_mutex
  begin
    require "thread" unless defined?(Mutex)
  rescue LoadError => _
    $stderr.puts %(Mutex could not be initialized. #{load_error_message})
    exit 1
  end
end

#runObject



264
265
266
267
# File 'lib/configuration_extensions/configuration_extensions.rb', line 264

def run
  load_mutex
  load_initializer
end