wolf_core 1.0.28 → 1.0.29

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: 38b8e44965a71f16b4f22b6c140adf5bff3d0ea48904bbefba54e3521dfafa46
4
- data.tar.gz: 5a3858578f67ff191d5385320df7686282296ab71aa67c39820fa07a1be09236
3
+ metadata.gz: 2fe77efe4ddb94615a519bb0428fc34ead16fc8606def6258231c37e71c9b7ff
4
+ data.tar.gz: 779b800dff2d790da316fb2f4e5258cec31bb9d4bf1c6b8b24415c0168607542
5
5
  SHA512:
6
- metadata.gz: 4189e3ce2310e7598bb551dd9d8f2a2a59f181933cf48d3421a0cd102047a60d314f0b8be9f4cd19d8b4bf73348347b7c033c6e8c1793b47738c74bf428153d7
7
- data.tar.gz: cd11f274d175f9efcc0f51c8da8604e9044f23709344433ae452b57a89d04adc40991ffd39ee04ac9a100e58dc7a605d62fc5b65cc6972f625b319d6aa71a081
6
+ metadata.gz: ae81ae53c9bfd5c7a91902b5cae970a05f357472b7ddf4fc390c732ed082f3479ffd7522cb0c1afb898eb3ba0b91a9ec7dbbe6aff124fe40216efffae47f4c3b
7
+ data.tar.gz: 07ae930ff5fc86e76952f523add9b92cf56f6b90020cacace7053c065b1b9697a1f80743b3af994c0814f5e7831ecf3717e01ebb6fd27c20224a727b3069d424
@@ -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 >= limits
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.29"
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.29
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