dlnk_error_notifier 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2178d7bb0a7c5153f80e8d5dc8d442e00c5ab2d927afe686f043e1eff2014d74
4
- data.tar.gz: 833f685e21a4f5c2c9fdf57d4603e95e9e1784f965e85fcc034da521f9dbedd1
3
+ metadata.gz: 14e0b1b0c886c02aa18e4834e76718b2ba382f960df9990b869ac13d747e6423
4
+ data.tar.gz: fd43685cf77e6e9448ef5684ac1ec3272177fefc93d524ed646dc4d4b6c05880
5
5
  SHA512:
6
- metadata.gz: 88502ec1c3810b695a3cd13e6fe1504e08893cc7f2743466d186d82ce967cfb4c7dbdbbadbaf1a75dae5d47959b516c8607a96f555816d5d4a38eec99f8e0443
7
- data.tar.gz: cf01907227f3466529aeefe905394156e77f3f65a4affab8d4f36a2c8d58a4329337e71a54f29f4a42a8e7500e866b09fa2241201f34f6408c4ca67a782c2c45
6
+ metadata.gz: 302e7187567a766ecbd94a12aa2225e475e16b7e2107f6c1e0d8197db91bc3ffcd22fe27b5d5a0456233532b88921a9e1ed8119cee2b0852848273810c3bf2f6
7
+ data.tar.gz: d85eed8374bf56ae088b54cbc1651814681874fddffb9ad782a171ab497c72c98f9cc178390696ebdfadc720fec2b3ade32b671e06660bec8682049698904d8e
data/bin/console CHANGED
@@ -2,7 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require "bundler/setup"
5
- require "error_notifier"
5
+ require "dlnk_error_notifier"
6
6
 
7
7
  # You can add fixtures and/or initialization code here to make experimenting
8
8
  # with your gem easier. You can also use a different console, if you like.
@@ -3,13 +3,13 @@
3
3
  require "active_job"
4
4
  require "httparty"
5
5
 
6
- module ErrorNotifier
6
+ module DlnkErrorNotifier
7
7
  # HttpPostJob is an ActiveJob that performs an HTTP POST request.
8
8
  # This job is enqueued to run in the background, preventing the main thread
9
9
  # from being blocked by the HTTP request.
10
10
  #
11
11
  # @example Enqueue the job
12
- # ErrorNotifier::HttpPostJob.perform_later('https://your-webhook-url.com', { key: 'value' }.to_json)
12
+ # DlnkErrorNotifier::HttpPostJob.perform_later('https://your-webhook-url.com', { key: 'value' }.to_json)
13
13
  #
14
14
  # @param url [String] the URL to which the POST request is sent
15
15
  # @param body [String] the body of the POST request, typically in JSON format
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "rack/request"
4
- require "error_notifier/jobs/http_post_job"
4
+ require "dlnk_error_notifier/jobs/http_post_job"
5
5
 
6
- module ErrorNotifier
6
+ module DlnkErrorNotifier
7
7
  # Middleware to catch exceptions and send them to a webhook
8
8
  class Middleware
9
9
  def initialize(app)
@@ -37,7 +37,7 @@ module ErrorNotifier
37
37
  end
38
38
 
39
39
  def send_webhook(error_details)
40
- ErrorNotifier::HttpPostJob.perform_later(
40
+ DlnkErrorNotifier::HttpPostJob.perform_later(
41
41
  ENV["WEBHOOK_URL"] || "http://localhost:3000/webhook",
42
42
  error_details.to_json
43
43
  )
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module DlnkErrorNotifier
4
+ VERSION = "0.1.1"
5
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "dlnk_error_notifier/version"
4
+ require_relative "dlnk_error_notifier/middleware"
5
+ require "dlnk_error_notifier/jobs/http_post_job"
6
+
7
+ module DlnkErrorNotifier
8
+ class Error < StandardError; end
9
+ # Your code goes here...
10
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dlnk_error_notifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - dalink
@@ -36,10 +36,10 @@ files:
36
36
  - README.md
37
37
  - bin/console
38
38
  - bin/setup
39
- - lib/error_notifier.rb
40
- - lib/error_notifier/jobs/http_post_job.rb
41
- - lib/error_notifier/middleware.rb
42
- - lib/error_notifier/version.rb
39
+ - lib/dlnk_error_notifier.rb
40
+ - lib/dlnk_error_notifier/jobs/http_post_job.rb
41
+ - lib/dlnk_error_notifier/middleware.rb
42
+ - lib/dlnk_error_notifier/version.rb
43
43
  homepage: https://github.com/dalink/error_notifier
44
44
  licenses:
45
45
  - MIT
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module ErrorNotifier
4
- VERSION = "0.1.0"
5
- end
@@ -1,10 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "error_notifier/version"
4
- require_relative "error_notifier/middleware"
5
- require "error_notifier/jobs/http_post_job"
6
-
7
- module ErrorNotifier
8
- class Error < StandardError; end
9
- # Your code goes here...
10
- end