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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c16c1c86b834a4a376d7c498fbac734d70e82fea
4
- data.tar.gz: c1aeaa1361d22b0042c4d5d1d180594a72d9eca2
3
+ metadata.gz: e12129492ebf2164c1c66e66ab8ca3018875b061
4
+ data.tar.gz: 223d9f0df0e9813c6a1499fdb7b9d5df112daa1c
5
5
  SHA512:
6
- metadata.gz: 9c301daee692988b5a58c5bdf59435093c3bb0171fbe0fb512488316c64fe5d19c7081d126936f346181cf62482335a8bc169a433025e0027676e5698f7a05ea
7
- data.tar.gz: 04cfe066faa998de417a4a5256e8a26ec2437aecea19ea69e83115982983f72df46f12426e2f00b86ed620855c194d977700f6d4edf2a6b44ddbbbf089e06e34
6
+ metadata.gz: f52a25d19865ef6c75b848b5db360917d5e175d340d9974a37ef701913784dc3e682d6d0d8f48a7743e5f9c3aaf3bb88ca8c71b1df31ea1f426bb3ff6650354d
7
+ data.tar.gz: 834586091eacd2ce347c07b46c38657a4286f1aeb30fbcf2a0494607cb680934aabf23182f54a5219aa5483082c6677e3ef0eb7e127f2669f7e158a4ca96984a
@@ -0,0 +1,8 @@
1
+ # Versioneer Project Configuration
2
+ # https://git.io/versioneer-help
3
+
4
+ type: Git
5
+ bump_segment: minor
6
+ prereleases:
7
+ - alpha
8
+ - beta
@@ -1,21 +1,14 @@
1
- The MIT License (MIT)
1
+ Copyright (C) 2017 BinaryBabel OSS
2
2
 
3
- Copyright (c) 2017 BinaryBabel OSS
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
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
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
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
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/>.
@@ -24,7 +24,7 @@ opparser = OptionParser.new do |opts|
24
24
  '',
25
25
  ' Options:'
26
26
  ].join("\n")
27
- opts.on('-p PATH.SELECTOR', 'Return sub-path of result data. default: version') do |v|
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)
@@ -12,9 +12,15 @@ module Latestver
12
12
  end
13
13
 
14
14
  def catalog_get(name_tag)
15
- raise ClientError, "Invalid NAME:TAG, #{name_tag}" unless name_tag.match(REGEX_NAME_TAG)
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
@@ -1 +1 @@
1
- 1.7.17
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.17
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
- - MIT
134
+ - GNU GPL 3
134
135
  metadata: {}
135
136
  post_install_message:
136
137
  rdoc_options: []