Module: Miso
- Defined in:
- lib/miso/loader.rb,
lib/miso/static.rb,
lib/miso/rewrite.rb,
lib/miso/version.rb,
lib/miso/commands.rb
Defined Under Namespace
Modules: Commands Classes: Rewrite, StaticSite
Constant Summary collapse
- VERSION =
Miso current version
'0.1.2'
Class Method Summary collapse
-
.load(app_path) ⇒ Object
Load a Rack application from a config.ru file.
Class Method Details
.load(app_path) ⇒ Object
Load a Rack application from a config.ru file.
3 4 5 6 7 8 9 10 |
# File 'lib/miso/loader.rb', line 3 def load(app_path) currentDir = Dir.getwd Dir.chdir(currentDir+'/'+app_path) rackup_code = ::File.read('config.ru') app = eval("Rack::Builder.new {( #{rackup_code}\n )}.to_app") Dir.chdir(currentDir) app end |