getv 1.3.1 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/getv +1 -1
- data/lib/getv/package.rb +8 -2
- data/lib/getv/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 03d655407021c76e4df2c9ece13fb42e6447f597f9492d240901e49442144e43
|
4
|
+
data.tar.gz: 6f48191ff06387bfea424457ee41fd5f514cda257c1341ecba87eb82c7237279
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56d72bdde2f6f8aceb8d0844e30fda53e428efebe748ea8bb98848943f5bad319ff566f2d8d6fde7b71812dbf40bb13b29094d00f6296fb6d88e7910e37b7bd5
|
7
|
+
data.tar.gz: ecd3ee651658cf63c659a4195dc5f0e7e5d113d963d82f68f1ead2f9ad74cdb76c75f65f6b7c3578da40e96bae39fc296f6db9b6953650044d4ea8b15d86c719
|
data/exe/getv
CHANGED
@@ -35,7 +35,7 @@ class App # rubocop:disable Metrics/ClassLength
|
|
35
35
|
switch %i[l latest], desc: 'Latest version', negatable: false
|
36
36
|
switch %i[j json], desc: 'Output in json', negatable: false
|
37
37
|
|
38
|
-
desc 'Get package versions from a Docker or OCI container image registry'
|
38
|
+
desc 'Get package versions from a Docker or OCI container image registry. Set environment variables $DOCKER_PROXY, $DOCKER_USER and $DOCKER_PASSWORD if required.' # rubocop:disable Layout/LineLength
|
39
39
|
arg_name 'package_name'
|
40
40
|
command :docker do |c|
|
41
41
|
defaults = (Getv::Package.new 'name', type: c.name.to_s).opts
|
data/lib/getv/package.rb
CHANGED
@@ -89,9 +89,15 @@ module Getv
|
|
89
89
|
|
90
90
|
private
|
91
91
|
|
92
|
-
def versions_using_docker
|
92
|
+
def versions_using_docker # rubocop:disable Metrics/AbcSize
|
93
93
|
require 'docker_registry2'
|
94
|
-
|
94
|
+
docker_opts = {}
|
95
|
+
docker_opts[:http_options] = { proxy: ENV['DOCKER_PROXY'] } if ENV['DOCKER_PROXY']
|
96
|
+
if ENV['DOCKER_USER'] && ENV['DOCKER_PASSWORD']
|
97
|
+
docker_opts[:user] = ENV['DOCKER_USER']
|
98
|
+
docker_opts[:password] = ENV['DOCKER_PASSWORD']
|
99
|
+
end
|
100
|
+
docker = DockerRegistry2.connect(opts[:url], docker_opts)
|
95
101
|
docker.tags("#{opts[:owner]}/#{opts[:repo]}")['tags']
|
96
102
|
end
|
97
103
|
|
data/lib/getv/version.rb
CHANGED