Class: Spork::AppFramework::Padrino

Inherits:
Spork::AppFramework show all
Defined in:
lib/spork/app_framework/padrino.rb

Constant Summary

Constants inherited from Spork::AppFramework

SUPPORTED_FRAMEWORKS

Instance Method Summary collapse

Methods inherited from Spork::AppFramework

[], #bootstrap_required?, detect_framework, detect_framework_name, setup_autoload, short_name, #short_name

Instance Method Details

#boot_contentsObject



18
19
20
# File 'lib/spork/app_framework/padrino.rb', line 18

def boot_contents
  @boot_contents ||= File.read(boot_file)
end

#entry_pointObject Also known as: boot_file



13
14
15
# File 'lib/spork/app_framework/padrino.rb', line 13

def entry_point
  @entry_point ||= File.expand_path("config/boot.rb", Dir.pwd)
end

#preload(&block) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/spork/app_framework/padrino.rb', line 3

def preload(&block)
  STDERR.puts "Preloading Padrino environment"
  STDERR.flush
  ENV["PADRINO_ENV"] ||= "test"
  require boot_file
  # Make it so that we don't have to restart Spork if we change, say, a model or routes
  Spork.each_run { ::Padrino.reload! }
  yield
end