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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d39da808eb820cc4ee1b6050bb39181825b34e853dfe17f4169019f62e4b4837
4
- data.tar.gz: 2fbc6ea5bcca09b405cf0057da2b7d45360ceb5f876e95226a98cb012ad17432
3
+ metadata.gz: 8442bcf4e02820f0f7f7f7123d36bea5f3d151be485b722fbb6976690325077a
4
+ data.tar.gz: 03f5023f50b0112fcb799747e3b4485caa2ead5da297761043eac1271cf576be
5
5
  SHA512:
6
- metadata.gz: 7252c4298498c8b6304bd975e4192a8068cde49b1ae8299cd1bf1bd6bb366fb9592d64e15303c93b33c7708787f67db0e7a8e4892200e8b6eb8502f175148646
7
- data.tar.gz: 4899921c1743e8b35f1471ef2f513723e87a8602bf149669327765e91592bda7f961629abdf17db11e5a8ac61d0cbf7f141c82e36c33e346838dfb3e7ba37dae
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] options
31
+ # @param [Hash] notify_options
32
32
  # @option notify_options [String, options[:projectId]] :projectId name of the project
33
- # @option options [String] :title to display in the application and if enabled in the notification
34
- # @option options [String] :summary is a not so long text to display on the application and if enabled in the notification
35
- # @option options [String] :body it can contain a long text simple formatted, no html to display in the application
36
- # @option options [Array] :tags it can be used to categorize the notification, must be strings
37
- # @option options [String] :link it can be used to display on the application and if enabled in the notification
38
- # @option options [Boolean] :push if True, a push notification is sent to application
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EveryLogRubyClient
4
- VERSION = "1.0.3"
4
+ VERSION = "1.0.4"
5
5
  end
@@ -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
- uri = URI(options[:everylog_url])
49
- req = Net::HTTP::Post.new(uri, {
50
- "Content-Type": "application/json",
51
- "Authorization": "Bearer #{options[:api_key]}"
52
- })
53
- merged_options = { projectId: options[:projectId] }.merge(@notify_options)
54
- req.body = merged_options.to_json
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.3
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-04-28 00:00:00.000000000 Z
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.3
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.3
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: