ishapi 0.1.8.305 → 0.1.8.306
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/app/jobs/ishapi/email_message_intake_job.rb +20 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e6d7b34491e5a45933183a4f57ffaceca8ad582fded9d3e75435fd33589b18af
|
|
4
|
+
data.tar.gz: 36680f3eebb3154959f50600d9f5b40fe2dc0679db03105c08fdd365c7301f78
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8e10c7d52eccd2578dbc67af5aa384916894e57d31619b9fa9e8892ffc78284e1277269826b23b0f2cd827c492b7965afe9169c68d69453a6eabe72a1f1122b9
|
|
7
|
+
data.tar.gz: 2a1bd018123c3b4282b52c05aaa21b23d5788b54632573cf23f8288b622174658442feaa05a230b5a96194caa1ff519ad07c0a303d55683c106585b040294767
|
|
@@ -109,15 +109,32 @@ class Ishapi::EmailMessageIntakeJob < Ishapi::ApplicationJob
|
|
|
109
109
|
photo.decode_base64_image
|
|
110
110
|
photo.save
|
|
111
111
|
elsif att.filename
|
|
112
|
+
filename = CGI.escape( att.filename )
|
|
113
|
+
|
|
112
114
|
attachment = Office::EmailAttachment.new({
|
|
113
115
|
content: att.body.decoded,
|
|
114
116
|
content_type: att.content_type,
|
|
115
117
|
email_message: @message,
|
|
116
|
-
filename:
|
|
118
|
+
filename: filename,
|
|
119
|
+
})
|
|
120
|
+
if !attachment.save
|
|
121
|
+
@message.logs.push "Could not save an attachment"
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
sio = StringIO.new att.body.decoded
|
|
125
|
+
File.open("/tmp/#{filename}", 'w:UTF-8:ASCII-8BIT') do |f|
|
|
126
|
+
f.puts(sio.read)
|
|
127
|
+
end
|
|
128
|
+
asset3d = ::Gameui::Asset3d.new({
|
|
129
|
+
object: File.open("/tmp/#{filename}"),
|
|
130
|
+
email_message: @message,
|
|
117
131
|
})
|
|
118
|
-
|
|
132
|
+
if !asset3d.save
|
|
133
|
+
@message.logs.push "Could not save an asset3d"
|
|
134
|
+
end
|
|
135
|
+
|
|
119
136
|
else
|
|
120
|
-
@message.logs.push "
|
|
137
|
+
@message.logs.push "Has an attachment with no filename?"
|
|
121
138
|
end
|
|
122
139
|
end
|
|
123
140
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ishapi
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.8.
|
|
4
|
+
version: 0.1.8.306
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- piousbox
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-11-
|
|
11
|
+
date: 2023-11-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|