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
7f63a878
Commit
7f63a878
authored
Oct 07, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests and few CI features
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
a30b68fe
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
4 additions
and
36 deletions
+4
-36
app/controllers/ci/projects_controller.rb
app/controllers/ci/projects_controller.rb
+1
-0
app/controllers/projects/commit_controller.rb
app/controllers/projects/commit_controller.rb
+1
-1
app/views/projects/ci_settings/_form.html.haml
app/views/projects/ci_settings/_form.html.haml
+1
-1
config/routes.rb
config/routes.rb
+1
-1
spec/requests/ci/builds_spec.rb
spec/requests/ci/builds_spec.rb
+0
-17
spec/requests/ci/commits_spec.rb
spec/requests/ci/commits_spec.rb
+0
-16
No files found.
app/controllers/ci/projects_controller.rb
View file @
7f63a878
module
Ci
module
Ci
class
ProjectsController
<
Ci
::
ApplicationController
class
ProjectsController
<
Ci
::
ApplicationController
before_action
:project
before_action
:authenticate_user!
,
except:
[
:build
,
:badge
]
before_action
:authenticate_user!
,
except:
[
:build
,
:badge
]
before_action
:authorize_access_project!
,
except:
[
:badge
]
before_action
:authorize_access_project!
,
except:
[
:badge
]
before_action
:authorize_manage_project!
,
only:
[
:toggle_shared_runners
,
:dumped_yaml
]
before_action
:authorize_manage_project!
,
only:
[
:toggle_shared_runners
,
:dumped_yaml
]
...
...
app/controllers/projects/commit_controller.rb
View file @
7f63a878
...
@@ -42,7 +42,7 @@ class Projects::CommitController < Projects::ApplicationController
...
@@ -42,7 +42,7 @@ class Projects::CommitController < Projects::ApplicationController
@ci_commit
=
@project
.
ci_commit
(
@commit
.
sha
)
@ci_commit
=
@project
.
ci_commit
(
@commit
.
sha
)
@ci_commit
.
builds
.
running_or_pending
.
each
(
&
:cancel
)
@ci_commit
.
builds
.
running_or_pending
.
each
(
&
:cancel
)
redirect_to
namespace_project_commit_path
(
project
.
namespace
,
project
,
commit
.
sha
)
redirect_to
ci_
namespace_project_commit_path
(
project
.
namespace
,
project
,
commit
.
sha
)
end
end
...
...
app/views/projects/ci_settings/_form.html.haml
View file @
7f63a878
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
Edit your
Edit your
#{
link_to
".gitlab-ci.yml using web-editor"
,
yaml_web_editor_link
(
@ci_project
)
}
#{
link_to
".gitlab-ci.yml using web-editor"
,
yaml_web_editor_link
(
@ci_project
)
}
-
if
@repository
-
unless
@project
.
empty_repo?
%p
%p
Paste build status image for
#{
@repository
.
root_ref
}
with next link
Paste build status image for
#{
@repository
.
root_ref
}
with next link
=
link_to
'#'
,
class:
'badge-codes-toggle btn btn-default btn-xs'
do
=
link_to
'#'
,
class:
'badge-codes-toggle btn btn-default btn-xs'
do
...
...
config/routes.rb
View file @
7f63a878
...
@@ -465,7 +465,7 @@ Gitlab::Application.routes.draw do
...
@@ -465,7 +465,7 @@ Gitlab::Application.routes.draw do
member
do
member
do
get
:branches
get
:branches
get
:ci
get
:ci
pos
t
:cancel_builds
ge
t
:cancel_builds
end
end
end
end
...
...
spec/requests/ci/builds_spec.rb
deleted
100644 → 0
View file @
a30b68fe
require
'spec_helper'
describe
"Builds"
do
before
do
@commit
=
FactoryGirl
.
create
:ci_commit
@build
=
FactoryGirl
.
create
:ci_build
,
commit:
@commit
end
describe
"GET /:project/builds/:id/status.json"
do
before
do
get
status_ci_project_build_path
(
@commit
.
project
,
@build
),
format: :json
end
it
{
expect
(
response
.
status
).
to
eq
(
200
)
}
it
{
expect
(
response
.
body
).
to
include
(
@build
.
sha
)
}
end
end
spec/requests/ci/commits_spec.rb
deleted
100644 → 0
View file @
a30b68fe
require
'spec_helper'
describe
"Commits"
do
before
do
@commit
=
FactoryGirl
.
create
:ci_commit
end
describe
"GET /:project/refs/:ref_name/commits/:id/status.json"
do
before
do
get
status_ci_project_commits_path
(
@commit
.
project
,
@commit
.
sha
),
format: :json
end
it
{
expect
(
response
.
status
).
to
eq
(
200
)
}
it
{
expect
(
response
.
body
).
to
include
(
@commit
.
sha
)
}
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