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

Version Path
elocal_api_support-1.3.0 spec/fixtures/application.rb
elocal_api_support-1.2.0 spec/fixtures/application.rb
elocal_api_support-1.1.0 spec/fixtures/application.rb
elocal_api_support-1.0.0 spec/fixtures/application.rb
elocal_api_support-0.1.10 spec/fixtures/application.rb
elocal_api_support-0.1.9 spec/fixtures/application.rb
elocal_api_support-0.1.8 spec/fixtures/application.rb
elocal_api_support-0.1.7 spec/fixtures/application.rb
elocal_api_support-0.1.5 spec/fixtures/application.rb
elocal_api_support-0.1.4 spec/fixtures/application.rb
elocal_api_support-0.1.3 spec/fixtures/application.rb