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
954b68ed
Commit
954b68ed
authored
Sep 27, 2016
by
Patricio Cano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Syntax fixes and added tests.
parent
1bf58b5c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
2 deletions
+18
-2
app/views/projects/_over_size_limit_warning.html.haml
app/views/projects/_over_size_limit_warning.html.haml
+2
-0
app/views/projects/show.html.haml
app/views/projects/show.html.haml
+1
-1
lib/gitlab/repository_size_error.rb
lib/gitlab/repository_size_error.rb
+1
-1
spec/controllers/projects_controller_spec.rb
spec/controllers/projects_controller_spec.rb
+14
-0
No files found.
app/views/projects/_over_
limit_message
.html.haml
→
app/views/projects/_over_
size_limit_warning
.html.haml
View file @
954b68ed
.alert.alert-warning.hidden-xs
.alert.alert-warning.hidden-xs
=
Gitlab
::
RepositorySizeError
.
new
(
@project
).
flash_message
=
Gitlab
::
RepositorySizeError
.
new
(
@project
).
over_size_limit_message
\ No newline at end of file
app/views/projects/show.html.haml
View file @
954b68ed
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
=
render
'shared/no_password'
=
render
'shared/no_password'
-
if
@project
.
above_size_limit?
-
if
@project
.
above_size_limit?
=
render
'over_
limit_message
'
=
render
'over_
size_limit_warning
'
=
render
'projects/last_push'
=
render
'projects/last_push'
=
render
"home_panel"
=
render
"home_panel"
...
...
lib/gitlab/repository_size_error.rb
View file @
954b68ed
...
@@ -32,7 +32,7 @@ module Gitlab
...
@@ -32,7 +32,7 @@ module Gitlab
'Please contact your GitLab administrator for more information.'
'Please contact your GitLab administrator for more information.'
end
end
def
flash
_message
def
over_size_limit
_message
"
#{
to_s
}
You won't be able to push new code to this project.
#{
more_info_message
}
"
"
#{
to_s
}
You won't be able to push new code to this project.
#{
more_info_message
}
"
end
end
...
...
spec/controllers/projects_controller_spec.rb
View file @
954b68ed
...
@@ -89,6 +89,20 @@ describe ProjectsController do
...
@@ -89,6 +89,20 @@ describe ProjectsController do
get
:show
,
namespace_id:
public_project
.
namespace
.
path
,
id:
public_project
.
path
get
:show
,
namespace_id:
public_project
.
namespace
.
path
,
id:
public_project
.
path
expect
(
response
).
to
render_template
(
'_files'
)
expect
(
response
).
to
render_template
(
'_files'
)
end
end
context
'project repo over limit'
do
before
do
sign_in
(
user
)
allow_any_instance_of
(
Project
).
to
receive
(
:above_size_limit?
).
and_return
(
true
)
project
.
team
<<
[
user
,
:master
]
end
it
'shows the over size limit warning message'
do
get
:show
,
namespace_id:
project
.
namespace
.
path
,
id:
project
.
path
expect
(
response
).
to
render_template
(
'_over_size_limit_warning'
)
end
end
end
end
context
"when requested with case sensitive namespace and project path"
do
context
"when requested with case sensitive namespace and project path"
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