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
8eaaa442
Commit
8eaaa442
authored
Jul 06, 2020
by
allison.browne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move RunnersHelper to Ci Namespace
RunnersHelper -> Ci::RunnersHelper
parent
1834d622
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
8 deletions
+8
-8
app/helpers/ci/runners_helper.rb
app/helpers/ci/runners_helper.rb
+2
-2
ee/app/helpers/ee/ci/runners_helper.rb
ee/app/helpers/ee/ci/runners_helper.rb
+1
-1
ee/app/views/layouts/header/_buy_pipeline_minutes.html.haml
ee/app/views/layouts/header/_buy_pipeline_minutes.html.haml
+1
-1
ee/spec/helpers/ee/runners_helper_spec.rb
ee/spec/helpers/ee/runners_helper_spec.rb
+1
-1
ee/spec/views/layouts/header/_current_user_dropdown.html.haml_spec.rb
...s/layouts/header/_current_user_dropdown.html.haml_spec.rb
+2
-2
spec/helpers/runners_helper_spec.rb
spec/helpers/runners_helper_spec.rb
+1
-1
No files found.
app/helpers/runners_helper.rb
→
app/helpers/
ci/
runners_helper.rb
View file @
8eaaa442
# frozen_string_literal: true
module
RunnersHelper
module
Ci::
RunnersHelper
def
runner_status_icon
(
runner
)
status
=
runner
.
status
case
status
...
...
@@ -40,4 +40,4 @@ module RunnersHelper
end
end
RunnersHelper
.
prepend_if_ee
(
'EE
::RunnersHelper'
)
Ci
::
RunnersHelper
.
prepend_if_ee
(
'EE::Ci
::RunnersHelper'
)
ee/app/helpers/ee/runners_helper.rb
→
ee/app/helpers/ee/
ci/
runners_helper.rb
View file @
8eaaa442
# frozen_string_literal: true
module
EE
module
RunnersHelper
module
Ci::
RunnersHelper
include
::
Gitlab
::
Utils
::
StrongMemoize
BUY_PIPELINE_MINUTES_NOTIFICATION_DOT
=
'buy_pipeline_minutes_notification_dot'
...
...
ee/app/views/layouts/header/_buy_pipeline_minutes.html.haml
View file @
8eaaa442
...
...
@@ -16,7 +16,7 @@
-
if
show_pipeline_minutes_notification_dot?
(
project
,
namespace
)
-
link_class
<<
' js-follow-link'
%li
.js-buy-pipeline-minutes-notification-callout
{
data:
{
feature_id:
RunnersHelper
::
BUY_PIPELINE_MINUTES_NOTIFICATION_DOT
,
%li
.js-buy-pipeline-minutes-notification-callout
{
data:
{
feature_id:
Ci
::
RunnersHelper
::
BUY_PIPELINE_MINUTES_NOTIFICATION_DOT
,
dismiss_endpoint:
user_callouts_path
}
}
=
link_to
path
,
class:
link_class
,
data:
data_attributes
do
=
yield
:buy_pipeline_with_subtext
...
...
ee/spec/helpers/ee/runners_helper_spec.rb
View file @
8eaaa442
...
...
@@ -2,7 +2,7 @@
require
"spec_helper"
RSpec
.
describe
EE
::
RunnersHelper
do
RSpec
.
describe
EE
::
Ci
::
RunnersHelper
do
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:namespace
)
{
create
(
:namespace
,
owner:
user
)
}
let_it_be
(
:project
)
{
create
(
:project
,
namespace:
namespace
)
}
...
...
ee/spec/views/layouts/header/_current_user_dropdown.html.haml_spec.rb
View file @
8eaaa442
...
...
@@ -39,7 +39,7 @@ RSpec.describe 'layouts/header/_current_user_dropdown' do
expect
(
subject
).
to
have_link
(
'Buy Pipeline minutes'
)
expect
(
subject
).
to
have_content
(
'One of your groups is running out'
)
expect
(
subject
).
to
have_selector
(
'.js-follow-link'
)
expect
(
subject
).
to
have_selector
(
"[data-feature-id='
#{
RunnersHelper
::
BUY_PIPELINE_MINUTES_NOTIFICATION_DOT
}
']"
)
expect
(
subject
).
to
have_selector
(
"[data-feature-id='
#{
Ci
::
RunnersHelper
::
BUY_PIPELINE_MINUTES_NOTIFICATION_DOT
}
']"
)
expect
(
subject
).
to
have_selector
(
"[data-dismiss-endpoint='
#{
user_callouts_path
}
']"
)
end
end
...
...
@@ -51,7 +51,7 @@ RSpec.describe 'layouts/header/_current_user_dropdown' do
expect
(
subject
).
to
have_link
(
'Buy Pipeline minutes'
)
expect
(
subject
).
to
have_content
(
'One of your groups is running out'
)
expect
(
subject
).
not_to
have_selector
(
'.js-follow-link'
)
expect
(
subject
).
not_to
have_selector
(
"[data-feature-id='
#{
RunnersHelper
::
BUY_PIPELINE_MINUTES_NOTIFICATION_DOT
}
']"
)
expect
(
subject
).
not_to
have_selector
(
"[data-feature-id='
#{
Ci
::
RunnersHelper
::
BUY_PIPELINE_MINUTES_NOTIFICATION_DOT
}
']"
)
expect
(
subject
).
not_to
have_selector
(
"[data-dismiss-endpoint='
#{
user_callouts_path
}
']"
)
end
end
...
...
spec/helpers/runners_helper_spec.rb
View file @
8eaaa442
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
RSpec
.
describe
RunnersHelper
do
RSpec
.
describe
Ci
::
RunnersHelper
do
it
"returns - not contacted yet"
do
runner
=
FactoryBot
.
build
:ci_runner
expect
(
runner_status_icon
(
runner
)).
to
include
(
"not connected yet"
)
...
...
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