yabeda-rails 0.10.0 → 0.11.0

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: e922a45967dbc75c255c7bf6453e796e13157be68ba0c0c6813e8eb80633db8f
4
- data.tar.gz: f4bf58df8b7a6904f40a4e47c7fdeab0756ffbab4f59910e90dab01f77e47886
3
+ metadata.gz: 7319b68d8a8349187c4ce4dcdb77859f7ef63cfb3719d56e564c6ecef48daa3b
4
+ data.tar.gz: 8f77ef89f3aa1789cd6b6d37d973effc948721b0fefc200ed92f8b7dbfb29bfd
5
5
  SHA512:
6
- metadata.gz: 256b563227886fadd1def58675cd7160e2ffadd8b1b7dd0951bdc203b7a3c0f97e298fde9640c4006187e9a202db8267498a8d2185a3f0b4100f77782555aa94
7
- data.tar.gz: 62c3b89bf1fd7f7bb48a5bfeddd63f1d9cf86540db6b49d80075b00b94116471db59d6c7577554e4aff84f8063eacb094839c6789264cb380a6d0f585022cf1f
6
+ metadata.gz: 43b35bd4aa50475c5891c74012f2bb7fc958de2efe98b3c05c22d9c9651be87ece0ab45178f29886816ce702476176244b9e98abdcf8fc3454265a4e25ae2948
7
+ data.tar.gz: 755e8a5a3ff85e6dceb833f15a1a400e6de916bc90e4d4a7eb9df2ca3793818be0b7837474e3105c0196d5d6fd752185a3bd5c10eadb162cd770c039c8d7b776
@@ -22,6 +22,8 @@ jobs:
22
22
  - ruby: "head"
23
23
  rails: "HEAD"
24
24
  optional: true
25
+ - ruby: "3.4"
26
+ rails: "8.1"
25
27
  - ruby: "3.4"
26
28
  rails: "8.0"
27
29
  - ruby: "3.3"
data/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## 0.11.0 - 2025-12-03
9
+
10
+ ### Added
11
+
12
+ - Ability to use procs and regexps in `ignore_actions` configuration. [@lewispb][] in [#34](https://github.com/yabeda-rb/yabeda-rails/pull/34), [@Envek][]
13
+
8
14
  ## 0.10.0 - 2025-09-09
9
15
 
10
16
  ### Added
data/README.md CHANGED
@@ -84,7 +84,7 @@ Configuration is handled by [anyway_config] gem. With it you can load settings f
84
84
  | ---------------------- | ------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
85
85
  | `apdex_target` | integer | nil | Tolerable time for Apdex in seconds, exposed as gauge if set. |
86
86
  | `controller_name_case` | symbol | :snake | Defines whether controller name is reported in camel case (:camel) or snake case (:snake). |
87
- | `ignore_actions` | array | [] | array of controller#action strings that should be ignored, controller should be in camel case, example `['HealthCheck::HealthCheckController#index']` |
87
+ | `ignore_actions` | array or proc | [] | array of controller#action strings or a proc that receives the controller#action string and returns true if the action should be ignored. Controller should be in camel case, example `['HealthCheck::HealthCheckController#index']` or `->(controller_action) { controller_action.start_with?("HealthCheck") }` |
88
88
 
89
89
  ## Development
90
90
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Yabeda
4
4
  module Rails
5
- VERSION = "0.10.0"
5
+ VERSION = "0.11.0"
6
6
  end
7
7
  end
data/lib/yabeda/rails.rb CHANGED
@@ -58,7 +58,9 @@ module Yabeda
58
58
  ActiveSupport::Notifications.subscribe "process_action.action_controller" do |*args|
59
59
  event = Yabeda::Rails::Event.new(*args)
60
60
 
61
- next if event.controller_action.in?(config.ignore_actions)
61
+ # rubocop: disable Style/CaseEquality
62
+ next if Array(config.ignore_actions).any? { |action| action === event.controller_action }
63
+ # rubocop: enable Style/CaseEquality
62
64
 
63
65
  rails_requests_total.increment(event.labels)
64
66
  rails_request_duration.measure(event.labels, event.duration)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yabeda-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Novikov