Created
April 26, 2016 19:20
-
-
Save godfat/ed80325e5b403733fe94ef50301b54ea to your computer and use it in GitHub Desktop.
minimal rails app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rails' | |
require 'logger' | |
APP_PATH = 'rails' | |
root = File.expand_path("#{__dir__}/..") | |
config = Rails::Application::Configuration.new | |
config.root = root | |
app = Class.new(Struct.new(:root, :config)) do | |
def call _ | |
[200, {}, ["OK\n"]] | |
end | |
end.new(root, config) | |
Rails.application = app | |
Rails.logger = Logger.new(File.open(IO::NULL)) | |
require 'rails/commands' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment