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
7967c98b
Commit
7967c98b
authored
May 11, 2021
by
Vitaly Slobodin
Committed by
Matthias Käppler
May 11, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose CustomersDot variables via gon on gl.com
parent
a309f510
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
ee/lib/ee/gitlab/gon_helper.rb
ee/lib/ee/gitlab/gon_helper.rb
+5
-0
ee/spec/lib/ee/gitlab/gon_helper_spec.rb
ee/spec/lib/ee/gitlab/gon_helper_spec.rb
+13
-0
No files found.
ee/lib/ee/gitlab/gon_helper.rb
View file @
7967c98b
...
@@ -10,6 +10,11 @@ module EE
...
@@ -10,6 +10,11 @@ module EE
super
super
gon
.
roadmap_epics_limit
=
1000
gon
.
roadmap_epics_limit
=
1000
if
::
Gitlab
.
dev_env_or_com?
gon
.
subscriptions_url
=
::
Gitlab
::
SubscriptionPortal
::
SUBSCRIPTIONS_URL
gon
.
payment_form_url
=
::
Gitlab
::
SubscriptionPortal
::
PAYMENT_FORM_URL
end
end
end
# Exposes if a licensed feature is available.
# Exposes if a licensed feature is available.
...
...
ee/spec/lib/ee/gitlab/gon_helper_spec.rb
View file @
7967c98b
...
@@ -25,6 +25,19 @@ RSpec.describe EE::Gitlab::GonHelper do
...
@@ -25,6 +25,19 @@ RSpec.describe EE::Gitlab::GonHelper do
helper
.
add_gon_variables
helper
.
add_gon_variables
end
end
context
'when GitLab.com'
do
before
do
allow
(
Gitlab
).
to
receive
(
:dev_env_or_com?
).
and_return
(
true
)
end
it
'includes CustomersDot variables'
do
expect
(
gon
).
to
receive
(
:subscriptions_url
=
).
with
(
Gitlab
::
SubscriptionPortal
::
SUBSCRIPTIONS_URL
)
expect
(
gon
).
to
receive
(
:payment_form_url
=
).
with
(
Gitlab
::
SubscriptionPortal
::
PAYMENT_FORM_URL
)
helper
.
add_gon_variables
end
end
end
end
describe
'#push_licensed_feature'
do
describe
'#push_licensed_feature'
do
...
...
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