strongmind-platform-sdk 3.22.1 → 3.23.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: 9e26622af2ec26d4e97d517f053cdc8a077eaa80bc3e2c4c91143d4a0f871fe2
4
- data.tar.gz: 9ca6bcac51beb3ec94dedbe8518e46a381883a134f924249efa9668bcc35509a
3
+ metadata.gz: 31ae84204c95f4c12d64af4a72308f1eeec1b82b0bd0bc357d2348b78a735c1d
4
+ data.tar.gz: bdabdf9ba87b161af728b238d7b0c5e09da4bb81e79e7867920eaba897d58754
5
5
  SHA512:
6
- metadata.gz: 34454fe1d43263ce569451d399ac6b29351cb95c743343275a08a65f06fee688a6542d36b8c0c156dff59f56003692e7a20c55177b7c43bfa38604b578955c7e
7
- data.tar.gz: 343f741b4485492ba1d103d19d681ed5bb18f8f248c6ef0f57534f840077e60a2a5a60c4a4c8192f35def49061c62b0d07c0329d0ec0e16a4b79701768e528b6
6
+ metadata.gz: a7d5ae9c61b6d4e076f3a6840f8daca9addfd94f661e5c463b46eb5da1bb881ca6e0289a31ff6b006661a0b40994c001b0cca19a463a6b7aa2398bed19b4b18b
7
+ data.tar.gz: f62b15426ff2f016cce3537b12d9869db6b96b5015d6047bd85cf020d0bc605d1ee057f05ac7665dc3810f7ff11db5adf8c044fe3d19efffdef53d5da5068c6a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- strongmind-platform-sdk (3.22.0)
4
+ strongmind-platform-sdk (3.23.0)
5
5
  asset_sync
6
6
  aws-sdk-cloudwatch
7
7
  aws-sdk-secretsmanager (~> 1.66)
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PlatformSdk
4
+ module Jira
5
+ class ServiceManagementClient
6
+ attr_accessor :conn, :cloud_id, :team_id
7
+
8
+ def initialize(auth_email, auth_api_token, cloud_id, team_id, conn = nil)
9
+ raise ArgumentError, 'auth_email cannot be nil' unless auth_email
10
+ raise ArgumentError, 'auth_api_token cannot be nil' unless auth_api_token
11
+ raise ArgumentError, 'cloud_id cannot be nil' unless cloud_id
12
+ raise ArgumentError, 'team_id cannot be nil' unless team_id
13
+
14
+ @conn = conn || build_connection(auth_email, auth_api_token)
15
+ @cloud_id = cloud_id
16
+ @team_id = team_id
17
+ end
18
+
19
+ def build_connection(auth_email, auth_api_token)
20
+ Faraday.new(url: 'https://api.atlassian.com/jsm/ops/api') do |conn|
21
+ conn.request(:authorization, :basic, auth_email, auth_api_token)
22
+ conn.request :url_encoded
23
+ conn.request :retry
24
+ conn.response :raise_error
25
+ conn.adapter :net_http
26
+ conn.headers = headers
27
+ end
28
+ end
29
+
30
+ def headers
31
+ { 'Content-Type': 'application/json' }
32
+ end
33
+
34
+ def send_heartbeat(heartbeat_name)
35
+ @conn.get("#{cloud_id}/v1/teams/#{team_id}/heartbeats/ping?name=#{heartbeat_name}")
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "platform_sdk/jira/service_management_client"
4
+
5
+ module PlatformSdk
6
+ module Jira
7
+ class Error < StandardError; end
8
+ end
9
+ end
@@ -2,8 +2,8 @@
2
2
 
3
3
  module PlatformSdk
4
4
  MAJOR = 3
5
- MINOR = 22
6
- PATCH = 1
5
+ MINOR = 23
6
+ PATCH = 0
7
7
 
8
8
  VERSION = "#{PlatformSdk::MAJOR}.#{PlatformSdk::MINOR}.#{PlatformSdk::PATCH}"
9
9
  end
data/lib/platform_sdk.rb CHANGED
@@ -24,6 +24,7 @@ require "platform_sdk/asset_sync_initializer"
24
24
  require "platform_sdk/sidekiq/ecs_task_protection_middleware"
25
25
  require "platform_sdk/sidekiq"
26
26
  require "platform_sdk/jobs/send_noun_to_pipeline_job"
27
+ require "platform_sdk/jira"
27
28
 
28
29
  module PlatformSdk
29
30
  class Error < StandardError; 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.22.1
4
+ version: 3.23.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: 2024-11-27 00:00:00.000000000 Z
11
+ date: 2024-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -274,6 +274,8 @@ files:
274
274
  - lib/platform_sdk/id_mapper/models/partner.rb
275
275
  - lib/platform_sdk/identity.rb
276
276
  - lib/platform_sdk/identity/clients.rb
277
+ - lib/platform_sdk/jira.rb
278
+ - lib/platform_sdk/jira/service_management_client.rb
277
279
  - lib/platform_sdk/jobs/send_noun_to_pipeline_job.rb
278
280
  - lib/platform_sdk/learnosity_api.rb
279
281
  - lib/platform_sdk/learnosity_api/client.rb