Spork::AppFramework::Rails

Public Instance Methods

boot_file() click to toggle source
     # File lib/spork/app_framework/rails.rb, line 130
130:   def boot_file
131:     @boot_file ||= File.join(File.dirname(environment_file), 'boot')
132:   end
entry_point() click to toggle source
     # File lib/spork/app_framework/rails.rb, line 124
124:   def entry_point
125:     @entry_point ||= File.expand_path("config/environment.rb", Dir.pwd)
126:   end
Also aliased as: environment_file
environment_contents() click to toggle source
     # File lib/spork/app_framework/rails.rb, line 134
134:   def environment_contents
135:     @environment_contents ||= File.read(environment_file)
136:   end
environment_file() click to toggle source
Alias for: entry_point
preload(&block) click to toggle source
     # File lib/spork/app_framework/rails.rb, line 116
116:   def preload(&block)
117:     STDERR.puts "Preloading Rails environment"
118:     STDERR.flush
119:     ENV["RAILS_ENV"] ||= 'test'
120:     preload_rails
121:     yield
122:   end
preload_rails() click to toggle source
     # File lib/spork/app_framework/rails.rb, line 152
152:   def preload_rails
153:     Object.const_set(:RAILS_GEM_VERSION, version) if version
154:     require boot_file
155:     ::Rails::Initializer.send(:include, Spork::AppFramework::Rails::NinjaPatcher)
156:   end
vendor() click to toggle source
     # File lib/spork/app_framework/rails.rb, line 138
138:   def vendor
139:     @vendor ||= File.expand_path("vendor/rails", Dir.pwd)
140:   end
version() click to toggle source
     # File lib/spork/app_framework/rails.rb, line 142
142:   def version
143:     @version ||= (
144:       if /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/.match(environment_contents)
145:         $1
146:       else
147:         nil
148:       end
149:     )
150:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.