Sha256: 6a21b1f23980c1e8a3e927d523e2027f3d6ed848db1e2293648978555fc6f261
Contents?: true
Size: 1.17 KB
Versions: 4
Compression:
Stored size: 1.17 KB
Contents
#!/usr/bin/env ruby __DIR__ = File.join(File.dirname(__FILE__),"..") framework = File.join(__DIR__,"framework") if File.directory?(framework) puts "Running from frozen framework" core = File.join(framework,"merb-core") if File.directory?(core) $:.push File.join(core,"lib") end more = File.join(framework,"merb-more") if File.directory?(more) Dir.new(more).select {|d| d =~ /merb-/}.each do |d| $:.push File.join(more,d,'lib') end end plugins = File.join(framework,"merb-plugins") if File.directory?(plugins) Dir.new(plugins).select {|d| d =~ /merb_/}.each do |d| $:.push File.join(plugins,d,'lib') end end require "merb-core/core_ext/kernel" require "merb-core/core_ext/rubygems" else gem = Dir.glob(__DIR__ + "/gems/gems/merb-core-*").last raise "Can't run frozen without framework/ or local gem" unless gem require gem + "/lib/merb-core/core_ext/kernel" require gem + "/lib/merb-core/core_ext/rubygems" Gem.clear_paths Gem.path.unshift(__DIR__+"/gems") end require 'merb-core' unless %w[-a --adapter -i --irb-console -r --script-runner].any? { |o| ARGV.index(o) } ARGV.push *%w[-a mongrel] end Merb.frozen! Merb.start
Version data entries
4 entries across 4 versions & 2 rubygems