jekyll-airtable-import 0.1.5 → 0.1.6
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/jekyll-airtable-import.rb +3 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a166f5a2aee4abb6189cac0e09dbdfe75ed33543f6d30f9e5ca57125cdf90ca
|
4
|
+
data.tar.gz: ada7d7b313ac24ae95fe1feda2ab05e82a4f8298842b70dea83b6b8f4b1ba4fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 230649fbb2017fc58203114db00dcfef3f73045ce24d5b0e68d23dd568ec14b847a3189a19c79cc1b720454d6e3a6008d3d3337da9bae792fa843361655368b7
|
7
|
+
data.tar.gz: ce1fdfc3e307193b714d930952448ec8c5eecbce2d949526d4066943a3c9f45d8e1dee6f3c8518ff12c33a1a7d619bd291e8473621dfda2db072e22015550790
|
@@ -13,8 +13,9 @@ module Airtable
|
|
13
13
|
priority :medium
|
14
14
|
|
15
15
|
def download_attachment(at_attachment)
|
16
|
-
ext = at_attachment['type'].split('/')[-1]
|
17
|
-
|
16
|
+
ext = ".#{at_attachment['type'].split('/')[-1]}" if at_attachment['type'].is_a? String
|
17
|
+
ext ||= ''
|
18
|
+
file_name = "#{at_attachment['filename']}#{ext}"
|
18
19
|
|
19
20
|
Dir.mkdir "#{Dir.pwd}/assets" unless Dir.exists? "#{Dir.pwd}/assets"
|
20
21
|
assets_dir = Dir.mkdir "#{Dir.pwd}/assets/airtable" unless Dir.exists? "#{Dir.pwd}/assets/airtable"
|