prospectus_golang 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/lib/prospectus_golang.rb +25 -9
- data/prospectus_golang.gemspec +3 -3
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5dc9412f42086eb678d7fb2c9eae9f86b0689dfee7f9f380489993ba3965c5e0
|
4
|
+
data.tar.gz: e723b78892d2502a24a3b47b119a4e7c9c0e5ee7a604d572c30f77fad048226d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b9f2f198a837d6fa521a3525ad9be28ef0215b985dd270715cdb5f8c008dc78ea539452a79c510fb378eb1084235d213ba0b4b11370e6a9ffe6230f67acdc6b
|
7
|
+
data.tar.gz: 65e74963c23a86a942fd54bf66473cd29f86ccc1d953f132b8a7de0d487968b181e7e740fcdf22ac49ffe83ed0084f9d8254db17c111f17f85f1776778ce9f0b
|
data/.travis.yml
CHANGED
data/lib/prospectus_golang.rb
CHANGED
@@ -5,16 +5,21 @@ module ProspectusGolang
|
|
5
5
|
##
|
6
6
|
# Helper for automatically adding dependency status check
|
7
7
|
class Deps < Module
|
8
|
-
def
|
8
|
+
def initialize(params = {})
|
9
|
+
@options = params
|
10
|
+
end
|
11
|
+
|
12
|
+
def extended(other) # rubocop:disable Metrics/MethodLength,Metrics/AbcSize
|
9
13
|
dep_list = parse_deps
|
10
14
|
other.deps do
|
11
|
-
dep_list.each do |dep_name, tag, hash|
|
15
|
+
dep_list.each do |dep_name, api, tag, hash|
|
12
16
|
item do
|
13
17
|
name 'dep::' + dep_name
|
14
18
|
|
15
19
|
expected do
|
16
20
|
hash ? github_hash : github_tag
|
17
21
|
repo dep_name
|
22
|
+
endpoint(api) if api
|
18
23
|
filter(/^v\d+\.\d+\.\d+$/) unless hash
|
19
24
|
end
|
20
25
|
|
@@ -34,7 +39,8 @@ module ProspectusGolang
|
|
34
39
|
name, version = x.split('@')
|
35
40
|
tag, _, hash = version.split('-')
|
36
41
|
tag.sub!('+incompatible', '')
|
37
|
-
|
42
|
+
dep_name, api = clean(name)
|
43
|
+
[dep_name, api, tag, hash ? hash[0..6] : nil]
|
38
44
|
end
|
39
45
|
end
|
40
46
|
|
@@ -45,18 +51,28 @@ module ProspectusGolang
|
|
45
51
|
o.split("\n").grep(/^#{name}/).map(&:split).map(&:last)
|
46
52
|
end
|
47
53
|
|
48
|
-
def clean(name)
|
54
|
+
def clean(name)
|
49
55
|
name = name.sub(%r{/v\d+$}, '')
|
50
56
|
case name
|
51
|
-
when %r{^github\.com/}
|
52
|
-
return name.split('/', 2).last
|
53
57
|
when %r{^golang\.org/x/}
|
54
|
-
return "golang/#{name.split('/').last}"
|
58
|
+
return "golang/#{name.split('/').last}", nil
|
55
59
|
when /^gopkg\.in/
|
56
60
|
path = name.match(%r{^gopkg\.in/(.*?)(\.v\d+)?$})[1]
|
57
|
-
return path.include?('/') ? path : "go-#{path}/#{path}"
|
61
|
+
return path.include?('/') ? path : "go-#{path}/#{path}", nil
|
62
|
+
end
|
63
|
+
github_clean(name) || raise("Name not parsed properly: #{name}")
|
64
|
+
end
|
65
|
+
|
66
|
+
def github_map
|
67
|
+
@github_map ||= { 'github.com' => nil }.merge(@options[:github_map] || {})
|
68
|
+
end
|
69
|
+
|
70
|
+
def github_clean(name)
|
71
|
+
github_map.each do |web, api|
|
72
|
+
next unless name.start_with? web
|
73
|
+
return name.split('/')[-2..-1].join('/'), api
|
58
74
|
end
|
59
|
-
|
75
|
+
nil
|
60
76
|
end
|
61
77
|
end
|
62
78
|
end
|
data/prospectus_golang.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'prospectus_golang'
|
3
|
-
s.version = '0.1.
|
3
|
+
s.version = '0.1.4'
|
4
4
|
s.date = Time.now.strftime('%Y-%m-%d')
|
5
5
|
|
6
6
|
s.summary = 'Prospectus helpers for golang'
|
@@ -17,8 +17,8 @@ Gem::Specification.new do |s|
|
|
17
17
|
|
18
18
|
s.add_development_dependency 'codecov', '~> 0.1.1'
|
19
19
|
s.add_development_dependency 'fuubar', '~> 2.3.0'
|
20
|
-
s.add_development_dependency 'goodcop', '~> 0.
|
20
|
+
s.add_development_dependency 'goodcop', '~> 0.7.0'
|
21
21
|
s.add_development_dependency 'rake', '~> 12.3.0'
|
22
22
|
s.add_development_dependency 'rspec', '~> 3.8.0'
|
23
|
-
s.add_development_dependency 'rubocop', '~> 0.
|
23
|
+
s.add_development_dependency 'rubocop', '~> 0.67.2'
|
24
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prospectus_golang
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Les Aker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: prospectus
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.
|
61
|
+
version: 0.7.0
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.
|
68
|
+
version: 0.7.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.
|
103
|
+
version: 0.67.2
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
110
|
+
version: 0.67.2
|
111
111
|
description: Prospectus helpers for golang
|
112
112
|
email: me@lesaker.org
|
113
113
|
executables: []
|