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
Léo-Paul Géneau
gitlab-ce
Commits
22726942
Commit
22726942
authored
Apr 13, 2017
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix registry for projects with uppercases in path
parent
d7a52716
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
lib/container_registry/path.rb
lib/container_registry/path.rb
+1
-1
spec/lib/container_registry/path_spec.rb
spec/lib/container_registry/path_spec.rb
+19
-3
No files found.
lib/container_registry/path.rb
View file @
22726942
...
@@ -15,7 +15,7 @@ module ContainerRegistry
...
@@ -15,7 +15,7 @@ module ContainerRegistry
LEVELS_SUPPORTED
=
3
LEVELS_SUPPORTED
=
3
def
initialize
(
path
)
def
initialize
(
path
)
@path
=
path
@path
=
path
.
downcase
end
end
def
valid?
def
valid?
...
...
spec/lib/container_registry/path_spec.rb
View file @
22726942
...
@@ -33,10 +33,20 @@ describe ContainerRegistry::Path do
...
@@ -33,10 +33,20 @@ describe ContainerRegistry::Path do
end
end
describe
'#to_s'
do
describe
'#to_s'
do
let
(
:path
)
{
'some/image'
}
context
'when path does not have uppercase characters'
do
let
(
:path
)
{
'some/image'
}
it
'return a string with a repository path'
do
it
'return a string with a repository path'
do
expect
(
subject
.
to_s
).
to
eq
path
expect
(
subject
.
to_s
).
to
eq
'some/image'
end
end
context
'when path has uppercase characters'
do
let
(
:path
)
{
'SoMe/ImAgE'
}
it
'return a string with a repository path'
do
expect
(
subject
.
to_s
).
to
eq
'some/image'
end
end
end
end
end
...
@@ -70,6 +80,12 @@ describe ContainerRegistry::Path do
...
@@ -70,6 +80,12 @@ describe ContainerRegistry::Path do
it
{
is_expected
.
to
be_valid
}
it
{
is_expected
.
to
be_valid
}
end
end
context
'when path contains uppercase letters'
do
let
(
:path
)
{
'Some/Registry'
}
it
{
is_expected
.
to
be_valid
}
end
end
end
describe
'#has_repository?'
do
describe
'#has_repository?'
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