Commit f7b25888 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge branch 'jh-mr-99-refactor-ee-rb' into 'master'

Use methods to define constants in ee/lib/ee.rb

See merge request gitlab-org/gitlab!70307
parents 549f8659 8723e980
...@@ -2,15 +2,15 @@ ...@@ -2,15 +2,15 @@
module EE module EE
SUBSCRIPTIONS_URL = ::Gitlab::SubscriptionPortal::SUBSCRIPTIONS_URL SUBSCRIPTIONS_URL = ::Gitlab::SubscriptionPortal::SUBSCRIPTIONS_URL
SUBSCRIPTIONS_COMPARISON_URL = "https://about.gitlab.com/pricing/gitlab-com/feature-comparison" SUBSCRIPTIONS_COMPARISON_URL = ::Gitlab::SubscriptionPortal.subscriptions_comparison_url.freeze
SUBSCRIPTIONS_GRAPHQL_URL = "#{SUBSCRIPTIONS_URL}/graphql" SUBSCRIPTIONS_GRAPHQL_URL = ::Gitlab::SubscriptionPortal.subscriptions_graphql_url.freeze
SUBSCRIPTIONS_MORE_MINUTES_URL = "#{SUBSCRIPTIONS_URL}/buy_pipeline_minutes" SUBSCRIPTIONS_MORE_MINUTES_URL = ::Gitlab::SubscriptionPortal.subscriptions_more_minutes_url.freeze
SUBSCRIPTIONS_MORE_STORAGE_URL = "#{SUBSCRIPTIONS_URL}/buy_storage" SUBSCRIPTIONS_MORE_STORAGE_URL = ::Gitlab::SubscriptionPortal.subscriptions_more_storage_url.freeze
SUBSCRIPTIONS_MANAGE_URL = "#{SUBSCRIPTIONS_URL}/subscriptions" SUBSCRIPTIONS_MANAGE_URL = ::Gitlab::SubscriptionPortal.subscriptions_manage_url.freeze
SUBSCRIPTIONS_PLANS_URL = "#{SUBSCRIPTIONS_URL}/plans" SUBSCRIPTIONS_PLANS_URL = ::Gitlab::SubscriptionPortal.subscriptions_plans_url.freeze
SUBSCRIPTION_PORTAL_ADMIN_EMAIL = ENV.fetch('SUBSCRIPTION_PORTAL_ADMIN_EMAIL', 'gl_com_api@gitlab.com') SUBSCRIPTION_PORTAL_ADMIN_EMAIL = ::Gitlab::SubscriptionPortal.subscription_portal_admin_email.freeze
SUBSCRIPTION_PORTAL_ADMIN_TOKEN = ENV.fetch('SUBSCRIPTION_PORTAL_ADMIN_TOKEN', 'customer_admin_token') SUBSCRIPTION_PORTAL_ADMIN_TOKEN = ::Gitlab::SubscriptionPortal.subscription_portal_admin_token.freeze
CUSTOMER_SUPPORT_URL = 'https://support.gitlab.com' CUSTOMER_SUPPORT_URL = ::Gitlab::Saas.customer_support_url.freeze
CUSTOMER_LICENSE_SUPPORT_URL = 'https://support.gitlab.com/hc/en-us/requests/new?ticket_form_id=360000071293' CUSTOMER_LICENSE_SUPPORT_URL = ::Gitlab::Saas.customer_license_support_url.freeze
GITLAB_COM_STATUS_URL = "https://status.gitlab.com" GITLAB_COM_STATUS_URL = ::Gitlab::Saas.gitlab_com_status_url.freeze
end end
...@@ -24,6 +24,18 @@ module Gitlab ...@@ -24,6 +24,18 @@ module Gitlab
def self.registry_prefix def self.registry_prefix
'registry.gitlab.com' 'registry.gitlab.com'
end end
def self.customer_support_url
'https://support.gitlab.com'
end
def self.customer_license_support_url
'https://support.gitlab.com/hc/en-us/requests/new?ticket_form_id=360000071293'
end
def self.gitlab_com_status_url
'https://status.gitlab.com'
end
end end
end end
......
...@@ -13,6 +13,38 @@ module Gitlab ...@@ -13,6 +13,38 @@ module Gitlab
def self.payment_form_url def self.payment_form_url
"#{self.subscriptions_url}/payment_forms/cc_validation" "#{self.subscriptions_url}/payment_forms/cc_validation"
end end
def self.subscriptions_comparison_url
'https://about.gitlab.com/pricing/gitlab-com/feature-comparison'
end
def self.subscriptions_graphql_url
"#{self.subscriptions_url}/graphql"
end
def self.subscriptions_more_minutes_url
"#{self.subscriptions_url}/buy_pipeline_minutes"
end
def self.subscriptions_more_storage_url
"#{self.subscriptions_url}/buy_storage"
end
def self.subscriptions_manage_url
"#{self.subscriptions_url}/subscriptions"
end
def self.subscriptions_plans_url
"#{self.subscriptions_url}/plans"
end
def self.subscription_portal_admin_email
ENV.fetch('SUBSCRIPTION_PORTAL_ADMIN_EMAIL', 'gl_com_api@gitlab.com')
end
def self.subscription_portal_admin_token
ENV.fetch('SUBSCRIPTION_PORTAL_ADMIN_TOKEN', 'customer_admin_token')
end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment