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
b7685b57
Commit
b7685b57
authored
Mar 24, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Redirect to root path when visiting `/ci`
parent
6f894bec
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
25 deletions
+20
-25
app/controllers/ci/projects_controller.rb
app/controllers/ci/projects_controller.rb
+4
-0
app/views/ci/projects/index.html.haml
app/views/ci/projects/index.html.haml
+0
-20
spec/controllers/ci/projects_controller_spec.rb
spec/controllers/ci/projects_controller_spec.rb
+16
-5
No files found.
app/controllers/ci/projects_controller.rb
View file @
b7685b57
...
...
@@ -6,6 +6,10 @@ module Ci
skip_before_action
:authenticate_user!
,
only:
[
:badge
]
protect_from_forgery
def
index
redirect_to
root_path
end
def
show
# Temporary compatibility with CI badges pointing to CI project page
redirect_to
namespace_project_path
(
project
.
namespace
,
project
)
...
...
app/views/ci/projects/index.html.haml
deleted
100644 → 0
View file @
6f894bec
.wiki
%h1
GitLab CI is now integrated in GitLab UI
%h2
For existing projects
%p
Check the following pages to find the CI status you're looking for:
%ul
%li
Projects page - shows CI status for each project.
%li
Project commits page - show CI status for each commit.
%h2
For new projects
%p
If you want to enable CI for a new project it is easy as adding
=
link_to
".gitlab-ci.yml"
,
"http://doc.gitlab.com/ce/ci/yaml/README.html"
file to your repository
spec/controllers/ci/projects_controller_spec.rb
View file @
b7685b57
...
...
@@ -6,12 +6,23 @@ describe Ci::ProjectsController do
let
(
:ci_id
)
{
project
.
ci_id
}
describe
'#index'
do
let
(
:user
)
{
create
(
:user
)
}
before
{
sign_in
(
user
)
}
before
{
get
(
:index
)
}
context
'user signed in'
do
before
do
sign_in
(
create
(
:user
))
get
(
:index
)
end
it
'redirects to /'
do
expect
(
response
).
to
redirect_to
(
root_path
)
end
end
context
'user not signed in'
do
before
{
get
(
:index
)
}
it
'returns 200'
do
expect
(
response
.
status
).
to
eq
200
it
'redirects to sign in page'
do
expect
(
response
).
to
redirect_to
(
new_user_session_path
)
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