telebugs 0.9.0 → 0.10.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: aa8891b6ca7665271200ac99930e2e44eaa4a23225996650b794ab3561e2d9c0
4
- data.tar.gz: a1a4ff3942f1a68b544040589653ee7355e0daea98d23b114dbaea2de7150b04
3
+ metadata.gz: 4ac26c242c70bb68865a22619ab11bf4a6ea87a8916419d7c23b61a8e177c6f4
4
+ data.tar.gz: '082d97785ef062ccea94556aeaa80a0611e89bf0c185064177f470e4ad9dd2f7'
5
5
  SHA512:
6
- metadata.gz: e65e6264b1bd55c51c81d43d64cb684d7ded53cb97e607a73820bf129d99f6c6c04cbb089e32af538a82490d5387c6bc32650b259b52dbe4abd79324ab9bbac0
7
- data.tar.gz: 3cdf9ef3c6f5a3d0851124ee546fc3507648ca453684463e4d71c8c375de042b28660b645c5097dc2034ed82238a3bc3019367230a440b26f0602f8d7b0b8f8a
6
+ metadata.gz: c1d605be920edfa515e901a9fbcdd30291722e789b88db3c9feff628ad221cff0954ab8b945dba3a3c678127678ee1e15193c2c1ca138e6c6bcc4a6beebd39a9
7
+ data.tar.gz: 3e36a26d7e450f141ad1f8926e1e6bf934cccce0eb8620df4c37c791a070fdb5491b56bb45d22da9e975bc665812b24cc208023abd9c5e5f3714be4b911693ec
@@ -3,7 +3,7 @@
3
3
  module Telebugs
4
4
  # Represents a middleware that can be used to filter out errors.
5
5
  # You must inherit from this class and implement the #call method.
6
- class Middleware
6
+ class BaseMiddleware
7
7
  DEFAULT_WEIGHT = 0
8
8
 
9
9
  def weight
@@ -4,7 +4,7 @@ module Telebugs
4
4
  class Middleware
5
5
  # GemRootFilter is a middleware that filters out the root path of the gems.
6
6
  # It replaces the root path with the gem name and version.
7
- class GemRootFilter < Telebugs::Middleware
7
+ class GemRootFilter < Telebugs::BaseMiddleware
8
8
  def initialize
9
9
  @gem_paths = Gem.path.map { |path| /\A#{Regexp.escape(path)}\/gems\// }
10
10
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Telebugs
4
4
  class Middleware
5
- class IgnoreEnvironments < Telebugs::Middleware
5
+ class IgnoreEnvironments < Telebugs::BaseMiddleware
6
6
  def initialize(current_env, ignore_envs)
7
7
  @current_env = current_env
8
8
  @ignore_envs = ignore_envs
@@ -3,7 +3,7 @@
3
3
  module Telebugs
4
4
  class Middleware
5
5
  # Filters out the root directory from the backtrace paths.
6
- class RootDirectoryFilter < Telebugs::Middleware
6
+ class RootDirectoryFilter < Telebugs::BaseMiddleware
7
7
  def initialize(root_directory)
8
8
  @root_directory = root_directory
9
9
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Telebugs
4
- VERSION = "0.9.0"
4
+ VERSION = "0.10.0"
5
5
  end
data/lib/telebugs.rb CHANGED
@@ -15,7 +15,7 @@ require_relative "telebugs/error_message"
15
15
  require_relative "telebugs/backtrace"
16
16
  require_relative "telebugs/file_cache"
17
17
  require_relative "telebugs/code_hunk"
18
- require_relative "telebugs/middleware"
18
+ require_relative "telebugs/base_middleware"
19
19
  require_relative "telebugs/middleware_stack"
20
20
  require_relative "telebugs/truncator"
21
21
 
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.9.0
4
+ version: 0.10.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-07-30 00:00:00.000000000 Z
11
+ date: 2024-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -53,11 +53,11 @@ files:
53
53
  - Rakefile
54
54
  - lib/telebugs.rb
55
55
  - lib/telebugs/backtrace.rb
56
+ - lib/telebugs/base_middleware.rb
56
57
  - lib/telebugs/code_hunk.rb
57
58
  - lib/telebugs/config.rb
58
59
  - lib/telebugs/error_message.rb
59
60
  - lib/telebugs/file_cache.rb
60
- - lib/telebugs/middleware.rb
61
61
  - lib/telebugs/middleware/gem_root_filter.rb
62
62
  - lib/telebugs/middleware/ignore_environments.rb
63
63
  - lib/telebugs/middleware/root_directory_filter.rb