wolf_core 1.0.28 → 1.0.30
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: 16ba45df6305cc568cf3c692f1f773a3b858e798dbab211af08b132db0d25186
|
4
|
+
data.tar.gz: 8477093023a6a26ac91e768a3e0607d503cb015d28379135f46c31f80c0f1917
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4eec62e7a0373b541550156961f6a1d0d5520e0bd2507280b77f51dc8aa761c1b0064db99eded9ba892d0586b1170ed26603278fb3a03b1bcc5c8e5c12899b75
|
7
|
+
data.tar.gz: c18991fcd0dda19297813a63c93ac805a5d4f06afbae929a2b8606c3d4295b9c147b655d0072f4b21ec6b8b36c40914c9596d478cdbb2ae80c2183a465e944db
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module WolfCore
|
2
|
+
module Barton
|
3
|
+
module Onboarding
|
4
|
+
module FileOperations
|
5
|
+
def build_file_payload(
|
6
|
+
salesforce_max_file_size:, encoded_file:, url:,
|
7
|
+
parent_id:, file_id:, filename:
|
8
|
+
)
|
9
|
+
limit = salesforce_max_file_size.to_i
|
10
|
+
file_payload = {
|
11
|
+
parentId: parent_id,
|
12
|
+
appFileId: file_id,
|
13
|
+
fileTitle: filename,
|
14
|
+
versionData: encoded_file,
|
15
|
+
extension: filename.split('.').second
|
16
|
+
}
|
17
|
+
size = file_payload.to_json.size
|
18
|
+
exceed_limit = size >= limit
|
19
|
+
if exceed_limit
|
20
|
+
file_payload[:limit] = limit
|
21
|
+
file_payload[:payloadSize] = size
|
22
|
+
file_payload[:url] = url
|
23
|
+
file_payload.delete(:versionData)
|
24
|
+
end
|
25
|
+
file_payload
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
data/lib/wolf_core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wolf_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.30
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Javier Roncallo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -90,6 +90,7 @@ files:
|
|
90
90
|
- lib/wolf_core.rb
|
91
91
|
- lib/wolf_core/application/application_service.rb
|
92
92
|
- lib/wolf_core/application/barton/mappings.rb
|
93
|
+
- lib/wolf_core/application/barton/onboarding/file_operations.rb
|
93
94
|
- lib/wolf_core/application/barton/parsing.rb
|
94
95
|
- lib/wolf_core/application/barton/routing.rb
|
95
96
|
- lib/wolf_core/application/burnett/auth/auth_operations.rb
|