barsoom_utils 0.1.1.13 → 0.1.1.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ea4dcbfedf1926d55c6e4ca6ccce8fe844247a533501ebe3586c371786b9b96a
4
- data.tar.gz: b9300e61d6c384b7a4cd391d5e6672771dc24ae686769b71804803c18bf8a2b0
3
+ metadata.gz: 6385dde2f2c79bacbff6edd5e2b754199960a31c79a5ea1c187664746ba1a206
4
+ data.tar.gz: 002b11593aab5d9a8903e6b92c35246e3fa640dcfa500d36676cb47cdbd5396c
5
5
  SHA512:
6
- metadata.gz: 3ab0a6633f5e25d326a8ba7bf7d997a9072106dc3a468fade844d8c3e2a266f587ec567610375a170c1935c0428e0ce6c63fc2c8ce97cc2acefdc54adc3b50f5
7
- data.tar.gz: 985822b6fa99b556efeeb801564090dbbe5d90a07b3d1a868d86f5072d8115b06490d677bb43b9ac6239e1756079b8d1c12e356f74709998a4bc5d58c7680ebe
6
+ metadata.gz: eac4e598b06957dfe3d37fe4fd8fda8e0e930964cf313d84b2ef8f9f0c64441dd89d283b0008d05009118ce41b0af1fe61ada9bc47953c5f8aa1d366a10a231b
7
+ data.tar.gz: f118ca3df414c9ab90064b3de17907191fbfc734df2c7186e4cb9f5845cecccf7f362e6ae06572b72bf221cd07b3749fa5d1384d79866c223147b757d3d4de06
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1.13
1
+ 0.1.1.14
@@ -46,17 +46,5 @@ module BarsoomUtils
46
46
  Honeybadger.context.clear!
47
47
  Honeybadger.context(old_context)
48
48
  end
49
-
50
- # While developing a feature we'd like the feature developers to be responsible for any errors that occur.
51
- # Wrapping the new code with this tags the errors as "wip" in order to hide them from the dashboard.
52
- def self.developers_working_on_this_feature_are_responsible_for_errors_until(expire_on, &block)
53
- block.call
54
- rescue => ex
55
- FIXME "#{expire_on}: WIP error-handling code needs to be removed!"
56
- notify(ex, context: { tags: "wip" })
57
-
58
- is_rails_production = defined?(Rails) && Rails.env.production?
59
- raise unless is_rails_production
60
- end
61
49
  end
62
50
  end
@@ -95,62 +95,4 @@ RSpec.describe BarsoomUtils::ExceptionNotifier do
95
95
  expect(Honeybadger.get_context).to eq({ my_old_context: "hello" })
96
96
  end
97
97
  end
98
-
99
- describe ".developers_working_on_this_feature_are_responsible_for_errors_until" do
100
- before do
101
- # We need some value, and this value means we don't have to rescue exceptions in some tests.
102
- set_rails_production(true)
103
- end
104
-
105
- it "notifies Honeybadger with a 'wip' tag" do
106
- ex = StandardError.new
107
-
108
- BarsoomUtils::ExceptionNotifier.developers_working_on_this_feature_are_responsible_for_errors_until("9999-01-01") do
109
- raise ex
110
- end
111
-
112
- expect(Honeybadger).to have_received(:notify).with(ex, context: { tags: "wip" })
113
- end
114
-
115
- it "does not raise the error in production" do
116
- set_rails_production(true)
117
-
118
- ex = StandardError.new
119
-
120
- expect {
121
- BarsoomUtils::ExceptionNotifier.developers_working_on_this_feature_are_responsible_for_errors_until("9999-01-01") do
122
- raise ex
123
- end
124
- }.not_to raise_error
125
- end
126
-
127
- it "raises the error in non-production" do
128
- set_rails_production(false)
129
-
130
- ex = StandardError.new
131
-
132
- expect {
133
- BarsoomUtils::ExceptionNotifier.developers_working_on_this_feature_are_responsible_for_errors_until("9999-01-01") do
134
- raise ex
135
- end
136
- }.to raise_error(ex)
137
- end
138
-
139
- it "sets a FIXME raise" do
140
- set_rails_production(false)
141
-
142
- expect {
143
- BarsoomUtils::ExceptionNotifier.developers_working_on_this_feature_are_responsible_for_errors_until("1999-01-01") do
144
- raise "hola"
145
- end
146
- }.to raise_error(Fixme::UnfixedError, /Fix by 1999-01-01: WIP error-handling/)
147
- end
148
-
149
- private
150
-
151
- def set_rails_production(bool)
152
- string_env = bool ? "production" : "test"
153
- stub_const("Rails", double(:rails, env: double(:env, production?: bool, to_s: string_env)))
154
- end
155
- end
156
98
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: barsoom_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.13
4
+ version: 0.1.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Skogberg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-25 00:00:00.000000000 Z
11
+ date: 2022-01-12 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: