Sha256: 3840c8b4d94bbeb2e33dcd122d01ed2f264078e9684cc0f862f472e031845f12

Contents?: true

Size: 1.23 KB

Versions: 23

Compression:

Stored size: 1.23 KB

Contents

# coding: utf-8
require "uri"
require "net/http"
require "json"
require "openssl"
require "base64"
require 'macaddr'
require 'byebug'
require 'logger'
require 'bigdecimal'
require 'bigdecimal/util'

require "reapal/version"
require "reapal/utils"
require "reapal/extensions"
require "reapal/sign/md5"
require "reapal/encrypt/rsa"
require "reapal/encrypt/aes"
require "reapal/http/communicate"
require "reapal/http/decode"
require "reapal/http/response"
require "reapal/http/error_code/common"
require "reapal/http/error_code/user"
require "reapal/http/error_code/money"
require "reapal/http/error_code/tender"
require "reapal/http/error_code/order"

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

require "reapal/client"

# 融宝存管
# 主入口
module Reapal

  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 'reapal/railtie' if defined?(::Rails)

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
reapal-0.18.0 lib/reapal.rb
reapal-0.17.0 lib/reapal.rb
reapal-0.16.0 lib/reapal.rb
reapal-0.15.0 lib/reapal.rb
reapal-0.14.0 lib/reapal.rb
reapal-0.13.0 lib/reapal.rb
reapal-0.12.0 lib/reapal.rb
reapal-0.11.0 lib/reapal.rb
reapal-0.10.1 lib/reapal.rb
reapal-0.10.0 lib/reapal.rb
reapal-0.9.13 lib/reapal.rb
reapal-0.9.12 lib/reapal.rb
reapal-0.9.11 lib/reapal.rb
reapal-0.9.10 lib/reapal.rb
reapal-0.9.9 lib/reapal.rb
reapal-0.9.7 lib/reapal.rb
reapal-0.9.6 lib/reapal.rb
reapal-0.9.5 lib/reapal.rb
reapal-0.9.3 lib/reapal.rb
reapal-0.9.2 lib/reapal.rb