upyun 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3e728cd2f23654592cfaea37730c0ad780a31eea
4
- data.tar.gz: 41572412bf3d5ea83525082d71851687605fc7bc
3
+ metadata.gz: bfbd5be64ea11f088fedd5b5923496458ca543a9
4
+ data.tar.gz: b269595a497748ecc3c744aa43595aa84d03ac69
5
5
  SHA512:
6
- metadata.gz: ec030a7fcc5ff6009b077d2408bfa945666bcbeebf49f0fc9fd33dfb2c8635c74e84baea60943bc23c6ba4fcef794d4b6e0aeae92b407be203fda37a32153b62
7
- data.tar.gz: 8ad799d0272e685c803308c313bea67d75432331d9964416fba150b8802df9b6e3f8cc7b9b08d3bc97bbe45db111814f12509eabab79a8bd6599bbad7ab5ed83
6
+ metadata.gz: 53fa5fce2ac4c9886659f080026136c8d2213724ac9904f2a77864d2c8045b57e9cc1bc9e7349ad51bd175dfa93c0bc2baa9f0985d04f29ce0d39db42c1822cf
7
+ data.tar.gz: ec874df8d90f96dde3b8ace8d47bb9498120192221c032b9618bd457e516785d9d3ae6a9d9075733b6336a328efe495ec62a309496f6057e3dc342a63f12116b
data/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ ## CHANGE LOG
2
+
3
+ ### v1.0.2
4
+ - 初始化实例的时候增加选项,特别地将连接超时时间设为 60s;
5
+ - URL `encode`, `decode` 使用 `open-uri` 代替 `uri`;
6
+ - 定义 `User-Agent` 为 `Upyun-Ruby-SDK-<VERSION>`;
7
+ - `Upyun::Rest#usage` 方法如下去掉多余的参数;
8
+
data/README.md CHANGED
@@ -3,27 +3,35 @@
3
3
  [![Build status](https://img.shields.io/travis/upyun/ruby-sdk.svg?style=flat)](https://travis-ci.org/upyun/ruby-sdk)
4
4
  [![Coverage Status](https://img.shields.io/coveralls/upyun/ruby-sdk.svg)](https://coveralls.io/r/upyun/ruby-sdk)
5
5
 
6
- [UPYUN](https://www.upyun.com) [Rest API](http://docs.upyun.com/api/rest_api/) [Form API](http://docs.upyun.com/api/form_api/) 的 Ruby SDK !
6
+ [UPYUN](https://www.upyun.com) 官方 [Rest API](http://docs.upyun.com/api/rest_api/) 以及 [Form API](http://docs.upyun.com/api/form_api/) SDK !
7
7
 
8
+ > **注:**
9
+ > `0.x.x` 版本为之前第三方开发者 [veggie89](https://rubygems.org/profiles/veggie89) 开发,后续将不会维护,如果您有使用 `0.x.x` 版本,请尽快切换至 `1.x.x` 版本,以获得最新的官方 SDK 支持
8
10
 
9
- ## 安装说明
11
+ ## 安装
10
12
 
11
- *Gemfile* 中加入以下代码
13
+ 在 `Gemfile` 中加入以下代码
12
14
 
13
15
  ```ruby
14
- gem 'upyun'
16
+ gem 'upyun', '~> 1.0.1'
15
17
  ```
16
18
 
17
- 然后执行:
19
+ 然后执行如下命令安装:
18
20
 
19
- $ bundle
21
+ ```
22
+ $ bundle
23
+ ```
20
24
 
21
- 或者可以手动安装:
25
+ 或者可以使用 `gem` 手动安装:
22
26
 
23
- $ gem install upyun
27
+ ```
28
+ $ gem install upyun
29
+ ```
24
30
 
25
31
  ## 基本使用
26
32
 
33
+ 在使用本 SDK 之前,您需要拥有一个有效的 UPYUN 空间,并做好操作员的授权。详情可见 [开发者指南](http://docs.upyun.com/guide/#_2)
34
+
27
35
  ### Rest API 使用
28
36
 
29
37
  #### 初始化一个实例
@@ -31,13 +39,17 @@ gem 'upyun'
31
39
  ```ruby
32
40
  require 'upyun'
33
41
 
34
- upyun = Upyun::Rest.new('bucket', 'operator', 'password', 'endpoint')
42
+ upyun = Upyun::Rest.new('bucket', 'operator', 'password', 'options', 'endpoint')
35
43
  ```
44
+ **参数**
36
45
 
37
- 其中,参数 `bucket` 为空间名称,`operator` 为授权操作员帐号, `password` 为授权操作员密码,必选。
46
+ * `bucket`: UPYUN 空间名称
47
+ * `operator`: 授权操作员帐号
48
+ * `password`: 授权操作员密码
49
+ * `options`: 连接选项,可用的选项见[RestClient::Resource](https://github.com/rest-client/rest-client/blob/master/lib/restclient/resource.rb), 默认设置超时时间 60s
50
+ * `endpoint`(可选)(默认:`Upyun::ED_AUTO`): API接入点,可根据具体网络情况设置最优的接入点,详情见 [API 域名](http://docs.upyun.com/api/)
38
51
 
39
- 参数 `endpoint` 为又拍云存储 API 接入点,根据国内的网络情况,又拍云存储 API 提供了电信、联通(网通)、移动(铁通)数个接入点,
40
- 在初始化时可由参数 `endpoint` 进行设置,详情查阅 [API 域名](http://docs.upyun.com/api/)。其可选的值有:
52
+ 其中 `endpoint` 可选值如下:
41
53
 
42
54
  ```ruby
43
55
  Upyun::ED_AUTO # 自动判断最优线路
@@ -46,51 +58,73 @@ Upyun::ED_UNION # 联通(网通)接入点
46
58
  Upyun::ED_CMCC # 移动(铁通)接入点
47
59
  ```
48
60
 
49
- 默认设置为 `Upyun::ED_AUTO` ,但是我们推荐根据服务器网络状况,手动设置合理的接入点以获取最佳的访问速度。
50
- 同时,也可以在初始化一个实例之后通过:
61
+
62
+ > 在初始化实例后,也可以重新切换 API 接入点,方法如下:
51
63
 
52
64
  ```ruby
53
65
  upyun.endpoint = Upyun::ED_CMCC
54
66
  ```
55
- 更改接入点。
56
67
 
57
68
  #### 上传文件
58
69
 
70
+ ##### 默认方式
59
71
  默认使用 Upyun 基本 Header 头上传文件:
60
72
 
73
+ > **注:**
74
+ > 这种方式只指定了又拍云必选的 `Date`, `Content-Length` 两个 Header,其它 Header 信息均未指定
75
+
61
76
  ```ruby
62
77
  upyun.put('/save/to/path', 'file or binary')
63
78
  ```
64
- 其中 `/save/to/path` 为文件保存路径, `file or binary` 为本机上文件路径或者文件内容。
65
- **注:**
66
- > 这里只指定了又拍云必选的 `Date`, `Content-Length` 两个 Header,其它 Header 信息均未指定
79
+ **参数**
80
+
81
+ * `/save/to/path`: 文件在 UPYUN 空间的保存路径
82
+ * `file or binary`:本地文件路径或文件内容
67
83
 
68
- 也可以使用 Upyun 定义的额外 Header 头上传文件,详情查阅 [Rest API](http://docs.upyun.com/api/rest_api/), 如:
84
+ ##### 自定义方式
85
+ 您也可以选择使用 API 允许的额外可选 HTTP Header 参数,以使用 API 提供的预处理等功能:
69
86
 
70
87
  ```ruby
71
88
  headers = {'Content-Type' => 'image/jpeg', 'x-gmkerl-type' => 'fix_width', 'x-gmkerl-value' => 1080}
72
89
  upyun.put('/save/to/path', 'file or binary', headers)
73
90
  ```
74
91
 
92
+ 其中, `/save/to/path` 和 `file or binary` 和默认上传方式中一致,`headers` 参数即为额外的可选 HTTP Header 参数,详情查阅 [Rest API](http://docs.upyun.com/api/rest_api/#_4)
93
+
94
+ **返回**
95
+
75
96
  上传成功返回 `true`,失败返回一个 `Hash` 结构: `{error: {code: code, message: message}}`,
76
97
  其中 `code` 为又拍云返回的错误码, `message` 为错误信息。
77
98
 
78
99
 
79
100
  #### 下载文件
80
101
 
102
+ ##### 获取文件内容
103
+
81
104
  ```ruby
82
105
  file = upyun.get('/path/to/file')
83
106
  ```
84
107
 
108
+ **参数**
109
+
110
+ * `'/path/to/file'`: 文件在 UPYUN 空间中的路径
111
+
112
+ **返回**
85
113
  下载成功返回文件信息,失败返回一个 `Hash`: `{error: {code: code, message: message}}`,
86
114
  其中 `code` 为又拍云返回的错误码, `message` 为错误信息。
87
115
 
88
- 也可以指定保存路径,下载到的文件将写入到保存路径中:
116
+ ##### 保存文件至本地
89
117
 
90
118
  ```ruby
91
119
  upyun.get('/path/to/file', 'saved/foo.png')
92
120
  ```
93
121
 
122
+ **参数**
123
+
124
+ * `'/path/to/file'`: 文件在 UPYUN 空间中的路径
125
+ * `saved/foo.png`: 文件本地保存路径
126
+
127
+ **返回**
94
128
  下载成功返回获取的文件长度。
95
129
 
96
130
 
@@ -99,6 +133,11 @@ upyun.get('/path/to/file', 'saved/foo.png')
99
133
  ```ruby
100
134
  upyun.getinfo('/path/to/file')
101
135
  ```
136
+ **参数**
137
+
138
+ * `'/path/to/file'`: 文件在 UPYUN 空间中的路径
139
+
140
+ **返回**
102
141
 
103
142
  成功返回 `Hash` 结构:
104
143
 
@@ -120,6 +159,11 @@ upyun.getinfo('/path/to/file')
120
159
  ```ruby
121
160
  upyun.delete('/path/to/file')
122
161
  ```
162
+ **参数**
163
+
164
+ * `'/path/to/file'`: 文件在 UPYUN 空间中的路径
165
+
166
+ **返回**
123
167
 
124
168
  成功返回: `true`,
125
169
 
@@ -131,6 +175,12 @@ upyun.delete('/path/to/file')
131
175
  upyun.mkdir('/path/to/dir')
132
176
  ```
133
177
 
178
+ **参数**
179
+
180
+ * `'/path/to/dir'`: 文件在 UPYUN 空间中的路径
181
+
182
+ **返回**
183
+
134
184
  成功返回: `true`,
135
185
 
136
186
  失败返回一个 `Hash`: `{error: {code: code, message: message}}`。
@@ -140,7 +190,11 @@ upyun.mkdir('/path/to/dir')
140
190
  ```ruby
141
191
  upyun.getlist('/path/to/dir')
142
192
  ```
193
+ **参数**
143
194
 
195
+ * `'/path/to/dir'`: 文件在 UPYUN 空间中的路径
196
+
197
+ **返回**
144
198
  成功返回一个数组,每个数组成员为一个文件/目录:
145
199
 
146
200
  ```ruby
@@ -156,6 +210,8 @@ upyun.getlist('/path/to/dir')
156
210
  upyun.usage
157
211
  ```
158
212
 
213
+ **返回**
214
+
159
215
  成功返回空间使用量(单位为 `Byte`): `12400`,
160
216
 
161
217
  失败返回一个 `Hash`: `{error: {code: code, message: message}}`。
@@ -167,32 +223,38 @@ upyun.usage
167
223
  ```ruby
168
224
  require 'upyun'
169
225
 
170
- upyun = Upyun::Form.new('form-password', 'bucket')
226
+ upyun = Upyun::Form.new('form-api-secret', 'bucket', 'options')
171
227
  ```
172
228
 
173
- 其中,参数 `form-password` 为空间表单 API 密钥,可通过又拍云后台获取,`bucket` 为空间名称(必选)。
229
+ **参数**
174
230
 
175
- Rest API 相似, 表单 API 也有个实例变量 `endpoint` 代表又拍云基本域名,默认设置为 `Upyun::ED_AUTO` ,也可以在初始化一个实例之后通过:
231
+ * `form-api-secret`: 表单 API 密钥,可通过 UPYUN 用户控制面板获取
232
+ * `bucket`: UPYUN 空间名称
233
+ * `options`: 连接选项,可用的选项见[RestClient::Resource](https://github.com/rest-client/rest-client/blob/master/lib/restclient/resource.rb), 默认设置超时时间 60s
234
+
235
+ 与 Rest API 相似, 表单 API 也有个实例变量 `endpoint` 代表又拍云基本域名,默认设置为 `Upyun::ED_AUTO` ,也可以在初始化一个实例之后通过如下方式切换:
176
236
 
177
237
  ```ruby
178
238
  upyun.endpoint = Upyun::ED_CMCC
179
239
  ```
180
- 更改接入点。
181
-
182
240
 
183
241
  #### 上传文件
184
242
 
243
+ ##### 简化版
185
244
  为了简化使用,又拍云文档必选的参数中:
186
- >
187
- `save-key` 默认设置为: `'/{year}/{mon}/{day}/{filename}{.suffix}'`
188
- `expiration` 默认设置为10分钟: `Time.now.to_i + 600`
189
245
 
246
+ > `save-key` 默认设置为: `'/{year}/{mon}/{day}/{filename}{.suffix}'` <br />
247
+ > `expiration` 默认设置为10分钟: `Time.now.to_i + 600`
190
248
 
191
- 使用简化版本,不使用额外的策略参数:
249
+ <br />
250
+
251
+ > 使用简化版本,将不使用额外的策略参数:
192
252
 
193
253
  ```ruby
194
254
  upyun.upload('file')
195
255
  ```
256
+
257
+ **返回**
196
258
  上传结果返回一个 `Hash` 结构:
197
259
 
198
260
  ```ruby
@@ -205,13 +267,15 @@ upyun.upload('file')
205
267
  }
206
268
  ```
207
269
  其中
208
- 1. `code`: 返回的状态码,`200` 为成功,其它为失败
209
- 2. `message`: 错误信息,具体查阅 [表单 API 状态代码表](http://docs.upyun.com/api/form_api/#api_2)
210
- 3. `url`: 上传文件保存路径
211
- 4. `time`: 请求的时间戳
212
- 5. `sign`: 签名参数,详情见 [sign与non-sign参数说明](http://docs.upyun.com/api/form_api/#note6)
213
- 6. 如果在请求中指定了 `ext-param`, 那么返回的结构中也会有 `ext-param` 字段,详情见 [ext-param](http://docs.upyun.com/api/form_api/#note5)
214
270
 
271
+ * `code`: 返回的状态码,`200` 为成功,其它为失败
272
+ * `message`: 错误信息,具体查阅 [表单 API 状态代码表](http://docs.upyun.com/api/form_api/#api_2)
273
+ * `url`: 上传文件保存路径
274
+ * `time`: 请求的时间戳
275
+ * `sign`: 签名参数,详情见 [sign与non-sign参数说明](http://docs.upyun.com/api/form_api/#note6)
276
+ * 如果在请求中指定了 `ext-param`, 那么返回的结构中也会有 `ext-param` 字段,详情见 [ext-param](http://docs.upyun.com/api/form_api/#note5)
277
+
278
+ ##### 自定义参数
215
279
  可以在上传的时候指定一些策略参数:
216
280
 
217
281
  ```ruby
@@ -227,10 +291,10 @@ upyun.upload('file', opts)
227
291
  详情查阅 [通知规则](http://docs.upyun.com/api/form_api/#notify_return)
228
292
 
229
293
 
230
- ## Contributing
294
+ ## 贡献
231
295
 
232
- 1. Fork it ( https://github.com/[my-github-username]/upyun/fork )
233
- 2. Create your feature branch (`git checkout -b my-new-feature`)
234
- 3. Commit your changes (`git commit -am 'Add some feature'`)
235
- 4. Push to the branch (`git push origin my-new-feature`)
236
- 5. Create a new Pull Request
296
+ 1. Fork 本仓库 ( https://github.com/upyun/ruby-sdk/fork )
297
+ 2. 创建您的新特性分支 (`git checkout -b my-new-feature`)
298
+ 3. 提交你的更新 (`git commit -am 'Add some feature'`)
299
+ 4. 同步你的代码到 GitHub 远程仓库 (`git push origin my-new-feature`)
300
+ 5. 发起 Pull Request 给我们
data/lib/upyun/form.rb CHANGED
@@ -33,10 +33,12 @@ module Upyun
33
33
  )
34
34
 
35
35
  attr_accessor :bucket, :password
36
+ attr_reader :options
36
37
 
37
- def initialize(password, bucket)
38
+ def initialize(password, bucket, options={timeout: 60})
38
39
  @password = password
39
40
  @bucket = bucket
41
+ @options = options
40
42
  @endpoint = ED_AUTO
41
43
  end
42
44
 
@@ -53,7 +55,7 @@ module Upyun
53
55
  file: File.new(file, 'rb')
54
56
  }
55
57
 
56
- RestClient.post("http://#{@endpoint}/#{@bucket}", payload) do |res|
58
+ rest_client.post(payload, {'User-Agent' => "Upyun-Ruby-SDK-#{VERSION}"}) do |res|
57
59
  case res.code
58
60
  when 302
59
61
  res
@@ -83,5 +85,9 @@ module Upyun
83
85
  end
84
86
  policies.to_json
85
87
  end
88
+
89
+ def rest_client
90
+ @rest_clint ||= RestClient::Resource.new("http://#{@endpoint}/#{@bucket}", options)
91
+ end
86
92
  end
87
93
  end
data/lib/upyun/rest.rb CHANGED
@@ -1,21 +1,24 @@
1
1
  # encoding: utf-8
2
2
  require 'restclient'
3
- require 'uri'
3
+ require 'open-uri'
4
4
 
5
5
  module Upyun
6
6
  class Rest
7
7
  include Utils
8
8
 
9
- def initialize(bucket, operator, password, endpoint=Upyun::ED_AUTO)
9
+ attr_reader :options
10
+
11
+ def initialize(bucket, operator, password, options={timeout: 60}, endpoint=Upyun::ED_AUTO)
10
12
  @bucket = bucket
11
13
  @operator = operator
12
14
  @password = md5(password)
15
+ @options = options
13
16
  @endpoint = endpoint
14
17
  end
15
18
 
16
19
  def put(path, file, headers={})
17
20
  raise ArgumentError, "'file' is not an instance of String" unless file.is_a?(String)
18
- headers = headers.merge({"mkdir" => true}) unless headers.key?("mkdir")
21
+ headers = headers.merge({'mkdir' => true}) unless headers.key?('mkdir')
19
22
  options = if File.file?(file)
20
23
  {body: File.read(file), length: File.size(file), headers: headers}
21
24
  else
@@ -47,22 +50,23 @@ module Upyun
47
50
  request(:post, path, {headers: {folder: true, mkdir: true}})
48
51
  end
49
52
 
50
- def getlist(path="/")
53
+ def getlist(path='/')
51
54
  res = request(:get, path)
52
55
  return res if res.is_a?(Hash)
53
- res.split("\n").map do |f|
54
- attrs = f.split("\t")
56
+
57
+ res.split('\n').map do |f|
58
+ attrs = f.split('\t')
55
59
  {
56
60
  name: attrs[0],
57
- type: attrs[1] == "N" ? :file : :folder,
61
+ type: attrs[1] == 'N' ? :file : :folder,
58
62
  length: attrs[2].to_i,
59
63
  last_modified: attrs[3].to_i
60
64
  }
61
65
  end
62
66
  end
63
67
 
64
- def usage(path="/")
65
- res = request(:get, path, {params: "usage"})
68
+ def usage
69
+ res = request(:get, '/', {query: 'usage'})
66
70
  return res if res.is_a?(Hash)
67
71
 
68
72
  # RestClient has a bug, body.to_i returns the code instead of body,
@@ -80,30 +84,30 @@ module Upyun
80
84
  end
81
85
 
82
86
  def fullpath(path)
83
- "/#{@bucket}#{URI.encode(URI.decode(path[0] == '/' ? path : '/' + path))}"
84
- end
85
-
86
- def encode(fullpath, params)
87
- URI.join("http://#{@endpoint}", fullpath, params.nil? ? '' : '?' + params).to_s
87
+ decoded = URI::encode(URI::decode(path.force_encoding('utf-8')))
88
+ "/#{@bucket}#{decoded.start_with?('/') ? decoded : '/' + decoded}"
88
89
  end
89
90
 
90
91
  def request(method, path, options={})
91
92
  fullpath = fullpath(path)
92
- url = encode(fullpath, options[:params])
93
+ query = options[:query]
94
+ fullpath_query = "#{fullpath}#{query.nil? ? '' : '?' + query}"
93
95
  headers = options[:headers] || {}
94
96
  date = gmdate
95
97
  length = options[:length] || 0
96
98
  headers.merge!({
99
+ 'User-Agent' => "Upyun-Ruby-SDK-#{VERSION}",
97
100
  'Date' => date,
98
101
  'Authorization' => sign(method, date, fullpath, length)
99
102
  })
100
103
 
101
104
  if [:post, :patch, :put].include? method
102
- RestClient.send(method, url, options[:body].nil? ? "" : options[:body], headers) do |res|
105
+ body = options[:body].nil? ? '' : options[:body]
106
+ rest_client[fullpath_query].send(method, body, headers) do |res|
103
107
  res.code == 200 ? true : {error: {code: res.code, message: res.body}}
104
108
  end
105
109
  else
106
- RestClient.send(method, url, headers) do |res|
110
+ rest_client[fullpath_query].send(method, headers) do |res|
107
111
  if res.code == 200
108
112
  case method
109
113
  when :get
@@ -120,6 +124,10 @@ module Upyun
120
124
  end
121
125
  end
122
126
 
127
+ def rest_client
128
+ @rest_clint ||= RestClient::Resource.new("http://#{@endpoint}", options)
129
+ end
130
+
123
131
  def gmdate
124
132
  Time.now.utc.strftime('%a, %d %b %Y %H:%M:%S GMT')
125
133
  end
data/lib/upyun/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Upyun
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
data/spec/upyun_spec.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require File.dirname(__FILE__) + '/spec_helper'
2
+ require 'uri'
2
3
 
3
4
  describe "Upyun Restful API Basic testing" do
4
5
  before :all do
@@ -42,6 +43,24 @@ describe "Upyun Restful API Basic testing" do
42
43
  expect(@upyun.put(@path, @file, headers)).to be true
43
44
  end
44
45
 
46
+ describe "PUT a file while the path is not encoded" do
47
+ before(:all) { @path_cn = '/ruby-sdk/这是中文路径/foo.txt' }
48
+
49
+ it "should success" do
50
+ expect(@upyun.put(@path_cn, @str)).to be true
51
+ end
52
+
53
+ it "then get the non encoded path also success" do
54
+ expect(@upyun.get(@path_cn)).to eq(@str)
55
+ end
56
+
57
+ it "then get the encoded path should also success" do
58
+ expect(@upyun.get(URI.encode(@path_cn))).to eq(@str)
59
+ end
60
+
61
+ after(:all) { @upyun.delete(@path_cn) }
62
+ end
63
+
45
64
  after { @upyun.delete(@path) }
46
65
  end
47
66
 
@@ -124,7 +143,7 @@ describe "Upyun Restful API Basic testing" do
124
143
  end
125
144
  end
126
145
 
127
- describe "Form Upload" do
146
+ describe "Form Upload", current: true do
128
147
  before :all do
129
148
  @form = Upyun::Form.new('ESxWIoMmF39nSDY7CSFUsC7s50U=', 'sdkfile')
130
149
  @file = File.expand_path('../upyun.jpg', __FILE__)
metadata CHANGED
@@ -1,83 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: upyun
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - jsvisa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-17 00:00:00.000000000 Z
11
+ date: 2014-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: 1.6.7
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.6.7
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: 4.1.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: 4.1.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.7'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.7'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: '10.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: '10.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
75
  version: 3.1.0
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ~>
81
81
  - !ruby/object:Gem::Version
82
82
  version: 3.1.0
83
83
  description: UPYUN Rest API and Form API SDK
@@ -87,10 +87,11 @@ executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
- - ".coveralls.yml"
91
- - ".gitignore"
92
- - ".rspec"
93
- - ".travis.yml"
90
+ - .coveralls.yml
91
+ - .gitignore
92
+ - .rspec
93
+ - .travis.yml
94
+ - CHANGELOG.md
94
95
  - Gemfile
95
96
  - LICENSE.txt
96
97
  - README.md
@@ -114,17 +115,17 @@ require_paths:
114
115
  - lib
115
116
  required_ruby_version: !ruby/object:Gem::Requirement
116
117
  requirements:
117
- - - ">="
118
+ - - '>='
118
119
  - !ruby/object:Gem::Version
119
120
  version: '0'
120
121
  required_rubygems_version: !ruby/object:Gem::Requirement
121
122
  requirements:
122
- - - ">="
123
+ - - '>='
123
124
  - !ruby/object:Gem::Version
124
125
  version: '0'
125
126
  requirements: []
126
127
  rubyforge_project:
127
- rubygems_version: 2.4.4
128
+ rubygems_version: 2.1.11
128
129
  signing_key:
129
130
  specification_version: 4
130
131
  summary: UPYUN API SDK