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
375f4745
Commit
375f4745
authored
Jan 07, 2019
by
Michael Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move html_safe closer to its reason for being
parent
824b9305
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
ee/app/helpers/ee/user_callouts_helper.rb
ee/app/helpers/ee/user_callouts_helper.rb
+4
-3
ee/spec/helpers/ee/user_callouts_helper_spec.rb
ee/spec/helpers/ee/user_callouts_helper_spec.rb
+2
-2
No files found.
ee/app/helpers/ee/user_callouts_helper.rb
View file @
375f4745
...
...
@@ -30,7 +30,7 @@ module EE
message
=
enable_hashed_storage_warning_message
render_flash_user_callout
(
:warning
,
message
.
html_safe
,
GEO_ENABLE_HASHED_STORAGE
)
render_flash_user_callout
(
:warning
,
message
,
GEO_ENABLE_HASHED_STORAGE
)
end
def
render_migrate_hashed_storage_warning
...
...
@@ -38,7 +38,7 @@ module EE
message
=
migrate_hashed_storage_warning_message
render_flash_user_callout
(
:warning
,
message
.
html_safe
,
GEO_MIGRATE_HASHED_STORAGE
)
render_flash_user_callout
(
:warning
,
message
,
GEO_MIGRATE_HASHED_STORAGE
)
end
def
show_enable_hashed_storage_warning?
...
...
@@ -78,7 +78,8 @@ module EE
def
add_migrate_to_hashed_storage_link
(
message
)
migrate_link
=
link_to
(
_
(
'For more info, read the documentation.'
),
'https://docs.gitlab.com/ee/administration/repository_storage_types.html#how-to-migrate-to-hashed-storage'
,
target:
'_blank'
)
message
%
{
migrate_link:
migrate_link
}
linked_message
=
message
%
{
migrate_link:
migrate_link
}
linked_message
.
html_safe
end
end
end
ee/spec/helpers/ee/user_callouts_helper_spec.rb
View file @
375f4745
...
...
@@ -123,7 +123,7 @@ describe EE::UserCalloutsHelper do
context
'when the migrate warning has not been dismissed'
do
context
'when hashed storage is disabled'
do
before
do
expect
(
helper
).
to
receive
(
:hashed_storage_
disabled?
).
and_return
(
tru
e
)
expect
(
helper
).
to
receive
(
:hashed_storage_
enabled?
).
and_return
(
fals
e
)
end
it
{
is_expected
.
to
be_falsy
}
...
...
@@ -131,7 +131,7 @@ describe EE::UserCalloutsHelper do
context
'when hashed storage is enabled'
do
before
do
expect
(
helper
).
to
receive
(
:hashed_storage_
disabled?
).
and_return
(
fals
e
)
expect
(
helper
).
to
receive
(
:hashed_storage_
enabled?
).
and_return
(
tru
e
)
end
context
'when there is a project in non-hashed-storage'
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