prospectus_golang 0.0.3 → 0.1.1

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: 5b3e64d7571a20f0ff7909b3656682d5aff40ef9454fef0cfd6ad07d9636f475
4
- data.tar.gz: f0508f62c69a052de09d7e72ccf5a99d00ce62568dab959353b8daaae14f7471
3
+ metadata.gz: 5e6946dc63a485f5939fca1a2c47ad77a17fc3f04e82c6e1c77247cb1a10f59f
4
+ data.tar.gz: ac18529425ac578f20d7582e2a90dd9b661dfef4febb87bd847d45ee7ad218dc
5
5
  SHA512:
6
- metadata.gz: 53e9eb7589eda1f1aec5a021c0b8c68eda269178bf011e96dafaa59a235f9d83ff985ed9a73120eed455557eb0f08738c6ab0a3a34714ddd4887ae349b3fd9da
7
- data.tar.gz: 62056a72a2d4f9ddc84577e9215e9f2aed989cd4a43a2f35f00934d6f3fc826823dddeb927dd8794dd4066dd70ef79590f578e72e34a0c87b4b7d262ccd09ab9
6
+ metadata.gz: 1c07c8e155b907fe4f8be91f7d6b7c123e4fbb2af9e23c4b7e2b413057f676e2c01a6704b3a853c5f78e268b804c28cc187d1d86322a091a76a647f284c154f0
7
+ data.tar.gz: 433c3ead7e0f90ec0f8c9aba9def97990e2bab1b086a581e80daf164d41c6c2c6def543f6a986a04725574dd75ac00f350853f74eabd7bb8b27f5d9771226c37
data/.circle-ruby CHANGED
@@ -1,3 +1,4 @@
1
- 2.5.1
2
- 2.4.4
3
- 2.3.7
1
+ 2.6.0
2
+ 2.5.3
3
+ 2.4.5
4
+ 2.3.8
@@ -8,18 +8,19 @@ module ProspectusGolang
8
8
  def extended(other) # rubocop:disable Metrics/MethodLength
9
9
  dep_list = parse_deps
10
10
  other.deps do
11
- dep_list.each do |dep_name, current, latest|
11
+ dep_list.each do |dep_name, tag, hash|
12
12
  item do
13
13
  name 'dep::' + dep_name
14
14
 
15
15
  expected do
16
- static
17
- set latest
16
+ hash ? github_hash : github_tag
17
+ repo dep_name
18
+ filter(/^v\d+\.\d+\.\d+$/) unless hash
18
19
  end
19
20
 
20
21
  actual do
21
22
  static
22
- set current
23
+ set(hash || tag)
23
24
  end
24
25
  end
25
26
  end
@@ -29,19 +30,31 @@ module ProspectusGolang
29
30
  private
30
31
 
31
32
  def parse_deps
32
- call_dep.map { |x| [x['ProjectRoot'], *parse_version(x)] }
33
+ list_deps.map do |x|
34
+ name, version = x.split('@')
35
+ tag, _, hash = version.split('-')
36
+ tag.sub!('+incompatible', '')
37
+ [clean(name), tag, hash ? hash[0..6] : nil]
38
+ end
33
39
  end
34
40
 
35
- def call_dep
36
- o, e, s = Open3.capture3('STATUS_FLAGS=-json make -s status')
41
+ def list_deps
42
+ o, e, s = Open3.capture3('go mod graph')
37
43
  raise("Command failed: #{e}") unless s.success?
38
- JSON.parse(o)
44
+ name = o.split.first
45
+ o.split("\n").grep(/^#{name}/).map(&:split).map(&:last)
39
46
  end
40
47
 
41
- def parse_version(object)
42
- latest = object['Latest']
43
- return [object['Version'], latest] unless object['Version'] =~ /^branch /
44
- [object['Revision'][0..8], latest[0..8]]
48
+ def clean(name)
49
+ case name
50
+ when %r{^github\.com/}
51
+ return name.split('/', 2).last
52
+ when %r{^golang\.org/x/}
53
+ return "golang/#{name.split('/').last}"
54
+ when /^gopkg\.in/
55
+ return name.match(%r{^gopkg\.in/(.*?)(\.v\d+)?$})[1]
56
+ end
57
+ raise "Name not parsed properly: #{name}"
45
58
  end
46
59
  end
47
60
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'prospectus_golang'
3
- s.version = '0.0.3'
3
+ s.version = '0.1.1'
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.5.0'
20
+ s.add_development_dependency 'goodcop', '~> 0.6.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.58.0'
23
+ s.add_development_dependency 'rubocop', '~> 0.63.0'
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.0.3
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Les Aker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-09 00:00:00.000000000 Z
11
+ date: 2019-01-24 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.5.0
61
+ version: 0.6.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.5.0
68
+ version: 0.6.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.58.0
103
+ version: 0.63.0
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.58.0
110
+ version: 0.63.0
111
111
  description: Prospectus helpers for golang
112
112
  email: me@lesaker.org
113
113
  executables: []
@@ -147,8 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
147
  - !ruby/object:Gem::Version
148
148
  version: '0'
149
149
  requirements: []
150
- rubyforge_project:
151
- rubygems_version: 2.7.6
150
+ rubygems_version: 3.0.2
152
151
  signing_key:
153
152
  specification_version: 4
154
153
  summary: Prospectus helpers for golang