Sha256: c4578eadd1ee95319d425cd61a2fc4c9d68fb4b46a4d826b4d1578dc3a74f666
Contents?: true
Size: 989 Bytes
Versions: 2
Compression:
Stored size: 989 Bytes
Contents
# coding: utf-8 require_relative 'cos/version' require_relative 'cos/util' require_relative 'cos/struct' require_relative 'cos/logging' require_relative 'cos/exception' require_relative 'cos/config' require_relative 'cos/signature' require_relative 'cos/client' require_relative 'cos/bucket' require_relative 'cos/http' require_relative 'cos/checkpoint' require_relative 'cos/slice' require_relative 'cos/api' require_relative 'cos/resource' require_relative 'cos/file' require_relative 'cos/dir' require_relative 'cos/download' require_relative 'cos/tree' module COS # 初始化实例方法 def self.client(options = {}) unless @client # Rails配置 if defined? Rails COS::Logging.set_logger(Rails.root.join('log/cos-sdk.log'), Logger::INFO) configs = options.merge(config: Rails.root.join('config/cos.yml')) @client = COS::Client.new(configs) else @client = COS::Client.new(options) end end @client end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cos-0.1.2 | lib/cos.rb |
cos-0.1.1 | lib/cos.rb |