bugsnag 6.19.0 → 6.26.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -0
  3. data/CHANGELOG.md +176 -0
  4. data/VERSION +1 -1
  5. data/bugsnag.gemspec +18 -1
  6. data/lib/bugsnag/breadcrumb_type.rb +14 -0
  7. data/lib/bugsnag/breadcrumbs/breadcrumb.rb +34 -1
  8. data/lib/bugsnag/breadcrumbs/breadcrumbs.rb +1 -0
  9. data/lib/bugsnag/breadcrumbs/on_breadcrumb_callback_list.rb +50 -0
  10. data/lib/bugsnag/cleaner.rb +31 -18
  11. data/lib/bugsnag/configuration.rb +243 -25
  12. data/lib/bugsnag/delivery/synchronous.rb +2 -2
  13. data/lib/bugsnag/delivery/thread_queue.rb +2 -2
  14. data/lib/bugsnag/endpoint_configuration.rb +11 -0
  15. data/lib/bugsnag/endpoint_validator.rb +80 -0
  16. data/lib/bugsnag/error.rb +25 -0
  17. data/lib/bugsnag/event.rb +7 -0
  18. data/lib/bugsnag/feature_flag.rb +74 -0
  19. data/lib/bugsnag/integrations/mongo.rb +5 -3
  20. data/lib/bugsnag/integrations/rack.rb +3 -3
  21. data/lib/bugsnag/integrations/rails/active_job.rb +102 -0
  22. data/lib/bugsnag/integrations/rails/rails_breadcrumbs.rb +2 -0
  23. data/lib/bugsnag/integrations/railtie.rb +70 -27
  24. data/lib/bugsnag/integrations/resque.rb +17 -3
  25. data/lib/bugsnag/integrations/sidekiq.rb +1 -0
  26. data/lib/bugsnag/middleware/active_job.rb +18 -0
  27. data/lib/bugsnag/middleware/classify_error.rb +1 -0
  28. data/lib/bugsnag/middleware/delayed_job.rb +21 -2
  29. data/lib/bugsnag/middleware/exception_meta_data.rb +2 -0
  30. data/lib/bugsnag/middleware/rack_request.rb +84 -19
  31. data/lib/bugsnag/middleware/rails3_request.rb +2 -2
  32. data/lib/bugsnag/middleware/rake.rb +1 -1
  33. data/lib/bugsnag/middleware/session_data.rb +3 -1
  34. data/lib/bugsnag/middleware/sidekiq.rb +1 -1
  35. data/lib/bugsnag/middleware/suggestion_data.rb +9 -7
  36. data/lib/bugsnag/middleware_stack.rb +6 -6
  37. data/lib/bugsnag/report.rb +204 -8
  38. data/lib/bugsnag/session_tracker.rb +52 -12
  39. data/lib/bugsnag/stacktrace.rb +13 -2
  40. data/lib/bugsnag/tasks/bugsnag.rake +1 -1
  41. data/lib/bugsnag/utility/duplicator.rb +124 -0
  42. data/lib/bugsnag/utility/feature_data_store.rb +41 -0
  43. data/lib/bugsnag/utility/feature_flag_delegate.rb +89 -0
  44. data/lib/bugsnag/utility/metadata_delegate.rb +102 -0
  45. data/lib/bugsnag.rb +156 -8
  46. metadata +24 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5a3825d21f3c5d15bfb0244584a4cf18032fae0c7432a829db961b8310f3c679
4
- data.tar.gz: 0b6008183c0562e67c8a5ef1ae6c599645aad55313fbcc3aa6d7a7b2996ca98d
3
+ metadata.gz: b81b73938dd3c97a31351658997cdfb8aea702e1f6aefb7393c6da413889e39a
4
+ data.tar.gz: 8aa07e57b32cb7244d76f7070e67aa87e9155b8ed5ca368134873f4ac1a62505
5
5
  SHA512:
