gyazo 3.0.1 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d3062e418f6141538b74c89f192da80ad61f70498cb19e4c8e1b63a99848eaa6
4
- data.tar.gz: 68f113088d110342c22eeeff2faa2f6ffa3f725c846d19336cabea6e7774ab31
3
+ metadata.gz: c8fe75b2d45f2bfa3aecf209dab362a2ad70319ed876e2fa3f316cda8229e6ac
4
+ data.tar.gz: 31da10ff0026ccf2a0c7a025fd6a4b3ca6749293a2ee9eff71eb7e49f13bb488
5
5
  SHA512:
6
- metadata.gz: 5d8be83b4f9e5712e131fc0f7c44e4f89df60059152f9669a85870f8df28676213728cd9ee4c14710a6c1c42c8a9b859baf1ac40adb431dbdf3b59d45c78c0e4
7
- data.tar.gz: 8a63cb8763ae393b0e5fd9047676648ef5713803a1475ebf70f663c1c95b01eefda337320a486dd394a87c048d8eae483997bde757343000db2e9fee8c283b65
6
+ metadata.gz: 533ea33e10cf0b6baa999e11925bebb54e3e5cf5904634c73b33e15024719837d5154326bb86bd795b41d9f6f3f1283f85ef99b848849cbdeaf38f7120af0e82
7
+ data.tar.gz: bab38288fdd3a7d8faae4391b06be6714481c6deff942274566f93cc3aa28ffc7ed592febe1a9dc7e105eab3e3c07a14b5da2c72909719a5ea56a8a6a23c8751
data/README.md CHANGED
@@ -37,7 +37,7 @@ Following attributes can be set
37
37
  * referer_url(default: '')
38
38
  * title(default: '')
39
39
  * desc(default: '')
40
-
40
+ * collection_id(default: '')
41
41
 
42
42
  ```ruby
43
43
  res = gyazo.upload imagefile: 'my_image.png', created_at: Time.now, referer_url: 'https://example.com/'
@@ -18,7 +18,7 @@ module Gyazo
18
18
  end
19
19
  end
20
20
 
21
- def upload(imagefile:, filename: nil, created_at: ::Time.now, referer_url: '', title: '', desc: '')
21
+ def upload(imagefile:, filename: nil, created_at: ::Time.now, referer_url: '', title: '', desc: '', collection_id: '')
22
22
  ensure_io_or_file_exists imagefile, filename
23
23
 
24
24
  conn = ::Faraday.new do |f|
@@ -35,6 +35,7 @@ module Gyazo
35
35
  referer_url: referer_url.to_s,
36
36
  title: title.to_s,
37
37
  desc: desc.to_s,
38
+ collection_id: collection_id.to_s,
38
39
  }
39
40
  req.headers['User-Agent'] = @user_agent
40
41
  end
@@ -1,3 +1,3 @@
1
1
  module Gyazo
2
- VERSION = '3.0.1'
2
+ VERSION = '3.1.0'
3
3
  end
@@ -18,6 +18,11 @@ class TestGyazo < MiniTest::Test
18
18
  assert res[:permalink_url].match GYAZO_REGEXP
19
19
  end
20
20
 
21
+ def test_upload_with_collection_id
22
+ res = @gyazo.upload imagefile: @imagefile, collection_id: ENV['GYAZO_COLLECTION_ID']
23
+ assert res[:permalink_url].match GYAZO_REGEXP
24
+ end
25
+
21
26
  def test_list
22
27
  list = @gyazo.list
23
28
  assert_instance_of Hash, list
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gyazo
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toshiyuki Masui
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-05-07 00:00:00.000000000 Z
13
+ date: 2020-01-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler