getv 1.0.1 → 1.1.0

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
  SHA256:
3
- metadata.gz: dee216d169325a49c0b22c5a155f4cbf2d7de0485cf910187eea5e2a53e00fec
4
- data.tar.gz: b68a57c56575fde9a0838be0a63d9e79d918a0152ef30ecea597aa3b8d242586
3
+ metadata.gz: 8b7033c123fd837edd23f202973d20c313932df2e35bb8eb680c2ecd4aa3f674
4
+ data.tar.gz: 5e66336327fc70676fba92f92eb56398b00bdfcc780cf4ec54365c38bf1edce3
5
5
  SHA512:
6
- metadata.gz: e009db79c088984187e984880e7cd48c03ab72771c38085268f31ef242ea254657af6436f1a800aef2d2b017fad5bd5f6c32dd39bba986c56567332cd9859536
7
- data.tar.gz: 5004687e4f6614a93fc9074e7a452b814719807abaef12c4e3350d6011c704085caa04409c234ed58ee78b8937f2a24245fd0e7d2f5d3d033b349786b973b65e
6
+ metadata.gz: cf6eb57389b7cf24b99177a8dba23da0095719da908672489b5e137e4c89aee948fd134f28bba952785098db43f60cf2645b2bf0bfaffcb81be849382c26db5b
7
+ data.tar.gz: 1b24a3216e4b33febabe870994c901c48e17108718f5d5d86dee79f0dabd77936e26b20a3b19ea41160a7774e8eb2e27ae69a31d32fd887d192a6c2ba52e7ffb
data/.rubocop.yml CHANGED
@@ -1,5 +1,9 @@
1
1
  ---
2
2
  AllCops:
3
+ Exclude:
4
+ - 'bin/**/*'
5
+ - 'bundle/**/*'
6
+ - '*.gemspec'
3
7
  NewCops: enable
4
8
 
5
9
  Metrics/BlockLength:
data/Gemfile CHANGED
@@ -12,6 +12,9 @@ gem 'octokit', '~> 4.21'
12
12
  gem 'rake', '~> 12.0'
13
13
  gem 'rdoc', '~> 6.4'
14
14
  gem 'rspec', '~> 3.0'
15
+ gem 'rubocop', '~> 1.24', require: false
16
+ gem 'rubocop-rake', '~> 0.6', require: false
17
+ gem 'rubocop-rspec', '~> 2.7', require: false
15
18
  gem 'semantic', '~> 1.6'
16
19
  gem 'vcr', '~> 6.0'
17
20
  gem 'webmock', '~> 3.0'
data/Rakefile CHANGED
@@ -1,6 +1,8 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
3
5
 
4
6
  RSpec::Core::RakeTask.new(:spec)
5
7
 
6
- task :default => :spec
8
+ task default: :spec
data/lib/getv/package.rb CHANGED
@@ -5,7 +5,7 @@ module Getv
5
5
  class Package # rubocop:disable Metrics/ClassLength
6
6
  attr_accessor :name, :opts
7
7
 
8
- def initialize(name, opts = {}) # rubocop:disable Metrics/MethodLength,Metrics/CyclomaticComplexity,Metrics/AbcSize
8
+ def initialize(name, opts = {}) # rubocop:disable Metrics/MethodLength,Metrics/CyclomaticComplexity,Metrics/AbcSize,Metrics/PerceivedComplexity
9
9
  @name = name
10
10
  case name
11
11
  when /rubygem-.*/
@@ -32,6 +32,9 @@ module Getv
32
32
  versions: nil,
33
33
  latest_version: nil
34
34
  }.merge(opts)
35
+ if (opts[:type] == 'docker' || opts[:type] =~ /github.*/) && (name.count('/') == 1)
36
+ opts = { owner: name.split('/')[0], repo: name.split('/')[1] }.merge(opts)
37
+ end
35
38
  case opts[:type]
36
39
  when 'docker'
37
40
  opts = { owner: 'library', repo: name, url: 'https://registry.hub.docker.com' }.merge(opts)
data/lib/getv/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Getv
4
- VERSION = '1.0.1'
4
+ VERSION = '1.1.0'
5
5
  end
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: 1.0.1
4
+ version: 1.1.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-01-17 00:00:00.000000000 Z
11
+ date: 2022-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: docker_registry2