barsoom_utils 0.1.1.28 → 0.1.1.31

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: f86d1635cdbe751df9c279346441343ab4aab8d8d3227e5105446b7844b3a30c
4
- data.tar.gz: fd9070dfc84003acb37915d1373e60d8bdbe4a83b39a7ef89fc0338b78ddb527
3
+ metadata.gz: 2cedafc13a806b851f023c4e4594ec8c8631d6505224a11fc27a192764427f24
4
+ data.tar.gz: af94f6b69f5c0c370c82ee7cbdfbd8a52300d15bcb98319c98dff396f5c2bfb2
5
5
  SHA512:
6
- metadata.gz: a99dadb402b3cc8270fff828a8a9546f9275b604bf94f94f348e6c1b461b8209f5d94a842a6ba6ac6309600d9b04389c8825dc61bc6b5f9ee4d05d94e9acaaea
7
- data.tar.gz: 43e85540441149b0a6b93cab5ad09e9c1fcf62f83f5408b8f12f200d72ac9b7bb5b80fd6328be5e1b26ef5c5c63707fa3041dd8eba400b8215b30caaba8002b1
6
+ metadata.gz: 5dce98fb0c47017e00b2ccbd69ba8a30ae5782599e1d193103d7d1928d85949a0df07edac4086408fc2a7b593856a7fc972e3977891d7166c88e30c73011762a
7
+ data.tar.gz: 8c471ee022cc8606eb543fb61ebdc200deed1684142da006c5f658b337723a0de83bb1fb3f7c7731075ca1aa8c651651757b81842869662b3749f25a9aae1fb5
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1.28
1
+ 0.1.1.31
@@ -27,7 +27,7 @@ module BarsoomUtils
27
27
  private
28
28
 
29
29
  def ping_healthcheck
30
- HTTParty.get("https://hchk.io/#{id}")
30
+ HTTParty.get("https://hc-ping.com/#{id}")
31
31
  end
32
32
  end
33
33
  end
data/shared_rubocop.yml CHANGED
@@ -31,10 +31,19 @@ Layout/DotPosition:
31
31
  EnforcedStyle: leading
32
32
 
33
33
  # Allow: def foo(...) = bar(...)
34
- # Disallow: def foo(*args, &) = bar(*args, &)
34
+ # Disallow: def foo(*args, &block) = bar(*args, &block)
35
35
  Style/ArgumentsForwarding:
36
36
  Enabled: true
37
37
 
38
+ # Allow e.g. `map` and disallow e.g. `collect`.
39
+ Style/CollectionMethods:
40
+ PreferredMethods:
41
+ collect: map
42
+ detect: find
43
+ filter: select
44
+ find_all: select
45
+ reduce: inject
46
+
38
47
  # Allow: "foo"
39
48
  # Disallow: 'foo'
40
49
  Style/StringLiterals:
@@ -9,27 +9,27 @@ RSpec.describe BarsoomUtils::PingHealthCheck, ".call" do
9
9
  end
10
10
 
11
11
  it "does nothing on a 200 OK response" do
12
- expect(HTTParty).to receive(:get).with("https://hchk.io/foo").and_return(double(:response, code: 200, headers: {}))
12
+ expect(HTTParty).to receive(:get).with("https://hc-ping.com/foo").and_return(double(:response, code: 200, headers: {}))
13
13
 
14
14
  BarsoomUtils::PingHealthCheck.call("foo")
15
15
  end
16
16
 
17
17
  it "includes CloudFlare request ID header information in failure message" do
18
- expect(HTTParty).to receive(:get).with("https://hchk.io/foo").and_return(double(:response, code: 503, headers: { "cf-request-id" => "023aa754ae0000517ab8829200000001" }))
18
+ expect(HTTParty).to receive(:get).with("https://hc-ping.com/foo").and_return(double(:response, code: 503, headers: { "cf-request-id" => "023aa754ae0000517ab8829200000001" }))
19
19
  expect(BarsoomUtils::ExceptionNotifier).to receive(:message).with(anything, /cf-request-id header: 023aa754ae0000517ab8829200000001/)
20
20
 
21
21
  BarsoomUtils::PingHealthCheck.call("foo")
22
22
  end
23
23
 
24
24
  it "silently reports an error to devs if it fails with a bad response code" do
25
- expect(HTTParty).to receive(:get).with("https://hchk.io/foo").and_return(double(:response, code: 404, headers: {}))
25
+ expect(HTTParty).to receive(:get).with("https://hc-ping.com/foo").and_return(double(:response, code: 404, headers: {}))
26
26
  expect(BarsoomUtils::ExceptionNotifier).to receive(:message).with(anything, /foo/)
27
27
 
28
28
  BarsoomUtils::PingHealthCheck.call("foo")
29
29
  end
30
30
 
31
31
  it "silently reports an error to devs if it fails with an exception" do
32
- expect(HTTParty).to receive(:get).with("https://hchk.io/foo").and_raise("fail")
32
+ expect(HTTParty).to receive(:get).with("https://hc-ping.com/foo").and_raise("fail")
33
33
  expect(BarsoomUtils::ExceptionNotifier).to receive(:message).with(anything, /foo/)
34
34
 
35
35
  BarsoomUtils::PingHealthCheck.call("foo")
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.28
4
+ version: 0.1.1.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Skogberg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-11 00:00:00.000000000 Z
11
+ date: 2022-08-24 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: