mirror of
https://github.com/wahyd4/ruby-sdk.git
synced 2026-08-09 21:06:19 +10:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5332645665 | ||
|
|
946442f782 | ||
|
|
8e4805cf68 | ||
|
|
78147d76f8 | ||
|
|
2bb0514df4 | ||
|
|
0bca27457a | ||
|
|
b21833779e | ||
|
|
a64fb3a63e | ||
|
|
0d2f2f23dd | ||
|
|
d0b4fb7412 | ||
|
|
40bf2cfbbb | ||
|
|
4e80a5ec98 | ||
|
|
4fbfdbf472 | ||
|
|
d14fe23e45 | ||
|
|
3d0578cb88 | ||
|
|
09b8921d20 |
@@ -1,5 +1,9 @@
|
||||
## CHANGE LOG
|
||||
|
||||
### v6.4.1
|
||||
|
||||
- 将 mime-types 的依赖版本升级到 2.4.3 。 [https://github.com/qiniu/ruby-sdk/pull/113](https://github.com/qiniu/ruby-sdk/pull/113)
|
||||
|
||||
### v6.4.0
|
||||
|
||||
- 为 put_with_put_policy() 添加 opts 参数,允许使用 :content_type 键指定上传文件的 mime type。 [https://github.com/qiniu/ruby-sdk/pull/111](https://github.com/qiniu/ruby-sdk/pull/111)
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
qiniu (6.4.0)
|
||||
qiniu (6.4.1)
|
||||
json (~> 1.7)
|
||||
mime-types (~> 1.19)
|
||||
mime-types (~> 2.4.3)
|
||||
rest-client (~> 1.6)
|
||||
ruby-hmac (~> 0.4)
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
在您 Ruby 应用程序的 `Gemfile` 文件中,添加如下一行代码:
|
||||
|
||||
gem 'qiniu', '~> 6.3.1'
|
||||
gem 'qiniu', '~> 6.4.1'
|
||||
|
||||
然后,在应用程序所在的目录下,可以运行 `bundle` 安装依赖包:
|
||||
|
||||
|
||||
+3
-2
@@ -34,13 +34,14 @@ module Qiniu
|
||||
:tmpdir => Dir.tmpdir + File::SEPARATOR + 'QiniuRuby'
|
||||
}
|
||||
|
||||
REQUIRED_OPTION_KEYS = [:access_key, :secret_key]
|
||||
REQUIRED_OPTION_KEYS = [:access_key, :secret_key, :up_host]
|
||||
|
||||
attr_reader :settings, :default_params
|
||||
|
||||
def load config_file
|
||||
if File.exist?(config_file)
|
||||
config_options = YAML.load_file(config_file)
|
||||
config_options.symbolize_keys!
|
||||
initialize_connect(config_options)
|
||||
else
|
||||
raise MissingConfError, config_file
|
||||
@@ -48,7 +49,7 @@ module Qiniu
|
||||
end
|
||||
|
||||
def initialize_connect options = {}
|
||||
@settings = DEFAULT_OPTIONS.merge(options)
|
||||
@settings = DEFAULT_OPTIONS.merge!(options)
|
||||
REQUIRED_OPTION_KEYS.each do |opt|
|
||||
raise MissingArgsError, [opt] unless @settings.has_key?(opt)
|
||||
end
|
||||
|
||||
@@ -4,7 +4,7 @@ module Qiniu
|
||||
module Version
|
||||
MAJOR = 6
|
||||
MINOR = 4
|
||||
PATCH = 0
|
||||
PATCH = 1
|
||||
# Returns a version string by joining <tt>MAJOR</tt>, <tt>MINOR</tt>, and <tt>PATCH</tt> with <tt>'.'</tt>
|
||||
#
|
||||
# Example
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ Gem::Specification.new do |gem|
|
||||
gem.add_development_dependency "fakeweb", "~> 1.3"
|
||||
gem.add_runtime_dependency "json", "~> 1.7"
|
||||
gem.add_runtime_dependency "rest-client", "~> 1.6"
|
||||
gem.add_runtime_dependency "mime-types", "~> 1.19"
|
||||
gem.add_runtime_dependency "mime-types", "~> 2.4.3"
|
||||
gem.add_runtime_dependency "ruby-hmac", "~> 0.4"
|
||||
gem.add_runtime_dependency "jruby-openssl", "~> 0.7" if RUBY_PLATFORM == "java"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user