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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/platform_sdk/jira/service_management_client.rb +39 -0
- data/lib/platform_sdk/jira.rb +9 -0
- data/lib/platform_sdk/version.rb +2 -2
- data/lib/platform_sdk.rb +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31ae84204c95f4c12d64af4a72308f1eeec1b82b0bd0bc357d2348b78a735c1d
|
4
|
+
data.tar.gz: bdabdf9ba87b161af728b238d7b0c5e09da4bb81e79e7867920eaba897d58754
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7d5ae9c61b6d4e076f3a6840f8daca9addfd94f661e5c463b46eb5da1bb881ca6e0289a31ff6b006661a0b40994c001b0cca19a463a6b7aa2398bed19b4b18b
|
7
|
+
data.tar.gz: f62b15426ff2f016cce3537b12d9869db6b96b5015d6047bd85cf020d0bc605d1ee057f05ac7665dc3810f7ff11db5adf8c044fe3d19efffdef53d5da5068c6a
|
data/Gemfile.lock
CHANGED
@@ -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
|
data/lib/platform_sdk/version.rb
CHANGED
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.
|
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
|
+
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
|