Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8723e980
Commit
8723e980
authored
Sep 17, 2021
by
Zhu Shung
Committed by
Lin Jen-Shin
Sep 17, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use methods to define constants in ee/lib/ee.rb
parent
9cb5a4eb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
11 deletions
+55
-11
ee/lib/ee.rb
ee/lib/ee.rb
+11
-11
lib/gitlab/saas.rb
lib/gitlab/saas.rb
+12
-0
lib/gitlab/subscription_portal.rb
lib/gitlab/subscription_portal.rb
+32
-0
No files found.
ee/lib/ee.rb
View file @
8723e980
...
...
@@ -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
lib/gitlab/saas.rb
View file @
8723e980
...
...
@@ -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
...
...
lib/gitlab/subscription_portal.rb
View file @
8723e980
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment