strongmind-platform-sdk 3.19.13 → 3.19.15

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: e7c3c712c2fc562f84a6c9c689aff656811166a69fd465c8c7be28fc5f74b9de
4
- data.tar.gz: c4ee9b6c0a9431888b896be1a10e16784a484a73581d5df3d55a6cfc1a981319
3
+ metadata.gz: 4f47de97e4fc1301412c996ab3c6d72736c3d89fe98e602d5cc890be7384c043
4
+ data.tar.gz: f98510e86a9d4a4ecf7db1a261dcfd4c6b1c3b6801067e71a97aa3b5f3f18bad
5
5
  SHA512:
6
- metadata.gz: 7283e747a0e4bdb2b91cefe583fa871b4d3a232a4898b4b1e63f1764b0c692da2cf102302963afd4b3b12c536a84e9a3ec25968165464f1d2aeb5f92f88cc0dd
7
- data.tar.gz: 3951f91be2df18a8ac2fcf8f18699df96516cb78beae5fb21547383a2ffa19561bd88121abd621b9490a7ee29b537d40cbb863d52849e40a793b77b49576c337
6
+ metadata.gz: 543409f51579689eb9d30fa3fd2f67af5f407ec08dcaea14aac51585d72f6fcd6191c851a71357c6b933c56958b118035a0a14c5bec09f8f8e1ddffa262cc41f
7
+ data.tar.gz: a3ddbf414d291caac6a694dd5f35c2a7ba10dab5d684c9b3e00489541a8e1e152945bd9b9bcfd4de3e7367e61bb89944e3eca054aecd787bfed5a2c6330a29cb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- strongmind-platform-sdk (3.19.13)
4
+ strongmind-platform-sdk (3.19.15)
5
5
  activesupport (~> 7.1)
6
6
  aws-sdk-secretsmanager (~> 1.66)
7
7
  faraday (~> 2.5, >= 2.5.2)
@@ -95,7 +95,7 @@ GEM
95
95
  public_suffix (>= 2.0.2, < 6.0)
96
96
  ast (2.4.2)
97
97
  aws-eventstream (1.3.0)
98
- aws-partitions (1.937.0)
98
+ aws-partitions (1.939.0)
99
99
  aws-sdk-cloudwatch (1.91.0)
100
100
  aws-sdk-core (~> 3, >= 3.193.0)
101
101
  aws-sigv4 (~> 1.1)
data/README.md CHANGED
@@ -142,7 +142,7 @@ class MyModel < ApplicationRecord
142
142
  include PlatformSdk::ActiveRecord::DataPipelineable
143
143
 
144
144
  def self.pipeline_noun
145
- "StrongMind.Central.#{name}}"
145
+ "StrongMind.Central.#{name}"
146
146
  end
147
147
 
148
148
  def self.pipeline_meta
@@ -45,11 +45,9 @@ module PlatformSdk
45
45
  data_hash = { action: }.merge!(attributes.symbolize_keys)
46
46
 
47
47
  data_hash.merge!(pipeline_additional_attributes)
48
- Rails.logger.info("Data Hash after merge of additional attrs: #{data_hash}")
49
48
 
50
49
  data_hash = data_hash.except(*pipeline_excluded_attributes)
51
50
 
52
- Rails.logger.info("Data Pipeline Payload: #{data_hash}")
53
51
  data_hash
54
52
  end
55
53
 
@@ -69,16 +67,9 @@ module PlatformSdk
69
67
  }
70
68
  client = PlatformSdk::DataPipeline::Client.new(credentials)
71
69
 
72
- begin
73
- client.post(pipeline_payload(action)) unless Rails.env.development?
74
- rescue => e
75
- Rails.logger.info("Error posting to data pipeline: #{e.message}")
76
- end
77
-
70
+ client.post(pipeline_payload(action)) unless Rails.env.development?
78
71
  return unless respond_to?(:one_roster_data_type) && !Rails.env.development?
79
72
 
80
- Rails.logger.info('POSTING TO ONE ROSTER...')
81
-
82
73
  client.post(one_roster_pipeline_payload(deleted: action == "destroyed"))
83
74
  end
84
75
  end
@@ -42,6 +42,7 @@ module PlatformSdk
42
42
 
43
43
  def build_connection
44
44
  Faraday.new(@base_url) do |faraday|
45
+ faraday.request(:retry, retry_options)
45
46
  faraday.headers = default_headers
46
47
  faraday.adapter Faraday.default_adapter
47
48
  faraday.response :json, content_type: /\bjson$/, parser_options: { symbolize_names: true }
@@ -49,6 +50,16 @@ module PlatformSdk
49
50
  end
50
51
  end
51
52
 
53
+ def retry_options
54
+ {
55
+ max: 3,
56
+ interval: 0.05,
57
+ interval_randomness: 0.5,
58
+ backoff_factor: 2,
59
+ exceptions: [Faraday::ServerError]
60
+ }
61
+ end
62
+
52
63
  def default_headers
53
64
  {
54
65
  "Content-Type" => "application/json",
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PlatformSdk
4
- VERSION = "3.19.13"
4
+ VERSION = "3.19.15"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strongmind-platform-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.19.13
4
+ version: 3.19.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Platform Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-03 00:00:00.000000000 Z
11
+ date: 2024-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday