telebugs 0.2.0 → 0.4.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: a186b733c180e1a2afb45645f954b29007010413df2a26160d474c1b47de271a
4
- data.tar.gz: 4ea3024fd4eb4966737e0601a1321a69edbf5deaba3037926bd48b107509d6fd
3
+ metadata.gz: d5da4c3b22bc49e8e3e6ed286fe61c0122fa763949c04941ce87980e9876efda
4
+ data.tar.gz: 2a24565987b4f25f6219a4dba913ec501555e65cd68a8fb62ec0c4fe4af5ec80
5
5
  SHA512:
6
- metadata.gz: 54677d124e340a0bc65238a959b720e69ecedd8270171a8f64622f1a5df67cf4c99b92f49f7e32c5e1d28e658e8da9c34e7cc715225bd8c51ddc474020cacd0d
7
- data.tar.gz: bdc8e8d6c343f007ef8542b8cc969cf337091e974a0eb34a6326de0f1e0245c143b7f18beed33453e26b76e223465bd6f7c24d026ca2383b7207f3402701e093
6
+ metadata.gz: 50c12ee34337f5375c63e50c6f624d919c7b747cebd3b3ce020254dbce7cc8f0d80fc721e49c96a282badfcd3dd8068d8ca601aa546b0a79e14e2303252b120d
7
+ data.tar.gz: 9f792b211b679df2db87a6e02afcad58a348d7349acc35612748696e1f03f2f5db451253db0e24bcf1a66e7e48c7b939018addc093d0b84f2a2835d969c4aa8e
@@ -21,6 +21,10 @@ module Telebugs
21
21
  @middlewares = (@middlewares << new_middleware).sort_by(&:weight).reverse
22
22
  end
23
23
 
24
+ def delete(middleware_class)
25
+ @middlewares.delete_if { |middleware| middleware.instance_of?(middleware_class) }
26
+ end
27
+
24
28
  def call(report)
25
29
  @middlewares.each do |middleware|
26
30
  middleware.call(report)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Telebugs
4
- VERSION = "0.2.0"
4
+ VERSION = "0.4.0"
5
5
  end
data/lib/telebugs.rb CHANGED
@@ -30,6 +30,10 @@ module Telebugs
30
30
  yield Config.instance
31
31
  end
32
32
 
33
+ def config
34
+ Config.instance
35
+ end
36
+
33
37
  def report(error)
34
38
  Reporter.instance.report(error)
35
39
  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.2.0
4
+ version: 0.4.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-15 00:00:00.000000000 Z
11
+ date: 2024-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby