barsoom_utils 0.1.1.12 → 0.1.1.15

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: 06661d90aabfad2741f578be3b2d0bdf64fdde9d98680c2bf00e3e8b154a727d
4
- data.tar.gz: 62df2ff3b97738bad991faf5dcf128a948e1e9c865d0037f9b84bcf57c221254
3
+ metadata.gz: 2b8e51fb775e6f3cec868f3a781b516ca4dffb8f022555e143b705d049cf1118
4
+ data.tar.gz: 46b1b0a2f83881dc4d65538829d4deffb3d2a23fb4d8d13ba64bb5d1ea1077b0
5
5
  SHA512:
6
- metadata.gz: 0fba4092dcd42eac6e73a84ebf8454239468356e32931e39b6fc9f048f28192e4eb8aaeb4724a6dcfb840d2f2402d8a73bee00a03f0b59391106a4a3580241a0
7
- data.tar.gz: 84f2c61c5c7766c42976bab83d81ec8a67c275b33a7e19d7f01ff76876db6d5e3f110488924a2de7fe0bf4d87170186a91c820b0b59b5cdfb956e41391149f9f
6
+ metadata.gz: 7429ecf447e05f2bce208cff38790cb2fc88bfb47182a14227c5b03cac74a75610edde7f4b44070d6ad4574eaf93348178f0b388abfba385729852d35234241d
7
+ data.tar.gz: a1adab087236e3fe32dafdf6ba30abfff1ace663f79813af9496fa281fb6ef7c7c966edcec09848d3af45519651a4d3170e8e999eae847d3d75e2a08882eb6c7
data/README.md CHANGED
@@ -9,7 +9,7 @@ It's only intended for internal use, but it's public in case others find parts o
9
9
  Add this line to your application's Gemfile:
10
10
 
11
11
  ```ruby
12
- gem "barsoom_utils", github: "barsoom/barsoom_utils"
12
+ gem "barsoom_utils"
13
13
  ```
14
14
 
15
15
  And then execute:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1.12
1
+ 0.1.1.15
@@ -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.12
4
+ version: 0.1.1.15
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: