Sha256: 219998bf9337638e00d8a0b5e5f7cc22d1e70168227ef171311c98c8bcd076f8
Contents?: true
Size: 632 Bytes
Versions: 11
Compression:
Stored size: 632 Bytes
Contents
require 'active_support/all' require 'action_controller' require 'action_dispatch' module Rails class App def env_config {} end def config OpenStruct.new end def routes return @routes if defined?(@routes) @routes = ActionDispatch::Routing::RouteSet.new @routes.draw do resources :auth end @routes end def logger @logger ||= begin Dir.mkdir('log') unless Dir.exist?('log') Logger.new('log/test.log') end end end def self.logger application.logger end def self.application @app ||= App.new end end
Version data entries
11 entries across 11 versions & 1 rubygems