owo 1.1.0 → 1.1.1
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 +4 -4
- data/lib/owo.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 585fc1f562fad3300dc85f0cf0373d8ab12b3c86
|
4
|
+
data.tar.gz: 2a762e3e984685823bd4d3b0b51e90c905cbf5c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4286f5eb4ca34cab8e0a9ca64522c36174fdd28ef0cd28a507bdac4932b4702d19d59c2839f69ff5d6dae74822b213ef24e2b0cd48adae830f2cae41616687e1
|
7
|
+
data.tar.gz: c18f85c6e465ae3b3eff088664210941cdea66c64fed5039c119e2ca9ae2cdbdd02c91ac77df114d63d95b430c006c7649847854feb15df28a3547c33d62af9a
|
data/lib/owo.rb
CHANGED
@@ -26,7 +26,7 @@ module OwO
|
|
26
26
|
end
|
27
27
|
|
28
28
|
# Upload a single file or multiple files to OwO.
|
29
|
-
# @param files [File, String, Array<File, String>] Files to upload
|
29
|
+
# @param files [File, String, Array<File, String>] Files to upload, can be either String or File
|
30
30
|
# @return [String, Array<String>] Returns the URLs of the uploaded files
|
31
31
|
def upload(files)
|
32
32
|
if not files.length == 0
|
@@ -47,7 +47,7 @@ module OwO
|
|
47
47
|
result = result["files"].map.with_index do |x, i|
|
48
48
|
"https://#{@upload_url}/#{x['url']}"
|
49
49
|
end
|
50
|
-
if files.
|
50
|
+
if not files.is_a?(Array)
|
51
51
|
result = result[0]
|
52
52
|
end
|
53
53
|
return result
|