barsoom_utils 0.2.0.63 → 0.2.0.65
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 +4 -4
- data/.gitignore +2 -6
- data/VERSION +1 -1
- data/lib/barsoom_utils/exception_notifier.rb +0 -5
- data/shared_rubocop.yml +1 -1
- data/spec/exception_notifier_spec.rb +0 -22
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f85cdf8a1dce5c728cf624248b7a98af640dd2c1fb331bb3a3bb99b5e9b80a2c
|
|
4
|
+
data.tar.gz: 91204dcd93f3458155f0e5b4e6d93875656601f965eb21f8602641ba87874d99
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fd327952fc415218f8346b1a098a0cdb6406cd828876a7f62d993ed7121046f6fb05471ebf0c077052c5d30faac2357c1488ccfc7585115a088decf512c59860
|
|
7
|
+
data.tar.gz: 749e5a3e143553728f50934a73559cfbcb1fa03390d9e168e71ded9ba100e1f39740af8c95b361805e4d9a82a3e8786f41cb2f6f21e8946991d0f151d9247a7b
|
data/.gitignore
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
|
2
|
-
#
|
|
3
|
-
# If you find yourself ignoring temporary files generated by your text editor
|
|
4
|
-
# or operating system, you probably want to add a global ignore instead:
|
|
5
|
-
# git config --global core.excludesfile '~/.gitignore_global'
|
|
6
|
-
|
|
7
1
|
# Ignore bundler config.
|
|
8
2
|
/.bundle
|
|
9
3
|
|
|
@@ -12,3 +6,5 @@
|
|
|
12
6
|
|
|
13
7
|
Gemfile.lock
|
|
14
8
|
*.gem
|
|
9
|
+
|
|
10
|
+
.claude
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.2.0.
|
|
1
|
+
0.2.0.65
|
data/shared_rubocop.yml
CHANGED
|
@@ -231,7 +231,7 @@ Style/MethodCallWithoutArgsParentheses:
|
|
|
231
231
|
# https://docs.rubocop.org/rubocop/cops_style.html#enforcedstyleformultiline-comma
|
|
232
232
|
Style/TrailingCommaInArguments:
|
|
233
233
|
Enabled: true
|
|
234
|
-
EnforcedStyleForMultiline:
|
|
234
|
+
EnforcedStyleForMultiline: diff_comma
|
|
235
235
|
|
|
236
236
|
# https://docs.rubocop.org/rubocop/cops_style.html#stylereturnnilinpredicatemethoddefinition
|
|
237
237
|
Style/ReturnNilInPredicateMethodDefinition:
|
|
@@ -73,26 +73,4 @@ RSpec.describe BarsoomUtils::ExceptionNotifier do
|
|
|
73
73
|
)
|
|
74
74
|
end
|
|
75
75
|
end
|
|
76
|
-
|
|
77
|
-
describe ".run_with_context" do
|
|
78
|
-
it "updates the context just within the block" do
|
|
79
|
-
allow(Honeybadger).to receive(:context).and_call_original
|
|
80
|
-
Honeybadger.context({ my_old_context: "hello" })
|
|
81
|
-
|
|
82
|
-
context_in_block = nil
|
|
83
|
-
|
|
84
|
-
expect {
|
|
85
|
-
BarsoomUtils::ExceptionNotifier.run_with_context({ my_new_context: "what up" }) do
|
|
86
|
-
context_in_block = Honeybadger.get_context
|
|
87
|
-
raise "boom"
|
|
88
|
-
end
|
|
89
|
-
}.to raise_error /boom/
|
|
90
|
-
|
|
91
|
-
# Adds the new context while running the code.
|
|
92
|
-
expect(context_in_block).to eq({ my_old_context: "hello", my_new_context: "what up" })
|
|
93
|
-
|
|
94
|
-
# Resets the old context, without keeping the new.
|
|
95
|
-
expect(Honeybadger.get_context).to eq({ my_old_context: "hello" })
|
|
96
|
-
end
|
|
97
|
-
end
|
|
98
76
|
end
|