gitlab_support_readiness 1.0.129 → 1.0.130
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/lib/support_readiness/salesforce/accounts.rb +36 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0102aacc88b5b814217895ec69e839a573c84055d0b786e1116a053895989a92
|
4
|
+
data.tar.gz: 40d8aa364040549bce14ee3bcd3e5c61889fd68ade93e5fc5ceda6fb73cf1fed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af924cefa67d6300b81fb1d8052f4db5e084d25dbe86cd1e8e953654b25d483bb6ae2e8eddb5cc59a750d3df82d55647f5c9de831fbe6eab4eb064d7110706e3
|
7
|
+
data.tar.gz: 0af864729707ae8d02168ae4a6a2c50ce8f311eb997f3068d624b7e56e22d5148147067bd5e940b71a24f66579c0b1e1f8eb6dcc122ea1a784dcb44a976fe0af
|
@@ -90,7 +90,7 @@ module Readiness
|
|
90
90
|
def self.global_accounts(client)
|
91
91
|
query = Queries.new(global_sync_query_string)
|
92
92
|
results = Queries.run!(client, query)
|
93
|
-
results.map { |r| global_sync_object(r) }
|
93
|
+
results.map { |r| global_sync_object(r) }.compact
|
94
94
|
end
|
95
95
|
|
96
96
|
##
|
@@ -125,6 +125,8 @@ module Readiness
|
|
125
125
|
# @since 1.0.26
|
126
126
|
def self.global_sync_object(account)
|
127
127
|
subscriptions = account_subscriptions(account)
|
128
|
+
return nil if us_gov_only?(account, subscriptions)
|
129
|
+
|
128
130
|
expiration = account_expiration(account)
|
129
131
|
type = account_type(account, expiration)
|
130
132
|
partner = %w[alliance_partner open_partner select_partner].include?(type)
|
@@ -442,6 +444,38 @@ module Readiness
|
|
442
444
|
}
|
443
445
|
end
|
444
446
|
|
447
|
+
##
|
448
|
+
# Determines if a given account with its subscriptions is US Government only
|
449
|
+
#
|
450
|
+
# @author Jason Colyer
|
451
|
+
# @since 1.0.130
|
452
|
+
def self.us_gov_only?(account, subs)
|
453
|
+
return false if subs.count.zero?
|
454
|
+
return false if subs.include? 'sub_consumption_cicd_minutes'
|
455
|
+
return false if subs.include? 'sub_dotcom_premium'
|
456
|
+
return false if subs.include? 'sub_dotcom_ultimate'
|
457
|
+
return false if subs.include? 'sub_edu'
|
458
|
+
return false if subs.include? 'sub_oss'
|
459
|
+
return false if subs.include? 'sub_community_other'
|
460
|
+
|
461
|
+
if subs.include?('sub_usgov_12x5') || subs.include?('sub_usgov_24x7') || account.Support_Instance__c == 'federal-support'
|
462
|
+
global_subs_present = false
|
463
|
+
grouped = account.Zuora__R00N40000001lGjTEAU__r.group_by { |z| z.Zuora__ProductName__c }
|
464
|
+
grouped.each_value do |charges|
|
465
|
+
next if charges.detect { |c| SubscriptionDefinitions.usgov_12x5.include? c.Name }
|
466
|
+
next if charges.detect { |c| SubscriptionDefinitions.usgov_24x7.include? c.Name }
|
467
|
+
next if charges.detect { |c| SubscriptionDefinitions.fedramp.include? c.Name }
|
468
|
+
next if charges.detect { |c| SubscriptionDefinitions.sm_ultimate.include? c.Name } && account.Support_Instance__c == 'federal-support'
|
469
|
+
next if charges.detect { |c| SubscriptionDefinitions.sm_premium.include? c.Name } && account.Support_Instance__c == 'federal-support'
|
470
|
+
next if charges.detect { |c| SubscriptionDefinitions.sm_starter.include? c.Name } && account.Support_Instance__c == 'federal-support'
|
471
|
+
|
472
|
+
global_subs_present = true
|
473
|
+
end
|
474
|
+
return true unless global_subs_present
|
475
|
+
end
|
476
|
+
false
|
477
|
+
end
|
478
|
+
|
445
479
|
##
|
446
480
|
# Provides the String needed to make a specific type of SOQL query
|
447
481
|
#
|
@@ -502,6 +536,7 @@ module Readiness
|
|
502
536
|
Partners_Partner_Type__c,
|
503
537
|
Support_Hold__c,
|
504
538
|
Account_Risk_Level__c,
|
539
|
+
Support_Instance__c,
|
505
540
|
(
|
506
541
|
SELECT
|
507
542
|
Id,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitlab_support_readiness
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.130
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Colyer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-03-
|
11
|
+
date: 2025-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|