Sha256: 3987c92bdad36d9fba996f40d16832ed53da180d45ad9ac9bd5c4c5132bb8f50

Contents?: true

Size: 1.11 KB

Versions: 7

Compression:

Stored size: 1.11 KB

Contents

# coding: utf-8
require "json"
require "openssl"
require "base64"
require 'macaddr'
require 'byebug'
require 'logger'
require 'bigdecimal'
require 'bigdecimal/util'
require 'rest-client'

require "lanmao/version"

require "lanmao/version"
require "lanmao/utils"
require "lanmao/extensions"
require "lanmao/sign/rsa"
require "lanmao/http/request"
require "lanmao/http/response"

# 自动加载所有 api
Dir["#{File.dirname(__FILE__)}/lanmao/api/**/*.rb"].each { |file| require file }
# 自动加载所有 form
Dir["#{File.dirname(__FILE__)}/lanmao/form/**/*.rb"].each { |file| require file }
# 自动加载所有 http error code
Dir["#{File.dirname(__FILE__)}/lanmao/http/error_code/**/*.rb"].each { |file| require file }

module Lanmao
  module Form
  end
end

require "lanmao/client"

module Lanmao

  class << self
    def logger
      @logger ||= default_logger
    end

    def default_logger
      _logger = Logger.new(STDOUT)
      _logger.level = Logger::INFO
      _logger
    end

    def logger=(log)
      @logger = (log ? log : Logger.new('/dev/null'))
    end
  end

end

require 'lanmao/railtie' if defined?(::Rails)

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
lanmao-0.8.0 lib/lanmao.rb
lanmao-0.7.0 lib/lanmao.rb
lanmao-0.6.0 lib/lanmao.rb
lanmao-0.5.0 lib/lanmao.rb
lanmao-0.4.0 lib/lanmao.rb
lanmao-0.2.0 lib/lanmao.rb
lanmao-0.1.0 lib/lanmao.rb