brainzlab 0.1.2 → 0.1.3

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.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +6 -21
  3. data/README.md +16 -2
  4. data/lib/brainzlab/beacon/client.rb +38 -40
  5. data/lib/brainzlab/beacon/provisioner.rb +1 -1
  6. data/lib/brainzlab/beacon.rb +15 -15
  7. data/lib/brainzlab/configuration.rb +92 -90
  8. data/lib/brainzlab/context.rb +2 -3
  9. data/lib/brainzlab/cortex/client.rb +29 -31
  10. data/lib/brainzlab/cortex/provisioner.rb +1 -1
  11. data/lib/brainzlab/cortex.rb +7 -11
  12. data/lib/brainzlab/dendrite/client.rb +42 -44
  13. data/lib/brainzlab/dendrite/provisioner.rb +1 -1
  14. data/lib/brainzlab/dendrite.rb +4 -4
  15. data/lib/brainzlab/devtools/data/collector.rb +22 -22
  16. data/lib/brainzlab/devtools/middleware/asset_server.rb +14 -14
  17. data/lib/brainzlab/devtools/middleware/database_handler.rb +52 -55
  18. data/lib/brainzlab/devtools/middleware/debug_panel.rb +19 -19
  19. data/lib/brainzlab/devtools/middleware/error_page.rb +45 -44
  20. data/lib/brainzlab/devtools/renderers/debug_panel_renderer.rb +39 -35
  21. data/lib/brainzlab/devtools/renderers/error_page_renderer.rb +13 -9
  22. data/lib/brainzlab/devtools.rb +11 -11
  23. data/lib/brainzlab/flux/buffer.rb +3 -3
  24. data/lib/brainzlab/flux/client.rb +14 -16
  25. data/lib/brainzlab/flux/provisioner.rb +13 -13
  26. data/lib/brainzlab/flux.rb +8 -8
  27. data/lib/brainzlab/instrumentation/action_mailer.rb +14 -13
  28. data/lib/brainzlab/instrumentation/active_record.rb +13 -15
  29. data/lib/brainzlab/instrumentation/aws.rb +43 -39
  30. data/lib/brainzlab/instrumentation/dalli.rb +20 -20
  31. data/lib/brainzlab/instrumentation/delayed_job.rb +27 -29
  32. data/lib/brainzlab/instrumentation/elasticsearch.rb +23 -24
  33. data/lib/brainzlab/instrumentation/excon.rb +27 -27
  34. data/lib/brainzlab/instrumentation/faraday.rb +3 -4
  35. data/lib/brainzlab/instrumentation/good_job.rb +28 -28
  36. data/lib/brainzlab/instrumentation/grape.rb +24 -24
  37. data/lib/brainzlab/instrumentation/graphql.rb +24 -23
  38. data/lib/brainzlab/instrumentation/httparty.rb +13 -14
  39. data/lib/brainzlab/instrumentation/mongodb.rb +7 -7
  40. data/lib/brainzlab/instrumentation/net_http.rb +6 -6
  41. data/lib/brainzlab/instrumentation/redis.rb +14 -21
  42. data/lib/brainzlab/instrumentation/resque.rb +23 -24
  43. data/lib/brainzlab/instrumentation/sidekiq.rb +29 -28
  44. data/lib/brainzlab/instrumentation/solid_queue.rb +37 -41
  45. data/lib/brainzlab/instrumentation/stripe.rb +36 -37
  46. data/lib/brainzlab/instrumentation/typhoeus.rb +19 -17
  47. data/lib/brainzlab/instrumentation.rb +20 -20
  48. data/lib/brainzlab/nerve/client.rb +38 -40
  49. data/lib/brainzlab/nerve/provisioner.rb +1 -1
  50. data/lib/brainzlab/nerve.rb +6 -6
  51. data/lib/brainzlab/pulse/client.rb +15 -11
  52. data/lib/brainzlab/pulse/instrumentation.rb +61 -57
  53. data/lib/brainzlab/pulse/propagation.rb +28 -28
  54. data/lib/brainzlab/pulse/provisioner.rb +12 -12
  55. data/lib/brainzlab/pulse/tracer.rb +3 -3
  56. data/lib/brainzlab/pulse.rb +13 -13
  57. data/lib/brainzlab/rails/log_formatter.rb +127 -121
  58. data/lib/brainzlab/rails/log_subscriber.rb +70 -76
  59. data/lib/brainzlab/rails/railtie.rb +66 -89
  60. data/lib/brainzlab/recall/buffer.rb +1 -1
  61. data/lib/brainzlab/recall/client.rb +14 -10
  62. data/lib/brainzlab/recall/logger.rb +16 -18
  63. data/lib/brainzlab/recall/provisioner.rb +16 -16
  64. data/lib/brainzlab/recall.rb +11 -13
  65. data/lib/brainzlab/reflex/breadcrumbs.rb +2 -2
  66. data/lib/brainzlab/reflex/client.rb +14 -10
  67. data/lib/brainzlab/reflex/provisioner.rb +12 -12
  68. data/lib/brainzlab/reflex.rb +29 -29
  69. data/lib/brainzlab/sentinel/client.rb +40 -42
  70. data/lib/brainzlab/sentinel/provisioner.rb +1 -1
  71. data/lib/brainzlab/sentinel.rb +5 -5
  72. data/lib/brainzlab/signal/client.rb +12 -14
  73. data/lib/brainzlab/signal/provisioner.rb +12 -12
  74. data/lib/brainzlab/signal.rb +7 -7
  75. data/lib/brainzlab/synapse/client.rb +42 -44
  76. data/lib/brainzlab/synapse/provisioner.rb +1 -1
  77. data/lib/brainzlab/synapse.rb +6 -6
  78. data/lib/brainzlab/utilities/circuit_breaker.rb +37 -41
  79. data/lib/brainzlab/utilities/health_check.rb +53 -55
  80. data/lib/brainzlab/utilities/log_formatter.rb +38 -40
  81. data/lib/brainzlab/utilities/rate_limiter.rb +5 -5
  82. data/lib/brainzlab/utilities.rb +4 -4
  83. data/lib/brainzlab/vault/cache.rb +1 -1
  84. data/lib/brainzlab/vault/client.rb +39 -41
  85. data/lib/brainzlab/vault/provisioner.rb +1 -1
  86. data/lib/brainzlab/vault.rb +19 -25
  87. data/lib/brainzlab/version.rb +1 -1
  88. data/lib/brainzlab/vision/client.rb +20 -20
  89. data/lib/brainzlab/vision/provisioner.rb +21 -21
  90. data/lib/brainzlab/vision.rb +17 -19
  91. data/lib/brainzlab-sdk.rb +1 -1
  92. data/lib/brainzlab.rb +22 -24
  93. data/lib/generators/brainzlab/install/install_generator.rb +29 -27
  94. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 243321421ac058cfe6ae6c11dc69c2c5d527ff6b3a3ee2095da72953b1f343d8
