everylog_ruby_client 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/README.md +7 -7
- data/lib/everylog_ruby_client/version.rb +1 -1
- data/lib/everylog_ruby_client.rb +7 -10
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8442bcf4e02820f0f7f7f7123d36bea5f3d151be485b722fbb6976690325077a
|
4
|
+
data.tar.gz: 03f5023f50b0112fcb799747e3b4485caa2ead5da297761043eac1271cf576be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb5325df0a8340ab4cee5793aa88cf6bf7e525599460bebc56fe674c31b87be34f2fcd9a6b4714f72cb807c2c2ef81fc129f57d62257657d18f0fedcd8f61440
|
7
|
+
data.tar.gz: eaf091ad48aa507c6ee7c6495d26a09ac467cfacc12f1b9a277bd5b991e928900065ce657a79702ba169e9f3135018b029b381edd417c417195660d006e65f8f
|
data/CHANGELOG.md
CHANGED
@@ -3,3 +3,17 @@
|
|
3
3
|
## [1.0.0] - 2022-04-22
|
4
4
|
|
5
5
|
- Initial release
|
6
|
+
|
7
|
+
## [1.0.2] - 2022-04-22
|
8
|
+
|
9
|
+
- Bump version
|
10
|
+
|
11
|
+
## [1.0.3] - 2022-04-28
|
12
|
+
|
13
|
+
- pass on setup projectId
|
14
|
+
- add possibility to override on notify the projectId
|
15
|
+
- update readme
|
16
|
+
|
17
|
+
## [1.0.4] - 2022-04-28
|
18
|
+
|
19
|
+
- fix http call
|
data/README.md
CHANGED
@@ -28,14 +28,14 @@ require 'everylog_ruby_client'
|
|
28
28
|
# @option options [String] :everylog_url (https://api.everylog.io/api/v1/log-entries) to reach Everlog server
|
29
29
|
$EveryLogClient = EveryLog::Client.instance.setup(api_key: <YOUR_API_KEY>, projectId: <YOUR_PROJECT_NAME>)
|
30
30
|
|
31
|
-
# @param [Hash]
|
31
|
+
# @param [Hash] notify_options
|
32
32
|
# @option notify_options [String, options[:projectId]] :projectId name of the project
|
33
|
-
# @option
|
34
|
-
# @option
|
35
|
-
# @option
|
36
|
-
# @option
|
37
|
-
# @option
|
38
|
-
# @option
|
33
|
+
# @option notify_options [String] :title to display in the application and if enabled in the notification
|
34
|
+
# @option notify_options [String] :summary is a not so long text to display on the application and if enabled in the notification
|
35
|
+
# @option notify_options [String] :body it can contain a long text simple formatted, no html to display in the application
|
36
|
+
# @option notify_options [Array] :tags it can be used to categorize the notification, must be strings
|
37
|
+
# @option notify_options [String] :link it can be used to display on the application and if enabled in the notification
|
38
|
+
# @option notify_options [Boolean] :push if True, a push notification is sent to application
|
39
39
|
$EveryLogClient.notify(...)
|
40
40
|
```
|
41
41
|
## Contributing
|
data/lib/everylog_ruby_client.rb
CHANGED
@@ -45,16 +45,13 @@ module EveryLog
|
|
45
45
|
|
46
46
|
def notify(notify_options = {})
|
47
47
|
@notify_options = _parse_options(notify_options, NOTIFY_DEFAULTS)
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
|
56
|
-
http.request(req)
|
57
|
-
end
|
48
|
+
merged_options = { projectId: options[:projectId] }.merge(@notify_options)
|
49
|
+
uri = URI(options[:everylog_url])
|
50
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
51
|
+
http.use_ssl = true
|
52
|
+
req = Net::HTTP::Post.new(uri.path, 'Content-Type' => 'application/json', "Authorization": "Bearer #{options[:api_key]}")
|
53
|
+
req.body = merged_options.to_json
|
54
|
+
res = http.request(req)
|
58
55
|
res.body
|
59
56
|
end
|
60
57
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: everylog_ruby_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gilberto Maccacaro
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: " A simple Ruby with no external dependencies, to easily integrate
|
14
14
|
with Everylog API\n"
|
@@ -28,9 +28,9 @@ licenses:
|
|
28
28
|
metadata:
|
29
29
|
bug_tracker_uri: https://github.com/everylogsaas/everylog_ruby_client/issues
|
30
30
|
changelog_uri: https://github.com/everylogsaas/everylog_ruby_client/blob/master/CHANGELOG.md
|
31
|
-
documentation_uri: https://www.rubydoc.info/gems/everylog_ruby_client/1.0.
|
31
|
+
documentation_uri: https://www.rubydoc.info/gems/everylog_ruby_client/1.0.4
|
32
32
|
homepage_uri: https://github.com/everylogsaas/everylog_ruby_client
|
33
|
-
source_code_uri: https://github.com/everylogsaas/everylog_ruby_client/tree/v1.0.
|
33
|
+
source_code_uri: https://github.com/everylogsaas/everylog_ruby_client/tree/v1.0.4
|
34
34
|
post_install_message:
|
35
35
|
rdoc_options: []
|
36
36
|
require_paths:
|