ats-sdk 1.0.0 → 1.1.0
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 +4 -4
- data/README.md +52 -0
- data/ats-sdk.gemspec +1 -1
- data/lib/ats/event.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec55809b7ce4eb291ff66e5b1cb2d89fc0defecb03cbf71b9208f57a70187d5e
|
4
|
+
data.tar.gz: 4c0a56b41a766c63e99a633d05ab016ef7db74dd77ed5e3c08b105a1a8eb9cee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e11402bb87d2cd3d8a0f4c7db403c76be3f76e23d099591bf63be16010fcdf050b43330a80e3790415845d45c4968d3e95726a2f61e4f75a60a126fd2a453d7
|
7
|
+
data.tar.gz: ba667280e673ef818f8b04642c5176df647f67510577e183c587f37c95c2ed00535054b25976f6a28e83c7f8cd2939ff62068a5a747e1f2c3316a81c463a32d8
|
data/README.md
CHANGED
@@ -0,0 +1,52 @@
|
|
1
|
+
# Ruby SDK for Entera's Activity Tracking System
|
2
|
+
|
3
|
+
> The **ATS SDK for Ruby** is a convenient way to create analytics [Events](https://sudomafia.quip.com/YoyKAtd4kYaQ#JYcABAVioB9) and publish them to an SNS topic
|
4
|
+
|
5
|
+
## Getting Started
|
6
|
+
|
7
|
+
### **Installation**
|
8
|
+
|
9
|
+
The **ATS SDK** is available from [RubyGems](http://https://rubygems.org). Add the following dependency to your Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'ats-sdk'
|
13
|
+
```
|
14
|
+
|
15
|
+
## Configuration
|
16
|
+
|
17
|
+
The **ATS SDK** uses the credentials and region from your **AWS SDK** configuration.
|
18
|
+
|
19
|
+
### **Rails**
|
20
|
+
|
21
|
+
To use in a `Rails` application, we recommend creating an initializer under the `config/initializers` directory in order to bootstrap the `ATS` object. There you will configure the **ATS SDK** with your `SNS` topic:
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
# config/initializers/ats.rb
|
25
|
+
ATS.configure do |config|
|
26
|
+
config.topic = 'arn:aws:sns:us-east-1:123456789012:my-topic'
|
27
|
+
end
|
28
|
+
```
|
29
|
+
|
30
|
+
## Quick Example
|
31
|
+
|
32
|
+
### Create and publish an Event
|
33
|
+
|
34
|
+
```ruby
|
35
|
+
event = {
|
36
|
+
subject: {
|
37
|
+
type: 'User',
|
38
|
+
key: 'fm-12iubg9uhaf82f'
|
39
|
+
},
|
40
|
+
verb: 'edit',
|
41
|
+
direct_object: {
|
42
|
+
type: 'Opportunity',
|
43
|
+
key: 'fe8f3a65-13ed-45b7-8ebf-45c24d321023'
|
44
|
+
},
|
45
|
+
context: {
|
46
|
+
field: 'broker_signature',
|
47
|
+
previous_value: 'Robert Salmos',
|
48
|
+
current_value: 'Robert Salmons'
|
49
|
+
}
|
50
|
+
}
|
51
|
+
ATS::Event.create(event)
|
52
|
+
```
|
data/ats-sdk.gemspec
CHANGED
data/lib/ats/event.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ats-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Carlos González
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-sns
|