4
- data.tar.gz: d1a93e801d19c363305114e3d9a25f441a4983dbc8ef478dca4ed104821a8450
3
+ metadata.gz: a2ccfb8ed0a1aefc1a67e709438812194e6a6a1ce79f7044824ab3f2accd3aca
4
+ data.tar.gz: 99df1dbd2842a09ab90165755746a8248c5b103854dcddd8c28c1f8ee7e239f9
5
5
  SHA512:
6
- metadata.gz: 2b2a91631a4595d11d106bcb44c0fb7341a43b79f481566ffaf8879458f976a98e5cd3a1d99556f7533bb32d18a9d8c9046bcbb1fddd1b62b3100ea08afb3ce5
7
- data.tar.gz: 285c523bc3e26fa846783e853d1878211999ed6d9b0fcdc4cd8a177272dffe71f7a303544bf371fda71c7ecfffb0681abc6388049f740c11c72d7a79559bfb35
6
+ metadata.gz: 49a8f8a4be96f4f917fef27661caa12bde990cfa88dcc19d8917c4c74c4446b63cff26ad52ee524c577d8c9bc3f6767315245e1dace168a46422858f43af2620
7
+ data.tar.gz: d64004b9afc21429742c61deebbfd5cfe244b83ff477bb4c4809d9fd156917652e150f0236aca3abba6d42df53a231fd6deb54c57b7914f1267d40cc4d1f9a75
data/LICENSE CHANGED
@@ -1,26 +1,11 @@
1
- Ossassy License
1
+ OSAaSy License
2
2
 
3
- Copyright (c) 2025, Brainz Lab
3
+ Copyright © 2025, Brainz Lab.
4
4
 
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of
6
- this software and associated documentation files (the "Software"), to deal in
7
- the Software without restriction, including without limitation the rights to
8
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9
- of the Software, and to permit persons to whom the Software is furnished to do
10
- so, subject to the following conditions:
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
11
6
 
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
14
8
 
