wolf_core 1.0.28 → 1.0.30

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 38b8e44965a71f16b4f22b6c140adf5bff3d0ea48904bbefba54e3521dfafa46
4
- data.tar.gz: 5a3858578f67ff191d5385320df7686282296ab71aa67c39820fa07a1be09236
3
+ metadata.gz: 16ba45df6305cc568cf3c692f1f773a3b858e798dbab211af08b132db0d25186
4
+ data.tar.gz: 8477093023a6a26ac91e768a3e0607d503cb015d28379135f46c31f80c0f1917
5
5
  SHA512:
6
- metadata.gz: 4189e3ce2310e7598bb551dd9d8f2a2a59f181933cf48d3421a0cd102047a60d314f0b8be9f4cd19d8b4bf73348347b7c033c6e8c1793b47738c74bf428153d7
7
- data.tar.gz: cd11f274d175f9efcc0f51c8da8604e9044f23709344433ae452b57a89d04adc40991ffd39ee04ac9a100e58dc7a605d62fc5b65cc6972f625b319d6aa71a081
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WolfCore
4
- VERSION = "1.0.28"
4
+ VERSION = "1.0.30"
5
5
  end
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.28
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-01 00:00:00.000000000 Z
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