telebugs 0.1.0 → 0.2.0

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: 14237978a4696093518f0a95eefa25363b7f6adaa2acc1c02d5e8cfcddb63b93
4
- data.tar.gz: 61c664b448c4098fabdf4d49684f49b18494ec0e16e8d6dea5e7043cad19e8bf
3
+ metadata.gz: a186b733c180e1a2afb45645f954b29007010413df2a26160d474c1b47de271a
4
+ data.tar.gz: 4ea3024fd4eb4966737e0601a1321a69edbf5deaba3037926bd48b107509d6fd
5
5
  SHA512:
6
- metadata.gz: eef345a4aaf248ce14462ed2cfeaf6ef6b410c42b377b911bf47a48dd2742c401af8c16fa3680c229e1a6235e963937fcdfd17494dae039fc39b93f7785f783e
7
- data.tar.gz: ebe99794663078f5d9a8528eeb71d5dec959bb937787fde07ae242e4060738ac013fbbf0a9710506fd0e0bf04b7fb003ac8ed8938857181b4e61e3ee345eb397
6
+ metadata.gz: 54677d124e340a0bc65238a959b720e69ecedd8270171a8f64622f1a5df67cf4c99b92f49f7e32c5e1d28e658e8da9c34e7cc715225bd8c51ddc474020cacd0d
7
+ data.tar.gz: bdc8e8d6c343f007ef8542b8cc969cf337091e974a0eb34a6326de0f1e0245c143b7f18beed33453e26b76e223465bd6f7c24d026ca2383b7207f3402701e093
data/README.md CHANGED
@@ -46,7 +46,7 @@ end
46
46
  begin
47
47
  1 / 0
48
48
  rescue ZeroDivisionError => e
49
- Telebugs.notify(error: e)
49
+ Telebugs.report(e)
50
50
  end
51
51
 
52
52
  sleep 2
@@ -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
- # Notifier is reponsible for sending reports to Telebugs.
5
- class Notifier
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 notify(error)
19
+ def report(error)
20
20
  Telebugs::Promise.new(error) do
21
21
  report = Report.new(error)
22
22
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Telebugs
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
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/notifier"
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,8 @@ module Telebugs
30
30
  yield Config.instance
31
31
  end
32
32
 
33
- def notify(error:)
34
- Notifier.instance.notify(error)
33
+ def report(error)
34
+ Reporter.instance.report(error)
35
35
  end
36
36
  end
37
37
  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.1.0
4
+ version: 0.2.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-14 00:00:00.000000000 Z
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