strongmind-platform-sdk 3.19.3 → 3.19.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d80d70cf202a1338c60383231756e999d24a59f9f9355dd5458ff2aacbdd88c
|
4
|
+
data.tar.gz: db7ef460805cd0679dc0644e57168005a6ed563d5a3410a331a065a3a2417468
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59cb37389b99445ed706761425960774648b7c232d1948ee9c3fe66f71980c4b0b936b3aba6235977189394a2bb2dd0c6ac847685944e9acde12c2a09f35a7c3
|
7
|
+
data.tar.gz: 3594b5bbe419c9ad257c0937231ef91a0f5b8466f53436bfe822b00e554f70793c583d00afae6b9451b20373ccce741d8e2d57bedf99f3669fa36331d0873422
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -115,9 +115,9 @@ class MyModel < ApplicationRecord
|
|
115
115
|
end
|
116
116
|
```
|
117
117
|
|
118
|
-
For the concern to function, the model must have a `pipeline_noun` class method that returns the noun of the model.
|
118
|
+
For the concern to function, the model must have both a `pipeline_noun` and a `pipeline_meta` class method that returns the noun and metadata of the model, respectively.
|
119
119
|
|
120
|
-
This can be done once by defining the method in the ApplicationRecord class:
|
120
|
+
This can be done once by defining the method(s) in the ApplicationRecord class:
|
121
121
|
|
122
122
|
```ruby
|
123
123
|
class ApplicationRecord < ActiveRecord::Base
|
@@ -126,6 +126,12 @@ class ApplicationRecord < ActiveRecord::Base
|
|
126
126
|
def self.pipeline_noun
|
127
127
|
"StrongMind.Central.#{name}}"
|
128
128
|
end
|
129
|
+
|
130
|
+
def self.pipeline_meta
|
131
|
+
{
|
132
|
+
"source": "strongmind-central"
|
133
|
+
}
|
134
|
+
end
|
129
135
|
end
|
130
136
|
```
|
131
137
|
|
@@ -138,6 +144,12 @@ class MyModel < ApplicationRecord
|
|
138
144
|
def self.pipeline_noun
|
139
145
|
"StrongMind.Central.#{name}}"
|
140
146
|
end
|
147
|
+
|
148
|
+
def self.pipeline_meta
|
149
|
+
{
|
150
|
+
"source": "strongmind-central"
|
151
|
+
}
|
152
|
+
end
|
141
153
|
end
|
142
154
|
```
|
143
155
|
|
@@ -16,7 +16,7 @@ module PlatformSdk
|
|
16
16
|
{
|
17
17
|
"noun": self.class.pipeline_noun,
|
18
18
|
"identifiers": pipeline_identifiers,
|
19
|
-
"meta": pipeline_meta,
|
19
|
+
"meta": self.class.pipeline_meta,
|
20
20
|
"data": pipeline_data(action),
|
21
21
|
"envelope_version": '1.0.0',
|
22
22
|
"message_timestamp": Time.current.utc.iso8601
|
@@ -27,15 +27,13 @@ module PlatformSdk
|
|
27
27
|
raise NotImplementedError, 'You must implement the pipeline_noun class method'
|
28
28
|
end
|
29
29
|
|
30
|
-
def
|
31
|
-
{
|
32
|
-
"id": id
|
33
|
-
}
|
30
|
+
def self.pipeline_meta
|
31
|
+
raise NotImplementedError, 'You must implement the pipeline_meta class method, an example value is { "source": "strongmind-central" }'
|
34
32
|
end
|
35
33
|
|
36
|
-
def
|
34
|
+
def pipeline_identifiers
|
37
35
|
{
|
38
|
-
"
|
36
|
+
"id": id
|
39
37
|
}
|
40
38
|
end
|
41
39
|
|
@@ -5,7 +5,7 @@ module PlatformSdk
|
|
5
5
|
{
|
6
6
|
"noun": described_class.pipeline_noun,
|
7
7
|
"identifiers": { "id": record.id },
|
8
|
-
"meta":
|
8
|
+
"meta": described_class.pipeline_meta,
|
9
9
|
"data": data || default_data,
|
10
10
|
"envelope_version": '1.0.0',
|
11
11
|
"message_timestamp": Time.current.utc.iso8601
|
data/lib/platform_sdk/version.rb
CHANGED
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.
|
4
|
+
version: 3.19.4
|
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-05-
|
11
|
+
date: 2024-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|