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
Jérome Perrin
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
...
@@ -15,13 +15,11 @@ module ContainerRegistry
end
end
def
repository_tags
(
name
)
def
repository_tags
(
name
)
response
=
@faraday
.
get
(
"/v2/
#{
name
}
/tags/list"
)
response_body
@faraday
.
get
(
"/v2/
#{
name
}
/tags/list"
)
response
.
body
if
response
.
success?
end
end
def
repository_manifest
(
name
,
reference
)
def
repository_manifest
(
name
,
reference
)
response
=
@faraday
.
get
(
"/v2/
#{
name
}
/manifests/
#{
reference
}
"
)
response_body
@faraday
.
get
(
"/v2/
#{
name
}
/manifests/
#{
reference
}
"
)
response
.
body
if
response
.
success?
end
end
def
repository_tag_digest
(
name
,
reference
)
def
repository_tag_digest
(
name
,
reference
)
...
@@ -36,8 +34,7 @@ module ContainerRegistry
...
@@ -36,8 +34,7 @@ module ContainerRegistry
def
blob
(
name
,
digest
,
type
=
nil
)
def
blob
(
name
,
digest
,
type
=
nil
)
headers
=
{}
headers
=
{}
headers
[
'Accept'
]
=
type
if
type
headers
[
'Accept'
]
=
type
if
type
response
=
@faraday
.
get
(
"/v2/
#{
name
}
/blobs/
#{
digest
}
"
,
nil
,
headers
)
response_body
@faraday
.
get
(
"/v2/
#{
name
}
/blobs/
#{
digest
}
"
,
nil
,
headers
)
response
.
body
if
response
.
success?
end
end
def
delete_blob
(
name
,
digest
)
def
delete_blob
(
name
,
digest
)
...
@@ -63,5 +60,9 @@ module ContainerRegistry
...
@@ -63,5 +60,9 @@ module ContainerRegistry
conn
.
adapter
:net_http
conn
.
adapter
:net_http
end
end
def
response_body
(
response
)
response
.
body
if
response
.
success?
end
end
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