dashx 0.2.0 → 0.3.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 +23 -2
- data/lib/dashx/client.rb +14 -0
- data/lib/dashx/version.rb +1 -1
- data/lib/dashx.rb +4 -0
- 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: 06ad40758bc5f6cd2a2112d112e5d5f89116236223d49d4f587e4e5b3e1fec29
|
4
|
+
data.tar.gz: 1e69514d594c29381d72bb39fa88601b19c8172344fee5cd09f23f815d2d9fec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8259173a1f98ea91ebd618ce630c7852bc5e95d2088e250a52867aa24dbdc4a20267c30566d4c972c525bd455737010d3a7fae8accb93bc188f98eebd2d1893
|
7
|
+
data.tar.gz: 1ed90ead1e57ac5d62caebe5717469af66e01dc44b6ccc083511d102919cfd94b4decf57263620c0eb97f9c94fa532b05f71cd0878f77023d3314f81e6af4a0a
|
data/README.md
CHANGED
@@ -89,9 +89,30 @@ DashX.track('event_name', 'uid_of_user', { hello: 'world' })
|
|
89
89
|
|
90
90
|
## Development
|
91
91
|
|
92
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests.
|
92
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests.
|
93
93
|
|
94
|
-
|
94
|
+
You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
95
|
+
|
96
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
97
|
+
|
98
|
+
# Publishing
|
99
|
+
|
100
|
+
We use the amazing [gem-release](https://github.com/svenfuchs/gem-release) for releases.
|
101
|
+
|
102
|
+
**Installation**
|
103
|
+
|
104
|
+
```
|
105
|
+
gem install gem-release
|
106
|
+
```
|
107
|
+
|
108
|
+
**Deploying a new version**
|
109
|
+
|
110
|
+
```
|
111
|
+
git checkout master // Ensure you're in the master branch
|
112
|
+
gem bump -v minor // Automatically sets the version number, commits
|
113
|
+
git push origin master // Push the version bump commit
|
114
|
+
gem release
|
115
|
+
```
|
95
116
|
|
96
117
|
## Contributing
|
97
118
|
|
data/lib/dashx/client.rb
CHANGED
@@ -26,6 +26,15 @@ module DashX
|
|
26
26
|
}
|
27
27
|
'
|
28
28
|
|
29
|
+
SAVE_CONTACTS_REQUEST = 'mutation SaveContacts($input: SaveContactsInput!) {
|
30
|
+
saveContacts(input: $input) {
|
31
|
+
contacts {
|
32
|
+
id
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}
|
36
|
+
'
|
37
|
+
|
29
38
|
def initialize(config)
|
30
39
|
@config = config
|
31
40
|
|
@@ -105,6 +114,11 @@ module DashX
|
|
105
114
|
Base64.urlsafe_encode64(encrypted_token)
|
106
115
|
end
|
107
116
|
|
117
|
+
def save_contacts(uid, contacts = [])
|
118
|
+
contacts.each(&:symbolize_keys!)
|
119
|
+
make_graphql_request(SAVE_CONTACTS_REQUEST, { uid: uid, contacts: contacts })
|
120
|
+
end
|
121
|
+
|
108
122
|
private
|
109
123
|
|
110
124
|
def make_graphql_request(request, params)
|
data/lib/dashx/version.rb
CHANGED
data/lib/dashx.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dashx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- DashX
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|