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

Replace [PROJECT/GEM_ROOT] with /PROJECT/GEM_ROOT #311

Merged
merged 3 commits into from
Mar 20, 2018
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ Airbrake Ruby Changelog

### master

* Changed format for `[GEM_ROOT]` & `[PROJECT_ROOT]` placeholders to
`/GEM_ROOT` & `/PROJECT_ROOT` respectively. This improves searching
capabilities in the Airbrake
dashboard. ([#311](https://github.com/airbrake/airbrake-ruby/pull/311))

### [v2.8.3][v2.8.3] (March 12, 2018)

* Fixed bug introduced in v2.8.2 in blacklist/whitelist filtering. All
Expand Down
2 changes: 1 addition & 1 deletion lib/airbrake-ruby/filters/gem_root_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Filters
class GemRootFilter
##
# @return [String]
GEM_ROOT_LABEL = '[GEM_ROOT]'.freeze
GEM_ROOT_LABEL = '/GEM_ROOT'.freeze

##
# @return [Integer]
Expand Down
2 changes: 1 addition & 1 deletion lib/airbrake-ruby/filters/root_directory_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Filters
class RootDirectoryFilter
##
# @return [String]
PROJECT_ROOT_LABEL = '[PROJECT_ROOT]'.freeze
PROJECT_ROOT_LABEL = '/PROJECT_ROOT'.freeze

##
# @return [Integer]
Expand Down
4 changes: 2 additions & 2 deletions spec/airbrake_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
# rubocop:disable Metrics/LineLength
expected_body = %r|
{"errors":\[{"type":"RuntimeError","message":"bingo","backtrace":\[
{"file":"\[PROJECT_ROOT\]/spec/airbrake_spec.rb","line":\d+,"function":"[\w/\s\(\)<>]+","code".+},
{"file":"\[GEM_ROOT\]/gems/rspec-core-.+/.+","line":\d+,"function":"[\w/\s\(\)<>]+".+
{"file":"/PROJECT_ROOT/spec/airbrake_spec.rb","line":\d+,"function":"[\w/\s\(\)<>]+","code".+},
{"file":"/GEM_ROOT/gems/rspec-core-.+/.+","line":\d+,"function":"[\w/\s\(\)<>]+".+
|x
# rubocop:enable Metrics/LineLength

Expand Down
4 changes: 2 additions & 2 deletions spec/filters/gem_root_filter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
eq(
[
{ file: "/home/kyrylo/code/airbrake/ruby/spec/spec_helper.rb" },
{ file: "[GEM_ROOT]/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb" },
{ file: "/GEM_ROOT/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb" },
{ file: "/opt/rubies/ruby-2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb" },
{ file: "[GEM_ROOT]/gems/rspec-core-3.3.2/exe/rspec" }
{ file: "/GEM_ROOT/gems/rspec-core-3.3.2/exe/rspec" }
]
)
)
Expand Down
4 changes: 2 additions & 2 deletions spec/filters/root_directory_filter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
eq(
[
{ file: "/home/kyrylo/code/airbrake/ruby/spec/spec_helper.rb" },
{ file: "[PROJECT_ROOT]/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb " },
{ file: "/PROJECT_ROOT/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb " },
{ file: "/opt/rubies/ruby-2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb" },
{ file: "[PROJECT_ROOT]/gems/rspec-core-3.3.2/exe/rspec" }
{ file: "/PROJECT_ROOT/gems/rspec-core-3.3.2/exe/rspec" }
]
)
)
Expand Down
2 changes: 1 addition & 1 deletion spec/notifier_spec/options_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def expect_a_request_with_body(body)

expect(
a_request(:post, endpoint).
with(body: %r|{"file":"\[PROJECT_ROOT\]/airbrake/ruby/spec/airbrake_spec.+|)
with(body: %r|{"file":"/PROJECT_ROOT/airbrake/ruby/spec/airbrake_spec.+|)
).to have_been_made.once
end

Expand Down