15
- No licensee or downstream recipient may use the Software (including any modified
16
- or derivative versions) to directly compete with the original Licensor by
17
- offering it to third parties as a hosted, managed, or Software-as-a-Service
18
- (SaaS) product or cloud service where the primary value of the service is the
19
- functionality of the Software itself.
9
+ No licensee or downstream recipient may use the Software (including any modified or derivative versions) to directly compete with the original Licensor by offering it to third parties as a hosted, managed, or Software-as-a-Service (SaaS) product or cloud service where the primary value of the service is the functionality of the Software itself.
20
10
 
21
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
23
- FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
24
- COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
25
- IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
26
- CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -2,8 +2,10 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/brainzlab.svg)](https://rubygems.org/gems/brainzlab)
4
4
  [![CI](https://github.com/brainz-lab/brainzlab-ruby/actions/workflows/ci.yml/badge.svg)](https://github.com/brainz-lab/brainzlab-ruby/actions/workflows/ci.yml)
5
+ [![CodeQL](https://github.com/brainz-lab/brainzlab-ruby/actions/workflows/codeql.yml/badge.svg)](https://github.com/brainz-lab/brainzlab-ruby/actions/workflows/codeql.yml)
6
+ [![codecov](https://codecov.io/gh/brainz-lab/brainzlab-ruby/graph/badge.svg)](https://codecov.io/gh/brainz-lab/brainzlab-ruby)
5
7
  [![Docs](https://img.shields.io/badge/docs-brainzlab.ai-orange)](https://docs.brainzlab.ai/sdk/ruby/installation)
6
- [![License](https://img.shields.io/badge/license-Ossassy-blue.svg)](LICENSE)
8
+ [![License: OSAaSy](https://img.shields.io/badge/License-OSAaSy-blue.svg)](LICENSE)
7
9
 
8
10
  Official Ruby SDK for [BrainzLab](https://brainzlab.ai) - the complete observability platform.
9
11
 
@@ -336,6 +338,18 @@ Full documentation: [docs.brainzlab.ai](https://docs.brainzlab.ai)
336
338
  - [Pulse](https://github.com/brainz-lab/pulse) - APM service
337
339
  - [Stack](https://github.com/brainz-lab/stack) - Self-hosted deployment
338
340
 
341
+ ## Contributors
342
+
343
+ <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
344
+ <!-- prettier-ignore-start -->
345
+ <!-- markdownlint-disable -->
346
+ <!-- markdownlint-restore -->
347
+ <!-- prettier-ignore-end -->
348
+ <!-- ALL-CONTRIBUTORS-LIST:END -->
349
+
350
+ Thanks to all our contributors! See [all-contributors](https://allcontributors.org) for how to add yourself.
351
+
352
+
339
353
  ## License
340
354
 
341
- Ossassy License - see [LICENSE](LICENSE) for details.
355
+ OSAaSy License - see [LICENSE](LICENSE) for details.
@@ -1,23 +1,23 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "net/http"
4
- require "json"
5
- require "uri"
6
- require "cgi"
3
+ require 'net/http'
4
+ require 'json'
5
+ require 'uri'
6
+ require 'cgi'
7
7
 
8
8
  module BrainzLab
9
9
  module Beacon
10
10
  class Client
11
11
  def initialize(config)
12
12
  @config = config
13
- @base_url = config.beacon_url || "https://beacon.brainzlab.ai"
13
+ @base_url = config.beacon_url || 'https://beacon.brainzlab.ai'
14
14
  end
15
15
 
16
16
  # Create a new monitor
17
- def create_monitor(name:, url:, type: "http", interval: 60, **options)
17
+ def create_monitor(name:, url:, type: 'http', interval: 60, **options)
18
18
  response = request(
19
19
  :post,
20
- "/api/v1/monitors",
20
+ '/api/v1/monitors',
21
21
  body: {
22
22
  name: name,
23
23
  url: url,
@@ -31,7 +31,7 @@ module BrainzLab
31
31
 
32
32
  JSON.parse(response.body, symbolize_names: true)
33
33
  rescue StandardError => e
34
- log_error("create_monitor", e)
34
+ log_error('create_monitor', e)
35
35
  nil
36
36
  end
37
37
 
@@ -43,20 +43,20 @@ module BrainzLab
43
43
 
44
44
  JSON.parse(response.body, symbolize_names: true)
45
45
  rescue StandardError => e
46
- log_error("get_monitor", e)
46
+ log_error('get_monitor', e)
47
47
  nil
48
48
  end
49
49
 
50
50
  # List all monitors
51
51
  def list_monitors
52
- response = request(:get, "/api/v1/monitors")
52
+ response = request(:get, '/api/v1/monitors')
53
53
 
54
54
  return [] unless response.is_a?(Net::HTTPSuccess)
55
55
 
56
56
  data = JSON.parse(response.body, symbolize_names: true)
57
57
  data[:monitors] || []
58
58
  rescue StandardError => e
59
- log_error("list_monitors", e)
59
+ log_error('list_monitors', e)
60
60
  []
61
61
  end
62
62
 
@@ -70,7 +70,7 @@ module BrainzLab
70
70
 
71
71
  response.is_a?(Net::HTTPSuccess)
72
72
  rescue StandardError => e
73
- log_error("update_monitor", e)
73
+ log_error('update_monitor', e)
74
74
  false
75
75
  end
76
76
 
@@ -79,7 +79,7 @@ module BrainzLab
79
79
  response = request(:delete, "/api/v1/monitors/#{id}")
80
80
  response.is_a?(Net::HTTPSuccess) || response.is_a?(Net::HTTPNoContent)
81
81
  rescue StandardError => e
82
- log_error("delete_monitor", e)
82
+ log_error('delete_monitor', e)
83
83
  false
84
84
  end
85
85
 
@@ -88,7 +88,7 @@ module BrainzLab
88
88
  response = request(:post, "/api/v1/monitors/#{id}/pause")
89
89
  response.is_a?(Net::HTTPSuccess)
90
90
  rescue StandardError => e
91
- log_error("pause_monitor", e)
91
+ log_error('pause_monitor', e)
92
92
  false
93
93
  end
94
94
 
@@ -97,7 +97,7 @@ module BrainzLab
97
97
  response = request(:post, "/api/v1/monitors/#{id}/resume")
98
98
  response.is_a?(Net::HTTPSuccess)
99
99
  rescue StandardError => e
100
- log_error("resume_monitor", e)
100
+ log_error('resume_monitor', e)
101
101
  false
102
102
  end
103
103
 
@@ -114,19 +114,19 @@ module BrainzLab
114
114
  data = JSON.parse(response.body, symbolize_names: true)
115
115
  data[:checks] || []
116
116
  rescue StandardError => e
117
- log_error("check_history", e)
117
+ log_error('check_history', e)
118
118
  []
119
119
  end
120
120
 
121
121
  # Get current status summary
122
122
  def status_summary
123
- response = request(:get, "/api/v1/status")
123
+ response = request(:get, '/api/v1/status')
124
124
 
125
125
  return nil unless response.is_a?(Net::HTTPSuccess)
126
126
 
127
127
  JSON.parse(response.body, symbolize_names: true)
128
128
  rescue StandardError => e
129
- log_error("status_summary", e)
129
+ log_error('status_summary', e)
130
130
  nil
131
131
  end
132
132
 
@@ -135,28 +135,28 @@ module BrainzLab
135
135
  params = {}
136
136
  params[:status] = status if status
137
137
 
138
- response = request(:get, "/api/v1/incidents", params: params)
138
+ response = request(:get, '/api/v1/incidents', params: params)
139
139
 
140
140
  return [] unless response.is_a?(Net::HTTPSuccess)
141
141
 
142
142
  data = JSON.parse(response.body, symbolize_names: true)
143
143
  data[:incidents] || []
144
144
  rescue StandardError => e
145
- log_error("list_incidents", e)
145
+ log_error('list_incidents', e)
146
146
  []
147
147
  end
148
148
 
149
149
  def provision(project_id:, app_name:)
150
150
  response = request(
151
151
  :post,
152
- "/api/v1/projects/provision",
152
+ '/api/v1/projects/provision',
153
153
  body: { project_id: project_id, app_name: app_name },
154
154
  use_service_key: true
155
155
  )
156
156
 
157
157
  response.is_a?(Net::HTTPSuccess) || response.is_a?(Net::HTTPCreated)
158
158
  rescue StandardError => e
159
- log_error("provision", e)
159
+ log_error('provision', e)
160
160
  false
161
161
  end
162
162
 
@@ -165,34 +165,32 @@ module BrainzLab
165
165
  def request(method, path, headers: {}, body: nil, params: nil, use_service_key: false)
166
166
  uri = URI.parse("#{@base_url}#{path}")
167
167
 
168
- if params
169
- uri.query = URI.encode_www_form(params)
170
- end
168
+ uri.query = URI.encode_www_form(params) if params
171
169
 
172
170
  http = Net::HTTP.new(uri.host, uri.port)
173
- http.use_ssl = uri.scheme == "https"
171
+ http.use_ssl = uri.scheme == 'https'
174
172
  http.open_timeout = 10
175
173
  http.read_timeout = 30
176
174
 
177
175
  request = case method
178
- when :get
179
- Net::HTTP::Get.new(uri)
180
- when :post
181
- Net::HTTP::Post.new(uri)
182
- when :put
183
- Net::HTTP::Put.new(uri)
184
- when :delete
185
- Net::HTTP::Delete.new(uri)
186
- end
187
-
188
- request["Content-Type"] = "application/json"
189
- request["Accept"] = "application/json"
176
+ when :get
177
+ Net::HTTP::Get.new(uri)
178
+ when :post
179
+ Net::HTTP::Post.new(uri)
180
+ when :put
181
+ Net::HTTP::Put.new(uri)
182
+ when :delete
183
+ Net::HTTP::Delete.new(uri)
184
+ end
185
+
186
+ request['Content-Type'] = 'application/json'
187
+ request['Accept'] = 'application/json'
190
188
 
191
189
  if use_service_key
192
- request["X-Service-Key"] = @config.beacon_master_key || @config.secret_key
190
+ request['X-Service-Key'] = @config.beacon_master_key || @config.secret_key
193
191
  else
194
192
  auth_key = @config.beacon_api_key || @config.secret_key
195
- request["Authorization"] = "Bearer #{auth_key}" if auth_key
193
+ request['Authorization'] = "Bearer #{auth_key}" if auth_key
196
194
  end
197
195
 
198
196
  headers.each { |k, v| request[k] = v }
@@ -37,7 +37,7 @@ module BrainzLab
37
37
  end
38
38
 
39
39
  def detect_project_id
40
- ENV["BRAINZLAB_PROJECT_ID"]
40
+ ENV.fetch('BRAINZLAB_PROJECT_ID', nil)
41
41
  end
42
42
  end
43
43
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "beacon/client"
4
- require_relative "beacon/provisioner"
3
+ require_relative 'beacon/client'
4
+ require_relative 'beacon/provisioner'
5
5
 
6
6
  module BrainzLab
7
7
  module Beacon
@@ -22,7 +22,7 @@ module BrainzLab
22
22
  # timeout: 5
23
23
  # )
24
24
  #
25
- def create_http_monitor(name, url, interval: 60, **options)
25
+ def create_http_monitor(name, url, interval: 60, **)
26
26
  return nil unless enabled?
27
27
 
28
28
  ensure_provisioned!
@@ -31,14 +31,14 @@ module BrainzLab
31
31
  client.create_monitor(
32
32
  name: name,
33
33
  url: url,
34
- type: "http",
34
+ type: 'http',
35
35
  interval: interval,
36
- **options
36
+ **
37
37
  )
38
38
  end
39
39
 
40
40
  # Create an SSL certificate monitor
41
- def create_ssl_monitor(name, domain, warn_days: 30, **options)
41
+ def create_ssl_monitor(name, domain, warn_days: 30, **)
42
42
  return nil unless enabled?
43
43
 
44
44
  ensure_provisioned!
@@ -47,14 +47,14 @@ module BrainzLab
47
47
  client.create_monitor(
48
48
  name: name,
49
49
  url: "https://#{domain}",
50
- type: "ssl",
50
+ type: 'ssl',
51
51
  ssl_warn_days: warn_days,
52
- **options
52
+ **
53
53
  )
54
54
  end
55
55
 
56
56
  # Create a TCP port monitor
57
- def create_tcp_monitor(name, host, port, **options)
57
+ def create_tcp_monitor(name, host, port, **)
58
58
  return nil unless enabled?
59
59
 
60
60
  ensure_provisioned!
@@ -63,13 +63,13 @@ module BrainzLab
63
63
  client.create_monitor(
64
64
  name: name,
65
65
  url: "#{host}:#{port}",
66
- type: "tcp",
67
- **options
66
+ type: 'tcp',
67
+ **
68
68
  )
69
69
  end
70
70
 
71
71
  # Create a DNS monitor
72
- def create_dns_monitor(name, domain, expected_record: nil, **options)
72
+ def create_dns_monitor(name, domain, expected_record: nil, **)
73
73
  return nil unless enabled?
74
74
 
75
75
  ensure_provisioned!
@@ -78,9 +78,9 @@ module BrainzLab
78
78
  client.create_monitor(
79
79
  name: name,
80
80
  url: domain,
81
- type: "dns",
81
+ type: 'dns',
82
82
  expected_record: expected_record,
83
- **options
83
+ **
84
84
  )
85
85
  end
86
86
 
@@ -169,7 +169,7 @@ module BrainzLab
169
169
  summary = status
170
170
  return false unless summary
171
171
 
172
- summary[:status] == "up" || summary[:status] == "operational"
172
+ %w[up operational].include?(summary[:status])
173
173
  end
174
174
 
175
175
  # List active incidents