wolf_core 1.0.27 → 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: d4c428973c5098713c6a39e243dad49df7449d1225fb428543e8a8fa5497ed71
4
- data.tar.gz: 6e5c65a6af6968c8c4f1f5c5c38112e32b5e8d95158164c566d35c7db4e35e53
3
+ metadata.gz: 2fe77efe4ddb94615a519bb0428fc34ead16fc8606def6258231c37e71c9b7ff
4
+ data.tar.gz: 779b800dff2d790da316fb2f4e5258cec31bb9d4bf1c6b8b24415c0168607542
5
5
  SHA512:
6
- metadata.gz: 94f191334129f7ad5ffaf4548a4c9e18ba82e9500593699d8e96d5c2a16e23bdf4877823ef89e6706303d8bc43887c50c3f9b0316fcbc4fa76d2e2095b41681e
7
- data.tar.gz: 578084aa2bbe78870131a389cbe981813a3394b6ba237f4928b06d4bc5c13bef0356cf7f68fe114610963d5284a0e28dc1cc11b189f9f14e06ccd6d390d248ab
6
+ metadata.gz: ae81ae53c9bfd5c7a91902b5cae970a05f357472b7ddf4fc390c732ed082f3479ffd7522cb0c1afb898eb3ba0b91a9ec7dbbe6aff124fe40216efffae47f4c3b
7
+ data.tar.gz: 07ae930ff5fc86e76952f523add9b92cf56f6b90020cacace7053c065b1b9697a1f80743b3af994c0814f5e7831ecf3717e01ebb6fd27c20224a727b3069d424
@@ -57,13 +57,13 @@ module WolfCore
57
57
  foreign_object
58
58
  end
59
59
 
60
- def salesforce_http_get(salesforce_access_token:, query: nil, validate_response: true)
60
+ def salesforce_http_get(salesforce_access_token:, query: nil)
61
61
  response = http_get(
62
62
  url: ENV['SALESFORCE_URL'],
63
63
  headers: { 'Authorization' => "Bearer #{salesforce_access_token}" },
64
64
  query: query
65
65
  )
66
- validate_salesforce_response(response) if validate_response
66
+ validate_salesforce_response(response)
67
67
  JSON.parse(response.parsed_response)
68
68
  end
69
69
 
@@ -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.27"
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.27
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