esa 1.6.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +3 -0
- data/lib/esa/api_methods.rb +5 -1
- data/lib/esa/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9dfe95bc52ee057713273da51ec06528e7a50a49
|
4
|
+
data.tar.gz: 9aa694d1437cb64c4e2257b855fec5e1eb2f929e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2b95c1f64ff157f5799e8a9e2a9dd7065d60bfa443a8f525483a675da56671ba20501d0fa5007b9677e696f392e097daeaf67fa2f1a83cccb5cb2cfbb2298fa
|
7
|
+
data.tar.gz: 5ed154f6bff460a2209d14d90a180cfc19c309413eb4779d7b1af63dba4816be97ed363fc79b8bf39b274ad9c7ebd0ebec419cf0372c7d4b54d297d98af5f82c
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## 1.7.0 (2016-08-16)
|
2
|
+
- add: [Support signed_url API by fukayatsu · Pull Request #24 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/24)
|
3
|
+
- fix: [Fix a typo by ksss · Pull Request #23 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/23)
|
4
|
+
|
1
5
|
## 1.6.0 (2016-06-10)
|
2
6
|
- add: [Add Categories API and Tags API by fukayatsu · Pull Request #22 · esaio/esa-ruby](https://github.com/esaio/esa-ruby/pull/22)
|
3
7
|
|
data/README.md
CHANGED
@@ -132,6 +132,9 @@ client.upload_attachment(File.open('/Users/foo/Desktop/foo.png')) # File
|
|
132
132
|
client.upload_attachment('http://example.com/foo.png') # Remote URL
|
133
133
|
client.upload_attachment(['http://example.com/foo.png', cookie_str]) # Remote URL + Cookie
|
134
134
|
|
135
|
+
# Signed url for secure upload(beta)
|
136
|
+
client.signed_url('uploads/p/attachments/1/2016/08/16/1/foobar.png')
|
137
|
+
#=> GET /v1/teams/kama/signed_url/uploads/p/attachments/1/2016/08/16/1/foobar.png
|
135
138
|
```
|
136
139
|
|
137
140
|
|
data/lib/esa/api_methods.rb
CHANGED
@@ -141,6 +141,10 @@ module Esa
|
|
141
141
|
response
|
142
142
|
end
|
143
143
|
|
144
|
+
def signed_url(file_path, params = nil, headers = nil)
|
145
|
+
send_get("/v1/teams/#{current_team!}/signed_url/#{file_path}", params, headers)
|
146
|
+
end
|
147
|
+
|
144
148
|
private
|
145
149
|
|
146
150
|
def wrap(params, envelope)
|
@@ -157,7 +161,7 @@ module Esa
|
|
157
161
|
end
|
158
162
|
rescue LoadError
|
159
163
|
msg = 'Please pass content_type or install mime-types gem to guess content type from file'
|
160
|
-
raise
|
164
|
+
raise MissingContentTypeError, msg
|
161
165
|
end
|
162
166
|
|
163
167
|
def file_from(path_or_file_or_url)
|
data/lib/esa/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: esa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- fukayatsu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|