Commit 8723e980 authored by Zhu Shung's avatar Zhu Shung Committed by Lin Jen-Shin

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

parent 9cb5a4eb
......@@ -2,15 +2,15 @@
module EE
SUBSCRIPTIONS_URL = ::Gitlab::SubscriptionPortal::SUBSCRIPTIONS_URL
SUBSCRIPTIONS_COMPARISON_URL = "https://about.gitlab.com/pricing/gitlab-com/feature-comparison"
SUBSCRIPTIONS_GRAPHQL_URL = "#{SUBSCRIPTIONS_URL}/graphql"
SUBSCRIPTIONS_MORE_MINUTES_URL = "#{SUBSCRIPTIONS_URL}/buy_pipeline_minutes"
SUBSCRIPTIONS_MORE_STORAGE_URL = "#{SUBSCRIPTIONS_URL}/buy_storage"
SUBSCRIPTIONS_MANAGE_URL = "#{SUBSCRIPTIONS_URL}/subscriptions"
SUBSCRIPTIONS_PLANS_URL = "#{SUBSCRIPTIONS_URL}/plans"
SUBSCRIPTION_PORTAL_ADMIN_EMAIL = ENV.fetch('SUBSCRIPTION_PORTAL_ADMIN_EMAIL', 'gl_com_api@gitlab.com')
SUBSCRIPTION_PORTAL_ADMIN_TOKEN = ENV.fetch('SUBSCRIPTION_PORTAL_ADMIN_TOKEN', 'customer_admin_token')
CUSTOMER_SUPPORT_URL = 'https://support.gitlab.com'
CUSTOMER_LICENSE_SUPPORT_URL = 'https://support.gitlab.com/hc/en-us/requests/new?ticket_form_id=360000071293'
GITLAB_COM_STATUS_URL = "https://status.gitlab.com"
SUBSCRIPTIONS_COMPARISON_URL = ::Gitlab::SubscriptionPortal.subscriptions_comparison_url.freeze
SUBSCRIPTIONS_GRAPHQL_URL = ::Gitlab::SubscriptionPortal.subscriptions_graphql_url.freeze
SUBSCRIPTIONS_MORE_MINUTES_URL = ::Gitlab::SubscriptionPortal.subscriptions_more_minutes_url.freeze
SUBSCRIPTIONS_MORE_STORAGE_URL = ::Gitlab::SubscriptionPortal.subscriptions_more_storage_url.freeze
SUBSCRIPTIONS_MANAGE_URL = ::Gitlab::SubscriptionPortal.subscriptions_manage_url.freeze
SUBSCRIPTIONS_PLANS_URL = ::Gitlab::SubscriptionPortal.subscriptions_plans_url.freeze
SUBSCRIPTION_PORTAL_ADMIN_EMAIL = ::Gitlab::SubscriptionPortal.subscription_portal_admin_email.freeze
SUBSCRIPTION_PORTAL_ADMIN_TOKEN = ::Gitlab::SubscriptionPortal.subscription_portal_admin_token.freeze
CUSTOMER_SUPPORT_URL = ::Gitlab::Saas.customer_support_url.freeze
CUSTOMER_LICENSE_SUPPORT_URL = ::Gitlab::Saas.customer_license_support_url.freeze
GITLAB_COM_STATUS_URL = ::Gitlab::Saas.gitlab_com_status_url.freeze
end
......@@ -24,6 +24,18 @@ module Gitlab
def self.registry_prefix
'registry.gitlab.com'
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
......
......@@ -13,6 +13,38 @@ module Gitlab
def self.payment_form_url
"#{self.subscriptions_url}/payment_forms/cc_validation"
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
......
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