getv 2.1.4 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/getv/package/docker.rb +1 -1
- data/lib/getv/package.rb +13 -4
- data/lib/getv/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a61689e83e79890fe34ef8a54fb004fce2ba6afc46f461f15345b0aa5a521e02
|
4
|
+
data.tar.gz: 5b85ec535bf555d416fe406b6438f8455c672d87ba76a3a39dfa8bffd113a8b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5a88e66bc7a8d8a3c9ab49fed1ac6b19c1477bf3b50a18beeb7a4ccbcab7cecffe43b07ab761f62d661d6c411e6060718979bbb1525e7c6d3fb1f5117cecb7b
|
7
|
+
data.tar.gz: 31859e428d224cf9e1cb5741873cbaed2f46653dbc247d582df106fa06284ab3c20f7c97c0ceff9f52e63dba0f960cbf41cd453f3c7ed68fa39314a5aa83f70e
|
data/lib/getv/package/docker.rb
CHANGED
@@ -21,7 +21,7 @@ module Getv
|
|
21
21
|
{ owner: name.split('/')[0], repo: name.split('/')[1],
|
22
22
|
url: 'https://registry.hub.docker.com' }
|
23
23
|
else
|
24
|
-
{ owner: name.split('/')[1], repo: name.split('/')[2
|
24
|
+
{ owner: name.split('/')[1], repo: name.split('/')[2..].join('/'),
|
25
25
|
url: "https://#{name.split('/')[0]}" }
|
26
26
|
end
|
27
27
|
end
|
data/lib/getv/package.rb
CHANGED
@@ -42,12 +42,13 @@ module Getv
|
|
42
42
|
@opts = opts
|
43
43
|
end
|
44
44
|
|
45
|
-
def defaults
|
45
|
+
def defaults # rubocop:disable Metrics/MethodLength
|
46
46
|
{
|
47
47
|
select_search: '^\s*v?(.*)\s*$',
|
48
48
|
select_replace: '\1',
|
49
49
|
reject: nil,
|
50
50
|
semantic_only: true,
|
51
|
+
semantic_prefix: nil,
|
51
52
|
semantic_select: ['*'],
|
52
53
|
proxy: nil,
|
53
54
|
versions: nil,
|
@@ -72,14 +73,22 @@ module Getv
|
|
72
73
|
versions.select! { |v| v =~ select_pattern }
|
73
74
|
versions.map! { |v| v.sub(select_pattern, opts[:select_replace]) }
|
74
75
|
versions.reject! { |v| v =~ Regexp.new(opts[:reject]) } unless opts[:reject].nil?
|
76
|
+
|
75
77
|
if opts[:semantic_only]
|
76
78
|
require 'semantic'
|
77
79
|
require 'semantic/core_ext'
|
78
|
-
|
80
|
+
|
81
|
+
# remove non semantic version tags
|
82
|
+
versions.select! do |v|
|
83
|
+
v.sub(/^#{opts[:semantic_prefix]}/, '').is_version? && v.start_with?(opts[:semantic_prefix].to_s)
|
84
|
+
end
|
85
|
+
|
79
86
|
opts[:semantic_select].each do |comparator|
|
80
|
-
versions.select!
|
87
|
+
versions.select! do |v|
|
88
|
+
Semantic::Version.new(v.sub(/^#{opts[:semantic_prefix]}/, '')).satisfies?(comparator)
|
89
|
+
end
|
81
90
|
end
|
82
|
-
versions.sort_by! { |v| Semantic::Version.new(v) }
|
91
|
+
versions.sort_by! { |v| Semantic::Version.new(v.sub(/^#{opts[:semantic_prefix]}/, '')) }
|
83
92
|
else
|
84
93
|
versions.sort! unless instance_of?(Getv::Package::GitHub::Commit)
|
85
94
|
end
|
data/lib/getv/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: getv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- harbottle
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gli
|