barsoom_utils 0.1.1.13 → 0.1.1.16

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ea4dcbfedf1926d55c6e4ca6ccce8fe844247a533501ebe3586c371786b9b96a
4
- data.tar.gz: b9300e61d6c384b7a4cd391d5e6672771dc24ae686769b71804803c18bf8a2b0
3
+ metadata.gz: 171c801d7728e06af6aa9501349ea50ead665a4a5e5a5c70b725a574789a857e
4
+ data.tar.gz: 8949fa3f2f2bbe431f74de71b8c491ae4a157a4b4bbbd64c5d0b3b403c48de4c
5
5
  SHA512:
6
- metadata.gz: 3ab0a6633f5e25d326a8ba7bf7d997a9072106dc3a468fade844d8c3e2a266f587ec567610375a170c1935c0428e0ce6c63fc2c8ce97cc2acefdc54adc3b50f5
7
- data.tar.gz: 985822b6fa99b556efeeb801564090dbbe5d90a07b3d1a868d86f5072d8115b06490d677bb43b9ac6239e1756079b8d1c12e356f74709998a4bc5d58c7680ebe
6
+ metadata.gz: c20db3c5fad7bde0d44ae0c9058b065dcbe24d19a1df6c3915bee468c869bd3141b632d75a5ad7136c016474a49b57e85b1c81a7f266619fc84017a48e046d0c
7
+ data.tar.gz: ce181f246a449f86c01077ba38b347b85e46db8931ce7477630407beaf9bd31de7f8c0b62bf3403a88d45ea80f709747498565553dfb3979dcd2342c55e49bc2
@@ -14,6 +14,7 @@ jobs:
14
14
  strategy:
15
15
  matrix:
16
16
  ruby-version:
17
+ - "3.1"
17
18
  - "3.0"
18
19
  - "2.7"
19
20
  - "2.6"
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1.13
1
+ 0.1.1.16
@@ -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
data/shared_rubocop.yml CHANGED
@@ -144,6 +144,12 @@ Layout/EmptyLineAfterGuardClause:
144
144
  Enabled: true
145
145
  StyleGuide: https://github.com/barsoom/devbook/tree/master/styleguide#put-a-blank-line-below-guard-statements
146
146
 
147
+ Layout/ExtraSpacing:
148
+ Enabled: true
149
+ AllowForAlignment: true
150
+ AllowBeforeTrailingComments: true # Henrik likes this
151
+ ForceEqualSignAlignment: false
152
+
147
153
  # Allow:
148
154
  #
149
155
  # Date.new(2019, 1, 2)
@@ -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.16
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-02-24 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: