latestver 1.7.17 → 1.7.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.versioneer.yml +8 -0
- data/LICENSE.txt +11 -18
- data/exe/latestver +1 -1
- data/lib/latestver/cli_helpers.rb +2 -2
- data/lib/latestver/client.rb +7 -1
- data/version.lock +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e12129492ebf2164c1c66e66ab8ca3018875b061
|
4
|
+
data.tar.gz: 223d9f0df0e9813c6a1499fdb7b9d5df112daa1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f52a25d19865ef6c75b848b5db360917d5e175d340d9974a37ef701913784dc3e682d6d0d8f48a7743e5f9c3aaf3bb88ca8c71b1df31ea1f426bb3ff6650354d
|
7
|
+
data.tar.gz: 834586091eacd2ce347c07b46c38657a4286f1aeb30fbcf2a0494607cb680934aabf23182f54a5219aa5483082c6677e3ef0eb7e127f2669f7e158a4ca96984a
|
data/.versioneer.yml
ADDED
data/LICENSE.txt
CHANGED
@@ -1,21 +1,14 @@
|
|
1
|
-
|
1
|
+
Copyright (C) 2017 BinaryBabel OSS
|
2
2
|
|
3
|
-
|
3
|
+
This program is free software: you can redistribute it and/or modify
|
4
|
+
it under the terms of the GNU General Public License as published by
|
5
|
+
the Free Software Foundation, either version 3 of the License, or
|
6
|
+
(at your option) any later version.
|
4
7
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
8
|
+
This program is distributed in the hope that it will be useful,
|
9
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
11
|
+
GNU General Public License for more details.
|
11
12
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
13
|
+
You should have received a copy of the GNU General Public License
|
14
|
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
data/exe/latestver
CHANGED
@@ -24,7 +24,7 @@ opparser = OptionParser.new do |opts|
|
|
24
24
|
'',
|
25
25
|
' Options:'
|
26
26
|
].join("\n")
|
27
|
-
opts.on('-p PATH
|
27
|
+
opts.on('-p SUB.FIELD.PATH', 'Dot-path to result field, default: version') do |v|
|
28
28
|
options[:select] = v
|
29
29
|
end
|
30
30
|
opts.on('--server SERVER', 'https://lv.binarybabel.org') do |v|
|
@@ -22,12 +22,12 @@ module Latestver
|
|
22
22
|
if data_out.is_a? String
|
23
23
|
data_out = {
|
24
24
|
value: data_out,
|
25
|
-
error:
|
25
|
+
error: '',
|
26
26
|
}
|
27
27
|
elsif data_out.is_a? Exception
|
28
28
|
data_out = {
|
29
29
|
error: data_out.message,
|
30
|
-
value:
|
30
|
+
value: '',
|
31
31
|
}
|
32
32
|
end
|
33
33
|
JSON.pretty_generate(data_out)
|
data/lib/latestver/client.rb
CHANGED
@@ -12,9 +12,15 @@ module Latestver
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def catalog_get(name_tag)
|
15
|
-
|
15
|
+
if name_tag.index(':').nil?
|
16
|
+
name_tag = name_tag + ':latest'
|
17
|
+
end
|
18
|
+
|
19
|
+
raise ArgumentError, "Invalid NAME:TAG, #{name_tag}" unless name_tag.match(REGEX_NAME_TAG)
|
20
|
+
|
16
21
|
name, tag = name_tag.split(':')
|
17
22
|
response = ::Faraday.get "#{server_url}/catalog-api/#{name}/#{tag}.json"
|
23
|
+
|
18
24
|
if response.status == 200
|
19
25
|
JSON.parse(response.body)
|
20
26
|
else
|
data/version.lock
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.7.
|
1
|
+
1.7.18
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: latestver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BinaryBabel OSS
|
@@ -116,6 +116,7 @@ executables:
|
|
116
116
|
extensions: []
|
117
117
|
extra_rdoc_files: []
|
118
118
|
files:
|
119
|
+
- ".versioneer.yml"
|
119
120
|
- LICENSE.txt
|
120
121
|
- README.md
|
121
122
|
- bin/console
|
@@ -130,7 +131,7 @@ files:
|
|
130
131
|
- version.lock
|
131
132
|
homepage: https://lv.binarybabel.org
|
132
133
|
licenses:
|
133
|
-
-
|
134
|
+
- GNU GPL 3
|
134
135
|
metadata: {}
|
135
136
|
post_install_message:
|
136
137
|
rdoc_options: []
|