setsuzoku 0.14.9 → 0.15.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 113d13e0305fa193bb0a433ff116d5c0edb874eb8fe4f2cf29e67ee94aef5c35
|
4
|
+
data.tar.gz: cc375d2b21ec798a44759ffde0949a389cdf982dfb89046b98e48b19b5abe416
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f178c75650965ab61a221ac0f6c89d4664536e311545f7b85e7e8f687e30cf7ea53f434ad0d129fffd7f04a8e7ac21641e0be5b588a60dc713e2a3f5c5f6905b
|
7
|
+
data.tar.gz: dffed87de3ee9c1e622d03bba857c5e21048585a5c64ebec3281c7e804e7abf312c5bac335cf8fb600a37fcc46f34259cfa82ed4e1da7e7f24ee0d5f95c35d6f
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
setsuzoku (0.
|
4
|
+
setsuzoku (0.15.0)
|
5
5
|
activesupport (>= 5.0, < 7)
|
6
6
|
faraday (~> 0.11)
|
7
7
|
nokogiri (~> 1.10)
|
@@ -28,8 +28,8 @@ GEM
|
|
28
28
|
i18n (1.10.0)
|
29
29
|
concurrent-ruby (~> 1.0)
|
30
30
|
mini_portile2 (2.8.0)
|
31
|
-
minitest (5.
|
32
|
-
multipart-post (2.
|
31
|
+
minitest (5.16.1)
|
32
|
+
multipart-post (2.2.3)
|
33
33
|
nokogiri (1.13.6)
|
34
34
|
mini_portile2 (~> 2.8.0)
|
35
35
|
racc (~> 1.4)
|
@@ -52,7 +52,7 @@ GEM
|
|
52
52
|
safe_yaml (1.0.5)
|
53
53
|
sorbet (0.5.10030)
|
54
54
|
sorbet-static (= 0.5.10030)
|
55
|
-
sorbet-runtime (0.5.
|
55
|
+
sorbet-runtime (0.5.10125)
|
56
56
|
sorbet-static (0.5.10030-universal-darwin-14)
|
57
57
|
tzinfo (2.0.4)
|
58
58
|
concurrent-ruby (~> 1.0)
|
@@ -60,7 +60,7 @@ GEM
|
|
60
60
|
addressable (>= 2.3.6)
|
61
61
|
crack (>= 0.3.2)
|
62
62
|
hashdiff (>= 0.4.0, < 2.0.0)
|
63
|
-
zeitwerk (2.
|
63
|
+
zeitwerk (2.6.0)
|
64
64
|
|
65
65
|
PLATFORMS
|
66
66
|
ruby
|
@@ -57,11 +57,13 @@ module Setsuzoku
|
|
57
57
|
end
|
58
58
|
faraday.adapter Faraday.default_adapter
|
59
59
|
end
|
60
|
-
|
61
|
-
if
|
60
|
+
attachment_urls = options[:attachment_url] || options[:attachment_urls]
|
61
|
+
if attachment_urls.present?
|
62
62
|
resp = @faraday.post do |req|
|
63
63
|
payload = {}
|
64
|
-
|
64
|
+
# create an array to just iterate over for 1 or many urls
|
65
|
+
attachment_urls = [attachment_urls] if options[:attachment_url]
|
66
|
+
attachments = attachment_urls.map do |url|
|
65
67
|
image = open(url, 'rb')
|
66
68
|
Faraday::UploadIO.new(image, T.must(image).content_type, File.basename(url))
|
67
69
|
end
|
@@ -70,7 +72,8 @@ module Setsuzoku
|
|
70
72
|
else
|
71
73
|
payload.merge!(full_request)
|
72
74
|
end
|
73
|
-
|
75
|
+
# if using the singular "attachment_url" key pull out the first item
|
76
|
+
payload[options[:attachment_url_key]] = options[:attachment_url] ? attachments.first : attachments
|
74
77
|
req.body = payload
|
75
78
|
end
|
76
79
|
else
|
data/lib/setsuzoku/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: setsuzoku
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luke Stadtler
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|