Class Spork::AppFramework
In: lib/spork/app_framework.rb
Parent: Object

Methods

Classes and Modules

Class Spork::AppFramework::Padrino
Class Spork::AppFramework::Rails
Class Spork::AppFramework::Unknown

Constants

SUPPORTED_FRAMEWORKS = { :Padrino => lambda { File.exist?("config/boot.rb") && File.read("config/boot.rb").include?('PADRINO')   A hash of procs where the key is the class name, and the proc takes no arguments and returns true if it detects that said application framework is being used in the project.

The key :Rails maps to Spork::AppFramework::Rails

This is used to reduce the amount of code needed to be loaded - only the detected application framework‘s support code is loaded.

Public Class methods

Initializes, stores, and returns a singleton instance of the named AppFramework.

Parameters

# name - A symbolic name of a AppFramework subclass

Example

  Spork::AppFramework[:Rails]

Same as detect_framework_name, but returns an instance of the specific AppFramework class.

Iterates through all SUPPORTED_FRAMEWORKS and returns the symbolic name of the project application framework detected. Otherwise, returns :Unknown

Protected Class methods

Public Instance methods

If there is some stuff out of the box that the Spork can do to speed up tests without the test helper file being bootstrapped, this should return false.

Abstract: The path to the file that loads the project environment, ie config/environment.rb. Returns nil if there is none.

[Validate]