minitel 0.4.0 → 0.5.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 +5 -5
- data/.github/workflows/ruby.yml +27 -0
- data/Readme.md +38 -2
- data/changelog.txt +9 -0
- data/lib/minitel/client.rb +2 -1
- data/lib/minitel/version.rb +1 -1
- metadata +8 -30
- checksums.yaml.gz.sig +0 -1
- data.tar.gz.sig +0 -0
- data/.travis.yml +0 -13
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 03563c34fdb8dddca3107d4d60b304f32f513ec89bcf4ef06a0f606f04be7e89
|
4
|
+
data.tar.gz: accac5e1f917fe04b0854136b06a217eac02759146a85ca60dfd30da7c27b0a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3b11eb0db6a955740d89bc5e24ad0f5d85852ff399aa6c82cc8995b44f9a8fd6d594d241577a66bd240bda7d7d1cc02a91667cf8793d7a8b8a7c661f801eba3
|
7
|
+
data.tar.gz: ab39d5c5b79f35c0aeca1a8a11eca36cf90c6e0afbcd18969825b5730f69c5055d244da80f1f73f8ed929d2a2b3138bdef67de7983b40eb6a78d1d5bb88ce504
|
@@ -0,0 +1,27 @@
|
|
1
|
+
name: Ruby
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
test:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
strategy:
|
13
|
+
matrix:
|
14
|
+
ruby-version: ['2.5', '2.6', '2.7', '3.0']
|
15
|
+
|
16
|
+
steps:
|
17
|
+
- uses: actions/checkout@v2
|
18
|
+
- name: Set up Ruby
|
19
|
+
uses: ruby/setup-ruby@v1
|
20
|
+
with:
|
21
|
+
ruby-version: ${{ matrix.ruby-version }}
|
22
|
+
bundler-cache: true
|
23
|
+
- name: Build and test with Rake
|
24
|
+
run: |
|
25
|
+
gem install bundler
|
26
|
+
bundle install --jobs 4 --retry 3
|
27
|
+
bundle exec rspec
|
data/Readme.md
CHANGED
@@ -4,7 +4,43 @@ A 𝕋𝔼𝕃𝔼𝕏 client
|
|
4
4
|
[](http://badge.fury.io/rb/minitel)
|
5
5
|
[](https://travis-ci.org/heroku/minitel)
|
6
6
|
|
7
|
-
##
|
7
|
+
## Producer Credentials
|
8
|
+
|
9
|
+
Get credentials to use by following the instructions here: https://github.com/heroku/engineering-docs/blob/master/components/telex/user-guide.md
|
10
|
+
|
11
|
+
## Installing Minitel
|
12
|
+
You'll need to add our private gemserver first, see here: <https://gemgate-heroku-internal-gems.herokuapp.com/setup-instructions>
|
13
|
+
|
14
|
+
## Quick Setup
|
15
|
+
This will help you send a notification to just yourself, as a sanity check that everything is set up properly
|
16
|
+
|
17
|
+
Before you do this:
|
18
|
+
- Get your producer credentials (above)
|
19
|
+
- get `minitel` (above) and `dotenv` installed locally
|
20
|
+
- Grab your user account id, for example by doing: `heroku api get /account | jq '.id' -r`
|
21
|
+
|
22
|
+
```
|
23
|
+
# .env
|
24
|
+
TELEX_URL = 'https://user:pass@telex.heroku.com'
|
25
|
+
MY_USER_ID = '123'
|
26
|
+
```
|
27
|
+
|
28
|
+
```
|
29
|
+
# minitel-testing.rb or irb
|
30
|
+
require 'dotenv/load'
|
31
|
+
require 'minitel'
|
32
|
+
|
33
|
+
client = Minitel::Client.new(ENV['TELEX_URL'])
|
34
|
+
|
35
|
+
message = client.notify_user(user_uuid: ENV['MY_USER_ID'], title: 'Test Notification', body: 'Test Notification Body.')
|
36
|
+
puts "message " + message['id'] + " sent"
|
37
|
+
```
|
38
|
+
|
39
|
+
Once you run this, you should receive both:
|
40
|
+
- receive an email (eventually, depending on the backlog)
|
41
|
+
- see this in Dashboard's Notification Center
|
42
|
+
|
43
|
+
## Usage Examples
|
8
44
|
|
9
45
|
``` ruby
|
10
46
|
require 'minitel'
|
@@ -26,6 +62,6 @@ client.notify_user(user_uuid: '...',
|
|
26
62
|
body: 'You owe us 65k.',
|
27
63
|
action: { label: 'View Invoice', url: 'https://heroku.com/invoices/12345-12-98765'})
|
28
64
|
|
29
|
-
# add
|
65
|
+
# add follow-up to a previous notification
|
30
66
|
client.add_followup(message_uuid: '...', body: 'here are even more details')
|
31
67
|
```
|
data/changelog.txt
CHANGED
data/lib/minitel/client.rb
CHANGED
@@ -11,7 +11,8 @@ module Minitel
|
|
11
11
|
end
|
12
12
|
self.connection = Excon.new(telex_url,
|
13
13
|
:headers => {
|
14
|
-
"User-Agent" => "minitel/#{Minitel::VERSION} excon/#{Excon::VERSION}"
|
14
|
+
"User-Agent" => "minitel/#{Minitel::VERSION} excon/#{Excon::VERSION}",
|
15
|
+
"Content-Type" => "application/json"
|
15
16
|
}
|
16
17
|
)
|
17
18
|
end
|
data/lib/minitel/version.rb
CHANGED
metadata
CHANGED
@@ -1,34 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Will Leinweber
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
|
-
cert_chain:
|
11
|
-
-
|
12
|
-
-----BEGIN CERTIFICATE-----
|
13
|
-
MIIDLDCCAhSgAwIBAgIBAjANBgkqhkiG9w0BAQUFADA8MQwwCgYDVQQDDANnZWQx
|
14
|
-
FzAVBgoJkiaJk/IsZAEZFgdfYWVyaWVfMRMwEQYKCZImiZPyLGQBGRYDb3JnMB4X
|
15
|
-
DTE0MTAwMzIxNTAzOVoXDTE1MTAwMzIxNTAzOVowPDEMMAoG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-
date: 2015-02-13 00:00:00.000000000 Z
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-08-08 00:00:00.000000000 Z
|
32
12
|
dependencies:
|
33
13
|
- !ruby/object:Gem::Dependency
|
34
14
|
name: excon
|
@@ -121,9 +101,9 @@ executables: []
|
|
121
101
|
extensions: []
|
122
102
|
extra_rdoc_files: []
|
123
103
|
files:
|
104
|
+
- ".github/workflows/ruby.yml"
|
124
105
|
- ".gitignore"
|
125
106
|
- ".rspec"
|
126
|
-
- ".travis.yml"
|
127
107
|
- Gemfile
|
128
108
|
- Guardfile
|
129
109
|
- LICENSE
|
@@ -142,7 +122,7 @@ homepage: https://github.com/heroku/minitel
|
|
142
122
|
licenses:
|
143
123
|
- MIT
|
144
124
|
metadata: {}
|
145
|
-
post_install_message:
|
125
|
+
post_install_message:
|
146
126
|
rdoc_options: []
|
147
127
|
require_paths:
|
148
128
|
- lib
|
@@ -157,13 +137,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
137
|
- !ruby/object:Gem::Version
|
158
138
|
version: '0'
|
159
139
|
requirements: []
|
160
|
-
|
161
|
-
|
162
|
-
signing_key:
|
140
|
+
rubygems_version: 3.2.22
|
141
|
+
signing_key:
|
163
142
|
specification_version: 4
|
164
143
|
summary: "\U0001D54B\U0001D53C\U0001D543\U0001D53C\U0001D54F client: see https://github.com/heroku/telex"
|
165
144
|
test_files:
|
166
145
|
- spec/minitel/client_spec.rb
|
167
146
|
- spec/minitel/strict_args_spec.rb
|
168
147
|
- spec/spec_helper.rb
|
169
|
-
has_rdoc:
|
checksums.yaml.gz.sig
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
��C�Q��AfV<3��!(����8�1/�'_�ag͒�HQ�]�Y�~��Ӝ�]��c��с��p�C�;��|\�k���Y�����E��Xӊ�U:S�&iJa�R�(>��#+:�)�k�\��5&q+�i�B��Q~��jΎ�.� �O�ֿK]���͕3|����V���tOcۧ����J��GiiY���� �\�%�=���/��mM*H��r�8b'q5mbS��|�\�@?v
|
data.tar.gz.sig
DELETED
Binary file
|
data/.travis.yml
DELETED
metadata.gz.sig
DELETED
Binary file
|