Skip to content

Commit b5a52f8

Browse files
anna-devKagemaru
authored andcommitted
Fix ErrorTracker method namings
1 parent 3bbdb80 commit b5a52f8

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

.reek.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
### Generic smell configuration
2-
32
---
43
# detectors:
54
## You can disable smells completely
@@ -49,7 +48,6 @@
4948
# - lib/rake/legacy_tasks
5049
# - lib/smelly.rb
5150

52-
5351
# FIXME: Fix these, piece by piece
5452

5553
# Auto generated by Reeks --todo flag
@@ -1955,21 +1953,17 @@ detectors:
19551953
- WorkloadReportController#default_period
19561954
- Apidocs::Setup#setup_property
19571955
- Apidocs::Setup#setup_tags
1958-
- Crm::Highrise#airbrake?
19591956
- Crm::Highrise#base_url
19601957
- Crm::Highrise#contact_attributes
19611958
- Crm::Highrise#existing_contact_crm_keys
19621959
- Crm::Highrise#find_people_by_email
19631960
- Crm::Highrise#record_to_params
1964-
- Crm::Highrise#sentry?
19651961
- Crm::Highrise#sync_additional_order
1966-
- Crm::Odoo#airbrake?
19671962
- Crm::Odoo#base_url
19681963
- Crm::Odoo#contact_attributes
19691964
- Crm::Odoo#existing_contact_crm_keys
19701965
- Crm::Odoo#find_people_by_email
19711966
- Crm::Odoo#record_to_params
1972-
- Crm::Odoo#sentry?
19731967
- Crm::Odoo#sync_additional_order
19741968
- Evaluations::AbsencesEval#divisions
19751969
- Evaluations::ClientsEval#divisions
@@ -2094,8 +2088,6 @@ detectors:
20942088
- WorktimeHelper#week_number
20952089
- WorktimeHelper#worktime_account
20962090
- WorktimeHelper#worktime_description
2097-
- ApplicationJob#airbrake?
2098-
- ApplicationJob#sentry?
20992091
- CommitReminderJob#perform
21002092
- CrmSyncJob#perform
21012093
- InvoicingSyncJob#perform

app/controllers/application_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def set_error_tracker_user_context
8585
ErrorTracker.set_user(
8686
id: current_user.try(:id),
8787
username: current_user.try(:shortname),
88-
email: current_user.email
88+
email: current_user.try(:email)
8989
)
9090
end
9191

app/domain/error_tracker.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@ def report_exception(error, payload)
1818

1919
def set_tags(**kwargs)
2020
Sentry.set_tags(**kwargs) if sentry_like?
21-
Airbrake.merge_context(tags: kwargs) if airbrake?
21+
Airbrake.merge_context(tags: kwargs) if airbrake_like?
2222
end
2323

2424
def set_extras(**kwargs)
2525
Sentry.set_extras(**kwargs) if sentry_like?
26-
Airbrake.merge_context(extra: kwargs) if airbrake?
26+
Airbrake.merge_context(extra: kwargs) if airbrake_like?
2727
end
2828

2929
def set_user(**kwargs)
3030
Sentry.set_user(**kwargs) if sentry_like?
31-
Airbrake.merge_context(user: kwargs) if airbrake?
31+
Airbrake.merge_context(user: kwargs) if airbrake_like?
3232
end
3333

3434
def set_contexts(**)
3535
Sentry.set_contexts(**) if sentry_like?
36-
Airbrake.merge_context(**) if airbrake?
36+
Airbrake.merge_context(**) if airbrake_like?
3737
end
3838

3939
def airbrake_like?

0 commit comments

Comments
 (0)