lapsoss 0.4.9 → 0.4.10

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: 6e053057613e5678e160556abda63a224b056bb4b0b4b1d291282b2c1a8476ea
4
- data.tar.gz: c6109d65cfb08dc095c45862565b6754a720e18d52f27814c0606a307964f328
3
+ metadata.gz: 76c4609d94f1d9463922da6d1850b7b618977075dd0d96fa7d94d58186cd64b9
4
+ data.tar.gz: 8d5db54e63ef1e6a0d73962261bd13ce4cfca305c63570bf879c4dbf85bb3110
5
5
  SHA512:
6
- metadata.gz: 944d8581a4dc544e14f2daf5094d9af5d59e5f387802212a2342f8b33f88790e218fe365df882cc6b56444edeb72addf1815ff4851c6eb9f5e50ecf388d22797
7
- data.tar.gz: e4c712a550906d722d7a954d04560de2f4d6119a51d8c5271ca73cf4b7b8ca8a45ea238eddc3fb11366dbd35bc9f3dbc5cb3dc85544f4bbee8ccdd38d78858ec
6
+ metadata.gz: ac8bc565e2d54b1c3f600de8b2a6fedc0e2da481ce3c9003c587b81bd4134209618ba77dd3ae1019188537217c09c2f8317640ea36d46b91a229116eeaafd032
7
+ data.tar.gz: eee117f27719db7cfe019466cfbe5ec1210e86c0cfb0a7bff6764984acb148fb2233dd0c84fb7029e0e643e38f2147989f41172035a41dbd79a35eecad79763f
data/README.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Lapsoss - Vendor-Neutral Error Reporting for Rails
2
2
 
3
+ [![Ruby CI](https://github.com/seuros/lapsoss/actions/workflows/ci.yml/badge.svg)](https://github.com/seuros/lapsoss/actions/workflows/ci.yml)
4
+ [![Gem Version](https://badge.fury.io/rb/lapsoss.svg)](https://badge.fury.io/rb/lapsoss)
5
+ [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
6
+ [![Downloads](https://img.shields.io/gem/dt/lapsoss.svg)](https://rubygems.org/gems/lapsoss)
7
+
3
8
  ## The Problem We All Face
4
9
 
5
10
  You're 6 months into production with Bugsnag. The CFO says "costs are too high, switch to Sentry."
@@ -78,7 +83,7 @@ end
78
83
 
79
84
  **Option 1: Automatic Rails.error Integration (Recommended)**
80
85
  ```ruby
81
- # config/initializers/lapsoss.rb
86
+ # config/initializers/lapsoss.rb
82
87
  Lapsoss.configure do |config|
83
88
  config.use_appsignal(push_api_key: ENV['APPSIGNAL_KEY'])
84
89
  end
@@ -141,7 +146,7 @@ end
141
146
  # Old: Bugsnag.notify(e)
142
147
  # New: Lapsoss.capture_exception(e)
143
148
 
144
- # Step 4: Remove bugsnag gem when ready
149
+ # Step 4: Remove bugsnag gem when ready
145
150
  # Your app keeps running, now on Telebugs
146
151
  ```
147
152
 
@@ -264,7 +269,7 @@ Lapsoss.configure do |config|
264
269
 
265
270
  # Sampling (see docs/sampling_strategies.md for advanced examples)
266
271
  config.sample_rate = Rails.env.production? ? 0.25 : 1.0
267
-
272
+
268
273
  # Transport settings
269
274
  config.transport_timeout = 10 # seconds
270
275
  config.transport_max_retries = 3
@@ -283,7 +288,7 @@ Lapsoss.configure do |config|
283
288
  return nil if event.exception.is_a?(ActiveRecord::RecordNotFound)
284
289
  event
285
290
  end
286
-
291
+
287
292
  # Or use the exclusion filter for more complex rules
288
293
  config.exclusion_filter = Lapsoss::ExclusionFilter.new(
289
294
  # Exclude specific exception types
@@ -291,20 +296,20 @@ Lapsoss.configure do |config|
291
296
  "ActionController::RoutingError", # Your choice
292
297
  "ActiveRecord::RecordNotFound" # Your decision
293
298
  ],
294
-
299
+
295
300
  # Exclude by pattern matching
296
301
  excluded_patterns: [
297
302
  /timeout/i, # If timeouts are expected in your app
298
303
  /user not found/i # If these are normal in your workflow
299
304
  ],
300
-
305
+
301
306
  # Exclude specific error messages
302
307
  excluded_messages: [
303
308
  "No route matches",
304
309
  "Invalid authenticity token"
305
310
  ]
306
311
  )
307
-
312
+
308
313
  # Add custom exclusion logic
309
314
  config.exclusion_filter.add_exclusion(:custom, lambda do |event|
310
315
  # Your business logic here
@@ -393,7 +398,7 @@ class Liberation
393
398
  end
394
399
  puts "✅ Continued execution after error"
395
400
  end
396
-
401
+
397
402
  def self.revolt!
398
403
  Rails.error.record do
399
404
  raise RuntimeError, "Revolution cannot be stopped!"
@@ -464,7 +469,7 @@ end
464
469
 
465
470
  # These methods mirror Rails.error exactly:
466
471
  # - Lapsoss.handle → Rails.error.handle
467
- # - Lapsoss.record → Rails.error.record
472
+ # - Lapsoss.record → Rails.error.record
468
473
  # - Lapsoss.report → Rails.error.report
469
474
  ```
470
475
 
@@ -492,9 +497,9 @@ class TelebugsAdapter < Lapsoss::Adapters::SentryAdapter
492
497
  def initialize(name = :telebugs, settings = {})
493
498
  super(name, settings)
494
499
  end
495
-
500
+
496
501
  private
497
-
502
+
498
503
  def build_headers(public_key)
499
504
  super(public_key).merge(
500
505
  "X-Telebugs-Client" => "lapsoss/#{Lapsoss::VERSION}"
@@ -1,12 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "logger"
4
- require "active_support/configurable"
5
4
 
6
5
  module Lapsoss
7
6
  class Configuration
8
7
  include Validators
9
- include ActiveSupport::Configurable
10
8
 
11
9
  attr_accessor :async, :logger, :enabled, :release, :debug,
12
10
  :scrub_fields, :scrub_all, :whitelist_fields, :randomize_scrub_length,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lapsoss
4
- VERSION = "0.4.9"
4
+ VERSION = "0.4.10"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lapsoss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.9
4
+ version: 0.4.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abdelkader Boudih