strongmind-platform-sdk 3.2.0 → 3.3.0

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: 4d3e7692a1585b6660f3127296b51489fe91abe306d673149a089562d05e9637
4
- data.tar.gz: 7922d450c254e2dc3dece30d5440f8a56232039327400740198e4fb4d032e645
3
+ metadata.gz: cd9e8303f15c2836a1a11f1435449820b1146502186a032c170483d7a94b61ec
4
+ data.tar.gz: 871fbbb7866141a5e9e0d3923ba425589315781aeb5cbd75d9626985c8816165
5
5
  SHA512:
6
- metadata.gz: ea6585723a59c9f2731141f41bff045fc43ea18a61a7767e74cb75f3f317e4d800e4088669ebe43d4da7f7707234b8543f7764883187415a1bc59a27ff4db124
7
- data.tar.gz: ebabea43dba9197fa0ef7cfec80fa894a004458f25a10b2a41de6ae7234511ec6cc321cb3a67daa42f85286bf9614ff80580abd7a189732ea2af7260287b452e
6
+ metadata.gz: aac52f03c57ebcfcab562a8e1530582387ddd0752db515b498ec96fd9de7a18f55130eeaeaf74451d82ed3c03f2a551cf03a8245490a8dfa7f157a18db83aab8
7
+ data.tar.gz: b5799b0a7106a750261f359ab1d0d41c93e733b1abaf0cf9349e89a2727ed44ba3278791bdfe0bce2d9b324bd4bff0e52f3b547c2bb9ad64ff39da4a6413491c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- strongmind-platform-sdk (3.2.0)
4
+ strongmind-platform-sdk (3.3.0)
5
5
  aws-sdk-secretsmanager (~> 1.66)
6
6
  devise
7
7
  faraday (~> 2.5, >= 2.5.2)
@@ -116,10 +116,6 @@ GEM
116
116
  nokogiri (1.15.4)
117
117
  mini_portile2 (~> 2.8.2)
118
118
  racc (~> 1.4)
119
- nokogiri (1.15.4-x86_64-darwin)
120
- racc (~> 1.4)
121
- nokogiri (1.15.4-x86_64-linux)
122
- racc (~> 1.4)
123
119
  omniauth (2.1.1)
124
120
  hashie (>= 3.4.6)
125
121
  rack (>= 2.2.3)
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PlatformSdk
4
+ module OpsGenie
5
+ # Client for OpsGenie API
6
+ class Client
7
+ attr_reader :connection
8
+
9
+ OPSGENIE_API_URL = "https://api.opsgenie.com"
10
+
11
+ def initialize(opsgenie_secret, conn = nil)
12
+ raise ArgumentError, "opsgenie_secret cannot be nil" unless opsgenie_secret
13
+
14
+ @connection = conn || build_connection(opsgenie_secret)
15
+ end
16
+
17
+ def heartbeat(heartbeat_name)
18
+ connection.get("v2/heartbeats/#{heartbeat_name}/ping")
19
+ end
20
+
21
+ private
22
+
23
+ def build_connection(secret)
24
+ Faraday.new(url: OPSGENIE_API_URL) do |conn|
25
+ conn.request :url_encoded
26
+ conn.request :retry
27
+ conn.response :raise_error
28
+ conn.adapter Faraday.default_adapter
29
+ conn.headers[:Authorization] = "GenieKey #{secret}"
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "platform_sdk/ops_genie/client"
4
+
5
+ module OpsGenie
6
+ class Error < StandardError; end
7
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PlatformSdk
4
- VERSION = "3.2.0"
4
+ VERSION = "3.3.0"
5
5
  end
@@ -0,0 +1,13 @@
1
+ module PlatformSdk::OpsGenie
2
+ class Client
3
+ OPSGENIE_API_URL: String
4
+
5
+ attr_reader connection: Object
6
+
7
+ def initialize: (String, ?String) -> Object
8
+
9
+ def heartbeat: (String) -> Object
10
+
11
+ def build_connection: (String) -> Object
12
+ end
13
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: strongmind-platform-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Platform Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-10-29 00:00:00.000000000 Z
11
+ date: 2023-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -199,6 +199,8 @@ files:
199
199
  - lib/platform_sdk/identity/clients.rb
200
200
  - lib/platform_sdk/one_roster.rb
201
201
  - lib/platform_sdk/one_roster/client.rb
202
+ - lib/platform_sdk/ops_genie.rb
203
+ - lib/platform_sdk/ops_genie/client.rb
202
204
  - lib/platform_sdk/pencil_spaces.rb
203
205
  - lib/platform_sdk/pencil_spaces/client.rb
204
206
  - lib/platform_sdk/pencil_spaces/constants.rb
@@ -209,6 +211,7 @@ files:
209
211
  - lib/platform_sdk/power_school/special_program.rb
210
212
  - lib/platform_sdk/version.rb
211
213
  - sig/platform_sdk/identity/auth_client.rbs
214
+ - sig/platform_sdk/ops_genie/client.rbs
212
215
  - sig/platform_sdk/platform_sdk.rbs
213
216
  homepage: https://github.com/StrongMind/platform-ruby-sdk
214
217
  licenses: