telebugs 0.1.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/telebugs/config.rb +0 -2
- data/lib/telebugs/{notifier.rb → reporter.rb} +3 -3
- data/lib/telebugs/version.rb +1 -1
- data/lib/telebugs.rb +7 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c0c10b30256a39ae190c425e5e5ff716472d3dd633de8f0fd7ac1fade8e03c9
|
4
|
+
data.tar.gz: ff7cfd1b949fa1b4069174707a77e3ba1528bfc1a88e7b861356ec7df90a3771
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 183e8bb39eb85c81b0207c5fa10854038915b18e351df7b2c1ceebfb631092935f78a90d072ea0611865c482c0f01276b1e0f406ee593867c97c0ed2faca009e
|
7
|
+
data.tar.gz: 4bab08e19990d6d79e263cadff184331c603109bf75afaa95f670b3be19d5df2efc8e81d4ec29c6be7ba3ae7fbaa3181c3a16f8aa7de5e7ea2c4cca4e3f4533c
|
data/README.md
CHANGED
data/lib/telebugs/config.rb
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Telebugs
|
4
|
-
# Represents the Telebugs config. A config contains all the options that you
|
5
|
-
# can use to configure a +Telebugs::Notifier+ instance.
|
6
4
|
class Config
|
7
5
|
ERROR_API_URL = "https://api.telebugs.com/2024-03-28/errors"
|
8
6
|
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Telebugs
|
4
|
-
#
|
5
|
-
class
|
4
|
+
# Reporter is reponsible for sending reports to Telebugs.
|
5
|
+
class Reporter
|
6
6
|
class << self
|
7
7
|
attr_writer :instance
|
8
8
|
|
@@ -16,7 +16,7 @@ module Telebugs
|
|
16
16
|
@middleware = Config.instance.middleware
|
17
17
|
end
|
18
18
|
|
19
|
-
def
|
19
|
+
def report(error)
|
20
20
|
Telebugs::Promise.new(error) do
|
21
21
|
report = Report.new(error)
|
22
22
|
|
data/lib/telebugs/version.rb
CHANGED
data/lib/telebugs.rb
CHANGED
@@ -7,7 +7,7 @@ require "json"
|
|
7
7
|
require_relative "telebugs/version"
|
8
8
|
require_relative "telebugs/config"
|
9
9
|
require_relative "telebugs/promise"
|
10
|
-
require_relative "telebugs/
|
10
|
+
require_relative "telebugs/reporter"
|
11
11
|
require_relative "telebugs/sender"
|
12
12
|
require_relative "telebugs/wrapped_error"
|
13
13
|
require_relative "telebugs/report"
|
@@ -30,8 +30,12 @@ module Telebugs
|
|
30
30
|
yield Config.instance
|
31
31
|
end
|
32
32
|
|
33
|
-
def
|
34
|
-
|
33
|
+
def config
|
34
|
+
Config.instance
|
35
|
+
end
|
36
|
+
|
37
|
+
def report(error)
|
38
|
+
Reporter.instance.report(error)
|
35
39
|
end
|
36
40
|
end
|
37
41
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: telebugs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kyrylo Silin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -59,9 +59,9 @@ files:
|
|
59
59
|
- lib/telebugs/file_cache.rb
|
60
60
|
- lib/telebugs/middleware.rb
|
61
61
|
- lib/telebugs/middleware_stack.rb
|
62
|
-
- lib/telebugs/notifier.rb
|
63
62
|
- lib/telebugs/promise.rb
|
64
63
|
- lib/telebugs/report.rb
|
64
|
+
- lib/telebugs/reporter.rb
|
65
65
|
- lib/telebugs/sender.rb
|
66
66
|
- lib/telebugs/truncator.rb
|
67
67
|
- lib/telebugs/version.rb
|