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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
d92054dd
Commit
d92054dd
authored
Jul 18, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use `humanize`
parent
f12faae8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
app/views/projects/ci/pipelines/_pipeline.html.haml
app/views/projects/ci/pipelines/_pipeline.html.haml
+1
-1
app/views/projects/deployments/_actions.haml
app/views/projects/deployments/_actions.haml
+1
-1
spec/features/environments_spec.rb
spec/features/environments_spec.rb
+4
-4
No files found.
app/views/projects/ci/pipelines/_pipeline.html.haml
View file @
d92054dd
...
...
@@ -70,7 +70,7 @@
%li
=
link_to
play_namespace_project_build_path
(
@project
.
namespace
,
@project
,
build
),
method: :post
,
rel:
'nofollow'
do
=
icon
(
"play"
)
%span
=
build
.
name
.
capital
ize
%span
=
build
.
name
.
human
ize
-
if
artifacts
.
present?
.btn-group
%a
.dropdown-toggle.btn.btn-default.build-artifacts
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
...
...
app/views/projects/deployments/_actions.haml
View file @
d92054dd
...
...
@@ -12,7 +12,7 @@
%li
=
link_to
[
:play
,
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
action
],
method: :post
,
rel:
'nofollow'
do
=
icon
(
"play"
)
%span
=
action
.
name
.
capital
ize
%span
=
action
.
name
.
human
ize
-
if
defined?
(
allow_rollback
)
&&
allow_rollback
=
link_to
[
:retry
,
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
deployment
.
deployable
],
method: :post
,
class:
'btn btn-build'
do
...
...
spec/features/environments_spec.rb
View file @
d92054dd
...
...
@@ -52,12 +52,12 @@ feature 'Environments', feature: true do
given
(
:manual
)
{
create
(
:ci_build
,
:manual
,
pipeline:
pipeline
,
name:
'deploy to production'
)
}
scenario
'does show a play button'
do
expect
(
page
).
to
have_link
(
manual
.
name
.
capital
ize
)
expect
(
page
).
to
have_link
(
manual
.
name
.
human
ize
)
end
scenario
'does allow to play manual action'
do
expect
(
manual
).
to
be_skipped
expect
{
click_link
(
manual
.
name
.
capitalize
)
}.
to
change
{
Ci
::
Pipeline
.
count
}.
by
(
0
)
expect
{
click_link
(
manual
.
name
.
humanize
)
}.
not_to
change
{
Ci
::
Pipeline
.
count
}
expect
(
page
).
to
have_content
(
manual
.
name
)
expect
(
manual
.
reload
).
to
be_pending
end
...
...
@@ -113,12 +113,12 @@ feature 'Environments', feature: true do
given
(
:manual
)
{
create
(
:ci_build
,
:manual
,
pipeline:
pipeline
,
name:
'deploy to production'
)
}
scenario
'does show a play button'
do
expect
(
page
).
to
have_link
(
manual
.
name
.
capital
ize
)
expect
(
page
).
to
have_link
(
manual
.
name
.
human
ize
)
end
scenario
'does allow to play manual action'
do
expect
(
manual
).
to
be_skipped
expect
{
click_link
(
manual
.
name
.
capitalize
)
}.
to
change
{
Ci
::
Pipeline
.
count
}.
by
(
0
)
expect
{
click_link
(
manual
.
name
.
humanize
)
}.
not_to
change
{
Ci
::
Pipeline
.
count
}
expect
(
page
).
to
have_content
(
manual
.
name
)
expect
(
manual
.
reload
).
to
be_pending
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