gitlab_support_readiness 1.0.80 → 1.0.81

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f73265c9e0c2606679e55b5f63fa47e104082b2a5de450bcd6dac1402745bd5
4
- data.tar.gz: 846cd4b2b154ed1d246b1dbf36b29d147dff19dc4a4cf631cbaa9e0b885e3ac2
3
+ metadata.gz: 8de60a82bcf4a6b35eac73b1697f9a10c1c6174de6a22b925faa18b7e451c9f9
4
+ data.tar.gz: 65f6fe7d4ee66de7f50f30cb3342e1f4d01ed3daebcd190045105548693e1d24
5
5
  SHA512:
6
- metadata.gz: 9814f4d85731d12d82fa8deebb0fb196c9fcb06d69f0119ec88211ff0625205698bc615fa78492007320168080e078f20a039162ea38554f6fdd36f050ff4108
7
- data.tar.gz: c6e08b18a97e0144c463250a1bfad91cac220eefaebf294249961f6d48b9deeaac2544947ef18bf8c0d006306849c42b9aee662ccb42fbf9bb790975d947ad06
6
+ metadata.gz: 8d606da08fb8afdda157f096de4ab2b54dd97ac649be47ee93679959eaab847aeff6a26ae29a606829c1c7bc6179ef6b2c402ccc5211bf1a37b3e161c326fd56
7
+ data.tar.gz: 94b837578299e1d5586465d9a72b6f8d5dc71562799bc0e2dc058df742abfbef7e49907fa30b82fd2ca6b5161d1c96c8519df08f2a3df8d700365fe34e142169
@@ -21,7 +21,7 @@ module Readiness
21
21
  @zendesk_client = zendesk_client
22
22
  requester
23
23
  zd_user
24
- unless Readiness::GitLab::Namespaces.exists?(@gitlab_admin_client, namespace_provided)
24
+ unless Readiness::SupportSuperFormProcessor::Shared.namespace_exists?(@gitlab_admin_client, namespace_provided)
25
25
  Readiness::SupportSuperFormProcessor::Shared.invalid_namespace(requester_email, namespace_provided)
26
26
  end
27
27
  @namespace = Readiness::GitLab::Namespaces.find!(@gitlab_admin_client, namespace_provided)
@@ -21,7 +21,7 @@ module Readiness
21
21
  @zendesk_client = zendesk_client
22
22
  requester
23
23
  zd_user
24
- unless Readiness::GitLab::Namespaces.exists?(@gitlab_admin_client, namespace_provided)
24
+ unless Readiness::SupportSuperFormProcessor::Shared.namespace_exists?(@gitlab_admin_client, namespace_provided)
25
25
  Readiness::SupportSuperFormProcessor::Shared.invalid_namespace(requester_email, namespace_provided)
26
26
  end
27
27
  @namespace = Readiness::GitLab::Namespaces.find!(@gitlab_admin_client, namespace_provided)
@@ -21,7 +21,7 @@ module Readiness
21
21
  @zendesk_client = zendesk_client
22
22
  requester
23
23
  zd_user
24
- unless Readiness::GitLab::Namespaces.exists?(@gitlab_admin_client, namespace_provided)
24
+ unless Readiness::SupportSuperFormProcessor::Shared.namespace_exists?(@gitlab_admin_client, namespace_provided)
25
25
  Readiness::SupportSuperFormProcessor::Shared.invalid_namespace(requester_email, namespace_provided)
26
26
  end
27
27
  @namespace = Readiness::GitLab::Namespaces.find!(@gitlab_admin_client, namespace_provided)
@@ -21,7 +21,7 @@ module Readiness
21
21
  @zendesk_client = zendesk_client
22
22
  requester
23
23
  zd_user
24
- unless Readiness::GitLab::Namespaces.exists?(@gitlab_admin_client, namespace_provided)
24
+ unless Readiness::SupportSuperFormProcessor::Shared.namespace_exists?(@gitlab_admin_client, namespace_provided)
25
25
  Readiness::SupportSuperFormProcessor::Shared.invalid_namespace(requester_email, namespace_provided)
26
26
  end
27
27
  @namespace = Readiness::GitLab::Namespaces.find!(@gitlab_admin_client, namespace_provided)
