Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow symbols in breadcrumb meta data #563

Merged
merged 2 commits into from
Aug 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ Changelog
| [#545](https://github.com/bugsnag/bugsnag-ruby/issues/545)
| [#548](https://github.com/bugsnag/bugsnag-ruby/pull/548)

* Allow symbols in breadcrumb meta data.
| [#563](https://github.com/bugsnag/bugsnag-ruby/pull/563)

## 6.11.1 (22 Jan 2019)

### Fixes
Expand Down
4 changes: 2 additions & 2 deletions lib/bugsnag/breadcrumbs/validator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ def validate(breadcrumb)
##
# Tests whether the meta_data types are non-complex objects.
#
# Acceptable types are String, Numeric, TrueClass, FalseClass, and nil.
# Acceptable types are String, Symbol, Numeric, TrueClass, FalseClass, and nil.
#
# @param value [Object] the object to be type checked
def valid_meta_data_type?(value)
value.nil? || value.is_a?(String) || value.is_a?(Numeric) || value.is_a?(FalseClass) || value.is_a?(TrueClass)
value.nil? || value.is_a?(String) || value.is_a?(Symbol) || value.is_a?(Numeric) || value.is_a?(FalseClass) || value.is_a?(TrueClass)
end
end
end
1 change: 1 addition & 0 deletions spec/breadcrumbs/validator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@

meta_data = {
:string => "This is a string",
:symbol => :this_is_a_symbol,
:integer => 12345,
:float => 12345.6789,
:false => false,
Expand Down