6
- metadata.gz: ffc195c3a00ecbf51f76974ac5281536ff406fa944030b6c36f907cdabceaa79a15720094c4f7f53347cbc760819cb0600cbd5ed9117d8e3d1d34e3f614e9eb3
7
- data.tar.gz: ca216fbbf877e60007be16315bad08ce1d5b07a884e4dc83ef2c7e548cd4511b31e92f608cfe5ee7463adf0bad6e33710009a4679bab45089481ffa918fd44ec
6
+ metadata.gz: 7cd2ebb04673c7c7d53263fc13d25704ed4ace69648089cee43e320e00b895549857f2a585326f2150f2454e5144d8c9596284289038a69ff0a7767d175c1608
7
+ data.tar.gz: f5f8bcd366b34a1d375fe2dbe091e2e80202fb60af9ce06acb0eb0221c33700b0e09ac0dea84244b2b830542eb768320ceb188c1a68b0db4f35de93be63b48a0
data/.yardopts CHANGED
@@ -4,6 +4,7 @@
4
4
  --no-private
5
5
  --protected
6
6
  --title "bugsnag-ruby API Documentation"
7
+ --embed-mixins
7
8
  lib/**/*.rb
8
9
  -
9
10
  README.md
data/CHANGELOG.md CHANGED
@@ -1,6 +1,182 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ## v6.26.0 (19 July 2023)
5
+
6
+ ### Enhancements
7
+
8
+ * Support Sidekiq v7
9
+ | [#785](https://github.com/bugsnag/bugsnag-ruby/pull/785)
10
+ | [stevenharman](https://github.com/stevenharman)
11
+
12
+ ## v6.25.2 (7 February 2023)
13
+
14
+ ### Enhancements
15
+
16
+ * Improve performance of `Bugsnag.notify`
17
+ | [#774](https://github.com/bugsnag/bugsnag-ruby/pull/774)
18
+ | [sambostock](https://github.com/sambostock)
19
+
20
+ ## v6.25.1 (5 January 2023)
21
+
22
+ ### Fixes
23
+
24
+ * Allow Gem paths to be stripped from file names in stacktraces when they contain a Regexp special character
25
+ | [#764](https://github.com/bugsnag/bugsnag-ruby/pull/764)
26
+
27
+ ### Enhancements
28
+
29
+ * Use `Exception#detailed_message` instead of `Exception#message` when available
30
+ | [#761](https://github.com/bugsnag/bugsnag-ruby/pull/761)
31
+
32
+ ## v6.25.0 (1 December 2022)
33
+
34
+ ### Enhancements
35
+
36
+ * Add support for feature flags & experiments. For more information, please see https://docs.bugsnag.com/product/features-experiments
37
+ | [#758](https://github.com/bugsnag/bugsnag-ruby/pull/758)
38
+
39
+ ## v6.24.2 (21 January 2022)
40
+
41
+ ### Fixes
42
+
43
+ * Avoid rescuing from errors in Active Record transaction callbacks in versions of Rails where they will be re-raised
44
+ | [#709](https://github.com/bugsnag/bugsnag-ruby/pull/709)
45
+ | [apalmblad](https://github.com/apalmblad)
46
+
47
+ ## v6.24.1 (30 November 2021)
48
+
49
+ ### Fixes
50
+
51
+ * Fix metadata not being recorded when using Resque outside of Active Job
52
+ | [#710](https://github.com/bugsnag/bugsnag-ruby/pull/710)
53
+ | [isnotajoke](https://github.com/isnotajoke)
54
+
55
+ ## v6.24.0 (6 October 2021)
56
+
57
+ ### Enhancements
58
+
59
+ * Allow overriding an event's unhandled flag
60
+ | [#698](https://github.com/bugsnag/bugsnag-ruby/pull/698)
61
+ * Add the ability to store metadata globally
62
+ | [#699](https://github.com/bugsnag/bugsnag-ruby/pull/699)
63
+ * Add `cookies`, `body` and `httpVersion` to the automatically captured request data for Rack apps
64
+ | [#700](https://github.com/bugsnag/bugsnag-ruby/pull/700)
65
+ * Add `Configuration#endpoints` for reading the notify and sessions endpoints and `Configuration#endpoints=` for setting them
66
+ | [#701](https://github.com/bugsnag/bugsnag-ruby/pull/701)
67
+ * Add `Configuration#redacted_keys`. This is like `meta_data_filters` but matches strings with case-insensitive equality, rather than matching based on inclusion
68
+ | [#703](https://github.com/bugsnag/bugsnag-ruby/pull/703)
69
+ * Allow pausing and resuming sessions, giving more control over the stability score
70
+ | [#704](https://github.com/bugsnag/bugsnag-ruby/pull/704)
71
+ * Add `Configuration#vendor_paths` to replace `Configuration#vendor_path`
72
+ | [#705](https://github.com/bugsnag/bugsnag-ruby/pull/705)
73
+
74
+ ### Deprecated
75
+
76
+ * In the next major release, `params` will only contain query string parameters. Currently it also contains the request body for form data requests, but this is deprecated in favour of the new `body` property
77
+ * The `Configuration#set_endpoints` method is now deprecated in favour of `Configuration#endpoints=`
78
+ * The `Configuration#meta_data_filters` option is now deprecated in favour of `Configuration#redacted_keys`
79
+ * The `Configuration#vendor_path` option is now deprecated in favour of `Configuration#vendor_paths`
80
+
81
+ ## v6.23.0 (21 September 2021)
82
+
83
+ ### Enhancements
84
+
85
+ * Sessions will now be delivered every 10 seconds, instead of every 30 seconds
86
+ | [#680](https://github.com/bugsnag/bugsnag-ruby/pull/680)
87
+ * Log errors that prevent delivery at `ERROR` level
88
+ | [#681](https://github.com/bugsnag/bugsnag-ruby/pull/681)
89
+ * Add `on_breadcrumb` callbacks to replace `before_breadcrumb_callbacks`
90
+ | [#686](https://github.com/bugsnag/bugsnag-ruby/pull/686)
91
+ * Add `context` attribute to configuration, which will be used as the default context for events. Using this option will disable automatic context setting
92
+ | [#687](https://github.com/bugsnag/bugsnag-ruby/pull/687)
93
+ | [#688](https://github.com/bugsnag/bugsnag-ruby/pull/688)
94
+ * Add `Bugsnag#breadcrumbs` getter to fetch the current list of breadcrumbs
95
+ | [#689](https://github.com/bugsnag/bugsnag-ruby/pull/689)
96
+ * Add `time` (an ISO8601 string in UTC) to `device` metadata
97
+ | [#690](https://github.com/bugsnag/bugsnag-ruby/pull/690)
98
+ * Add `errors` to `Report`/`Event` containing an array of `Error` objects. The `Error` object contains `error_class`, `error_message`, `stacktrace` and `type` (always "ruby")
99
+ | [#691](https://github.com/bugsnag/bugsnag-ruby/pull/691)
100
+ * Add `original_error` to `Report`/`Event` containing the original Exception instance
101
+ | [#692](https://github.com/bugsnag/bugsnag-ruby/pull/692)
102
+ * Add `request` to `Report`/`Event` containing HTTP request metadata
103
+ | [#693](https://github.com/bugsnag/bugsnag-ruby/pull/693)
104
+ * Add `add_metadata` and `clear_metadata` to `Report`/`Event`
105
+ | [#694](https://github.com/bugsnag/bugsnag-ruby/pull/694)
106
+ * Add `set_user` to `Report`/`Event`
107
+ | [#695](https://github.com/bugsnag/bugsnag-ruby/pull/695)
108
+
109
+ ### Fixes
110
+
111
+ * Avoid starting session delivery thread when the current release stage is not enabled
112
+ | [#677](https://github.com/bugsnag/bugsnag-ruby/pull/677)
113
+
114
+ ### Deprecated
115
+
116
+ * `before_breadcrumb_callbacks` have been deprecated in favour of `on_breadcrumb` callbacks and will be removed in the next major release
117
+ * For consistency with Bugsnag notifiers for other languages, a number of methods have been deprecated in this release. The old options will be removed in the next major version | [#676](https://github.com/bugsnag/bugsnag-ruby/pull/676)
118
+ * The `notify_release_stages` configuration option has been deprecated in favour of `enabled_release_stages`
119
+ * The `auto_capture_sessions` and `track_sessions` configuration options have been deprecated in favour of `auto_track_sessions`
120
+ * The `enabled_automatic_breadcrumb_types` configuration option has been deprecated in favour of `enabled_breadcrumb_types`
121
+ * The `Report` class has been deprecated in favour of the `Event` class
122
+ * The `Report#meta_data` attribute has been deprecated in favour of `Event#metadata`
123
+ * The `Breadcrumb#meta_data` attribute has been deprecated in favour of `Breadcrumb#metadata`
124
+ * The `Breadcrumb#name` attribute has been deprecated in favour of `Breadcrumb#message`
125
+ * The breadcrumb type constants in the `Bugsnag::Breadcrumbs` module has been deprecated in favour of the constants available in the `Bugsnag::BreadcrumbType` module
126
+ For example, `Bugsnag::Breadcrumbs::ERROR_BREADCRUMB_TYPE` is now available as `Bugsnag::BreadcrumbType::ERROR`
127
+ * `Report#exceptions` has been deprecated in favour of the new `errors` property
128
+ * `Report#raw_exceptions` has been deprecated in favour of the new `original_error` property
129
+ * Accessing request data via `Report#metadata` has been deprecated in favour of using the new `request` property. Request data will be moved out of metadata in the next major version
130
+ * The `Report#add_tab` and `Report#remove_tab` methods have been deprecated in favour of the new `add_metadata` and `clear_metadata` methods
131
+
132
+ ## v6.22.1 (11 August 2021)
133
+
134
+ ### Fixes
135
+
136
+ * Fix possible `LocalJumpError` introduced in v6.22.0
137
+ | [#675](https://github.com/bugsnag/bugsnag-ruby/pull/675)
138
+
139
+ ## v6.22.0 (10 August 2021)
140
+
141
+ ### Enhancements
142
+
143
+ * Add support for tracking exceptions and capturing metadata in Active Job, when not using an existing integration
144
+ | [#670](https://github.com/bugsnag/bugsnag-ruby/pull/670)
145
+
146
+ * Improve the report context when using Delayed Job or Resque as the Active Job queue adapter
147
+ | [#671](https://github.com/bugsnag/bugsnag-ruby/pull/671)
148
+
149
+ ## v6.21.0 (23 June 2021)
150
+
151
+ ### Enhancements
152
+
153
+ * Allow a `Method` or any object responding to `#call` to be used as an `on_error` callback or middleware
154
+ | [#662](https://github.com/bugsnag/bugsnag-ruby/pull/662)
155
+ | [odlp](https://github.com/odlp)
156
+
157
+ ### Fixes
158
+
159
+ * Deliver when an error is raised in the block argument to `notify`
160
+ | [#660](https://github.com/bugsnag/bugsnag-ruby/pull/660)
161
+ | [aki77](https://github.com/aki77)
162
+ * Fix potential `NoMethodError` in `Bugsnag::Railtie` when using `require: false` in a Gemfile
163
+ | [#666](https://github.com/bugsnag/bugsnag-ruby/pull/666)
164
+
165
+ ## v6.20.0 (29 March 2021)
166
+
167
+ ### Enhancements
168
+
169
+ * Classify `ActionDispatch::Http::MimeNegotiation::InvalidType` as info severity level
170
+ | [#654](https://github.com/bugsnag/bugsnag-ruby/pull/654)
171
+
172
+ ### Fixes
173
+
174
+ * Include `connection_id` in ActiveRecord breadcrumb metadata on new versons of Rails
175
+ | [#655](https://github.com/bugsnag/bugsnag-ruby/pull/655)
176
+ * Avoid crash when Mongo 1.12 or earlier is used
177
+ | [#652](https://github.com/bugsnag/bugsnag-ruby/pull/652)
178
+ | [isabanin](https://github.com/isabanin)
179
+
4
180
  ## 6.19.0 (6 January 2021)
5
181
 
6
182
  ### Enhancements
data/VERSION CHANGED
@@ -1 +1 @@
1
- 6.19.0
1
+ 6.26.0
data/bugsnag.gemspec CHANGED
@@ -18,5 +18,22 @@ Gem::Specification.new do |s|
18
18
  ]
19
19
  s.require_paths = ["lib"]
20
20
  s.required_ruby_version = '>= 1.9.2'
21
- s.add_runtime_dependency 'concurrent-ruby', '~> 1.0'
21
+
22
+ ruby_version = Gem::Version.new(RUBY_VERSION.dup)
23
+
24
+ if ruby_version < Gem::Version.new('2.2.0')
25
+ # concurrent-ruby 1.1.10 requires Ruby 2.2+
26
+ s.add_runtime_dependency 'concurrent-ruby', '~> 1.0', '< 1.1.10'
27
+ else
28
+ s.add_runtime_dependency 'concurrent-ruby', '~> 1.0'
29
+ end
30
+
31
+ if s.respond_to?(:metadata=)
32
+ s.metadata = {
33
+ "changelog_uri" => "https://github.com/bugsnag/bugsnag-ruby/blob/HEAD/CHANGELOG.md",
34
+ "documentation_uri" => "https://docs.bugsnag.com/platforms/ruby/",
35
+ "source_code_uri" => "https://github.com/bugsnag/bugsnag-ruby/",
36
+ "rubygems_mfa_required" => "true"
37
+ }
38
+ end
22
39
  end
@@ -0,0 +1,14 @@
1
+ require "bugsnag/breadcrumbs/breadcrumbs"
2
+
3
+ module Bugsnag
4
+ module BreadcrumbType
5
+ ERROR = Bugsnag::Breadcrumbs::ERROR_BREADCRUMB_TYPE
6
+ LOG = Bugsnag::Breadcrumbs::LOG_BREADCRUMB_TYPE
7
+ MANUAL = Bugsnag::Breadcrumbs::MANUAL_BREADCRUMB_TYPE
8
+ NAVIGATION = Bugsnag::Breadcrumbs::NAVIGATION_BREADCRUMB_TYPE
9
+ PROCESS = Bugsnag::Breadcrumbs::PROCESS_BREADCRUMB_TYPE
10
+ REQUEST = Bugsnag::Breadcrumbs::REQUEST_BREADCRUMB_TYPE
11
+ STATE = Bugsnag::Breadcrumbs::STATE_BREADCRUMB_TYPE
12
+ USER = Bugsnag::Breadcrumbs::USER_BREADCRUMB_TYPE
13
+ end
14
+ end
@@ -1,11 +1,13 @@
1
1
  module Bugsnag::Breadcrumbs
2
2
  class Breadcrumb
3
+ # @deprecated Use {#message} instead
3
4
  # @return [String] the breadcrumb name
4
5
  attr_accessor :name
5
6
 
6
7
  # @return [String] the breadcrumb type
7
8
  attr_accessor :type
8
9
 
10
+ # @deprecated Use {#metadata} instead
9
11
  # @return [Hash, nil] metadata hash containing strings, numbers, or booleans, or nil
10
12
  attr_accessor :meta_data
11
13
 
@@ -23,7 +25,7 @@ module Bugsnag::Breadcrumbs
23
25
  # @api private
24
26
  #
25
27
  # @param name [String] the breadcrumb name
26
- # @param type [String] the breadcrumb type from Bugsnag::Breadcrumbs::VALID_BREADCRUMB_TYPES
28
+ # @param type [String] the breadcrumb type from Bugsnag::BreadcrumbType
27
29
  # @param meta_data [Hash, nil] a hash containing strings, numbers, or booleans, or nil
28
30
  # @param auto [Symbol] set to `:auto` if the breadcrumb is automatically generated
29
31
  def initialize(name, type, meta_data, auto)
@@ -72,5 +74,36 @@ module Bugsnag::Breadcrumbs
72
74
  :timestamp => @timestamp.iso8601(3)
73
75
  }
74
76
  end
77
+
78
+ # TODO: "message" and "metadata" can be simple attr_accessors when they
79
+ # replace "name" and "meta_data"
80
+ # NOTE: these are not aliases as YARD doesn't allow documenting the non-alias
81
+ # as deprecated without also marking the alias as deprecated
82
+
83
+ # The breadcrumb message
84
+ # @!attribute message
85
+ # @return [String]
86
+ def message
87
+ @name
88
+ end
89
+
90
+ # @param message [String]
91
+ # @return [void]
92
+ def message=(message)
93
+ @name = message
94
+ end
95
+
96
+ # A Hash containing arbitrary metadata associated with this breadcrumb
97
+ # @!attribute metadata
98
+ # @return [Hash, nil]
99
+ def metadata
100
+ @meta_data
101
+ end
102
+
103
+ # @param metadata [Hash, nil]
104
+ # @return [void]
105
+ def metadata=(metadata)
106
+ @meta_data = metadata
107
+ end
75
108
  end
76
109
  end
@@ -1,4 +1,5 @@
1
1
  module Bugsnag::Breadcrumbs
2
+ # @deprecated Use {Bugsnag::BreadcrumbType} instead
2
3
  VALID_BREADCRUMB_TYPES = [
3
4
  ERROR_BREADCRUMB_TYPE = "error",
4
5
  MANUAL_BREADCRUMB_TYPE = "manual",
@@ -0,0 +1,50 @@
1
+ require "set"
2
+
3
+ module Bugsnag::Breadcrumbs
4
+ class OnBreadcrumbCallbackList
5
+ def initialize(configuration)
6
+ @callbacks = Set.new
7
+ @mutex = Mutex.new
8
+ @configuration = configuration
9
+ end
10
+
11
+ ##
12
+ # @param callback [Proc, Method, #call]
13
+ # @return [void]
14
+ def add(callback)
15
+ @mutex.synchronize do
16
+ @callbacks.add(callback)
17
+ end
18
+ end
19
+
20
+ ##
21
+ # @param callback [Proc, Method, #call]
22
+ # @return [void]
23
+ def remove(callback)
24
+ @mutex.synchronize do
25
+ @callbacks.delete(callback)
26
+ end
27
+ end
28
+
29
+ ##
30
+ # @param breadcrumb [Breadcrumb]
31
+ # @return [void]
32
+ def call(breadcrumb)
33
+ @callbacks.each do |callback|
34
+ begin
35
+ should_continue = callback.call(breadcrumb)
36
+ rescue StandardError => e
37
+ @configuration.warn("Error occurred in on_breadcrumb callback: '#{e}'")
38
+ @configuration.warn("on_breadcrumb callback stacktrace: #{e.backtrace.inspect}")
39
+ end
40
+
41
+ # only stop if should_continue is explicity 'false' to allow callbacks
42
+ # to return 'nil'
43
+ if should_continue == false
44
+ breadcrumb.ignore!
45
+ break
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
@@ -25,7 +25,7 @@ module Bugsnag
25
25
  # @param url [String]
26
26
  # @return [String]
27
27
  def clean_url(url)
28
- return url if @configuration.meta_data_filters.empty?
28
+ return url if @configuration.meta_data_filters.empty? && @configuration.redacted_keys.empty?
29
29
 
30
30
  uri = URI(url)
31
31
  return url unless uri.query
@@ -43,6 +43,33 @@ module Bugsnag
43
43
  uri.to_s
44
44
  end
45
45
 
46
+ ##
47
+ # @param key [String, #to_s]
48
+ # @return [Boolean]
49
+ def filters_match?(key)
50
+ str = key.to_s
51
+
52
+ matched = @configuration.meta_data_filters.any? do |filter|
53
+ case filter
54
+ when Regexp
55
+ str.match(filter)
56
+ else
57
+ str.include?(filter.to_s)
58
+ end
59
+ end
60
+
61
+ return true if matched
62
+
63
+ @configuration.redacted_keys.any? do |redaction_pattern|
64
+ case redaction_pattern
65
+ when Regexp
66
+ str.match(redaction_pattern)
67
+ when String
68
+ str.downcase == redaction_pattern.downcase
69
+ end
70
+ end
71
+ end
72
+
46
73
  private
47
74
 
48
75
  ##
@@ -54,9 +81,11 @@ module Bugsnag
54
81
  #
55
82
  # @return [Boolean]
56
83
  def deep_filters?
57
- @configuration.meta_data_filters.any? do |filter|
84
+ is_deep_filter = proc do |filter|
58
85
  filter.is_a?(Regexp) && filter.to_s.include?("\\.".freeze)
59
86
  end
87
+
88
+ @configuration.meta_data_filters.any?(&is_deep_filter) || @configuration.redacted_keys.any?(&is_deep_filter)
60
89
  end
61
90
 
62
91
  def clean_string(str)
@@ -137,22 +166,6 @@ module Bugsnag
137
166
  value
138
167
  end
139
168
 
140
- ##
141
- # @param key [String, #to_s]
142
- # @return [Boolean]
143
- def filters_match?(key)
144
- str = key.to_s
145
-
146
- @configuration.meta_data_filters.any? do |filter|
147
- case filter
148
- when Regexp
149
- str.match(filter)
150
- else
151
- str.include?(filter.to_s)
152
- end
153
- end
154
- end
155
-
156
169
  ##
157
170
  # If someone has a Rails filter like /^stuff\.secret/, it won't match
158
171
  # "request.params.stuff.secret", so we try it both with and without the