@@ -27,7 +27,7 @@ module Readiness
27
27
  if seats.to_i > 25 || Date.parse(sub_end_date) > (Date.today + 1.years)
28
28
  Readiness::SupportSuperFormProcessor::Shared.invalid_nfr_request(requester_email)
29
29
  end
30
- unless Readiness::GitLab::Namespaces.exists?(@gitlab_admin_client, namespace_provided)
30
+ unless Readiness::SupportSuperFormProcessor::Shared.namespace_exists?(@gitlab_admin_client, namespace_provided)
31
31
  Readiness::SupportSuperFormProcessor::Shared.invalid_namespace(requester_email, namespace_provided)
32
32
  end
33
33
  @namespace = Readiness::GitLab::Namespaces.find!(@gitlab_admin_client, namespace_provided)
@@ -21,7 +21,7 @@ module Readiness
21
21
  @zendesk_client = zendesk_client
22
22
  requester
23
23
  zd_user
24
- unless Readiness::GitLab::Namespaces.exists?(@gitlab_admin_client, namespace_provided)
24
+ unless Readiness::SupportSuperFormProcessor::Shared.namespace_exists?(@gitlab_admin_client, namespace_provided)
25
25
  Readiness::SupportSuperFormProcessor::Shared.invalid_namespace(requester_email, namespace_provided)
26
26
  end
27
27
  @namespace = Readiness::GitLab::Namespaces.find!(@gitlab_admin_client, namespace_provided)
@@ -21,7 +21,7 @@ module Readiness
21
21
  @zendesk_client = zendesk_client
22
22
  requester
23
23
  zd_user
24
- unless Readiness::GitLab::Namespaces.exists?(@gitlab_admin_client, namespace_provided)
24
+ unless Readiness::SupportSuperFormProcessor::Shared.namespace_exists?(@gitlab_admin_client, namespace_provided)
25
25
  Readiness::SupportSuperFormProcessor::Shared.invalid_namespace(requester_email, namespace_provided)
26
26
  end
27
27
  @namespace = Readiness::GitLab::Namespaces.find!(@gitlab_admin_client, namespace_provided)
@@ -21,7 +21,7 @@ module Readiness
21
21
  @zendesk_client = zendesk_client
22
22
  requester
23
23
  zd_user
24
- unless Readiness::GitLab::Namespaces.exists?(@gitlab_admin_client, namespace_provided)
24
+ unless Readiness::SupportSuperFormProcessor::Shared.namespace_exists?(@gitlab_admin_client, namespace_provided)
25
25
  Readiness::SupportSuperFormProcessor::Shared.invalid_namespace(requester_email, namespace_provided)
26
26
  end
27
27
  @namespace = Readiness::GitLab::Namespaces.find!(@gitlab_admin_client, namespace_provided)
@@ -21,7 +21,7 @@ module Readiness
21
21
  @zendesk_client = zendesk_client
22
22
  requester
23
23
  zd_user
24
- unless Readiness::GitLab::Namespaces.exists?(@gitlab_admin_client, namespace_provided)
24
+ unless Readiness::SupportSuperFormProcessor::Shared.namespace_exists?(@gitlab_admin_client, namespace_provided)
25
25
  Readiness::SupportSuperFormProcessor::Shared.invalid_namespace(requester_email, namespace_provided)
26
26
  end
27
27
  @namespace = Readiness::GitLab::Namespaces.find!(@gitlab_admin_client, namespace_provided)
@@ -10,6 +10,19 @@ module Readiness
10
10
  # @author Jason Colyer
11
11
  # @since 1.0.42
12
12
  class Shared < Readiness::Client
13
+ ##
14
+ # Performs a gitlab.com namespace check
15
+ #
16
+ # @author Jason Colyer
17
+ # @since 1.0.81
18
+ # @param client [Object] An instance of {Readiness::GitLab::Client}
19
+ # @param email [String] The email to search for
20
+ def self.namespace_exists?(client, namespace)
21
+ return Readiness::GitLab::Namespaces.exists?(client, namespace) if namespace.to_i.zero?
22
+
23
+ Readiness::GitLab::Namespaces.find(client, namespace).is_a? Readiness::GitLab::Namespaces
24
+ end
25
+
13
26
  ##
14
27
  # Performs a gitlab.com user check
15
28
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab_support_readiness
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.80
4
+ version: 1.0.81
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Colyer