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
35319aa4
Commit
35319aa4
authored
Jun 17, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use response_body
parent
04ffd71e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
lib/container_registry/client.rb
lib/container_registry/client.rb
+7
-6
No files found.
lib/container_registry/client.rb
View file @
35319aa4
...
...
@@ -15,13 +15,11 @@ module ContainerRegistry
end
def
repository_tags
(
name
)
response
=
@faraday
.
get
(
"/v2/
#{
name
}
/tags/list"
)
response
.
body
if
response
.
success?
response_body
@faraday
.
get
(
"/v2/
#{
name
}
/tags/list"
)
end
def
repository_manifest
(
name
,
reference
)
response
=
@faraday
.
get
(
"/v2/
#{
name
}
/manifests/
#{
reference
}
"
)
response
.
body
if
response
.
success?
response_body
@faraday
.
get
(
"/v2/
#{
name
}
/manifests/
#{
reference
}
"
)
end
def
repository_tag_digest
(
name
,
reference
)
...
...
@@ -36,8 +34,7 @@ module ContainerRegistry
def
blob
(
name
,
digest
,
type
=
nil
)
headers
=
{}
headers
[
'Accept'
]
=
type
if
type
response
=
@faraday
.
get
(
"/v2/
#{
name
}
/blobs/
#{
digest
}
"
,
nil
,
headers
)
response
.
body
if
response
.
success?
response_body
@faraday
.
get
(
"/v2/
#{
name
}
/blobs/
#{
digest
}
"
,
nil
,
headers
)
end
def
delete_blob
(
name
,
digest
)
...
...
@@ -63,5 +60,9 @@ module ContainerRegistry
conn
.
adapter
:net_http
end
def
response_body
(
response
)
response
.
body
if
response
.
success?
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