prospectus_golang 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.circle-ruby +3 -0
- data/.gitignore +5 -0
- data/.prospectus +11 -0
- data/.rspec +2 -0
- data/.rubocop.yml +2 -0
- data/.travis.yml +11 -0
- data/Gemfile +3 -0
- data/LICENSE +22 -0
- data/README.md +31 -0
- data/Rakefile +13 -0
- data/lib/prospectus_golang.rb +47 -0
- data/prospectus_golang.gemspec +24 -0
- data/spec/prospectus_golang_spec.rb +1 -0
- data/spec/spec_helper.rb +11 -0
- metadata +157 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 6ed7cbca10ee95eb1e784ce8196f81a9c766cf5f5d799e2ff8f7cb7f7452f4c2
|
4
|
+
data.tar.gz: d60bfaaa85cfd0bc21b82b29f57b7720075a76395fb54b2ad925b8ec3ed48c0d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2764b301eef8265ff0b741627f9e426924bee98214aacd3d84f4413744b4b4290c20f75f6394f76b45ac4b31ad29489804616f9d496bbe232d3e01e46487526b
|
7
|
+
data.tar.gz: '09f1da1ecd7f71713843b3444a7d1c2b370337dbdcc2b92c9de9fe88a3975091f4ee44bc2a65f161e140ddb09556bf8810cf3859e21aa392e29a9c492bff999a'
|
data/.circle-ruby
ADDED
data/.gitignore
ADDED
data/.prospectus
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
data/.travis.yml
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
dist: trusty
|
2
|
+
install:
|
3
|
+
- for i in $(cat .circle-ruby) ; do rvm install $i || exit 1 ; done
|
4
|
+
- for i in $(cat .circle-ruby) ; do rvm-exec $i bundle install || exit 1 ; done
|
5
|
+
script:
|
6
|
+
- for i in $(cat .circle-ruby) ; do rvm-exec $i bundle exec rake || exit 1 ; done
|
7
|
+
notifications:
|
8
|
+
email: false
|
9
|
+
slack:
|
10
|
+
rooms:
|
11
|
+
secure: pdnuRQx8aFYVAn3VfEq8WHKl2m6TH6LTHqRGOv3WsfShJOAiXI647Gl8/MuTp1FoVXqP7gbO8QvqUFhiZrW36rCebhXRCDoc3gCFsmUl/nmw9rDC2GnM8zl180Y6yL3drTLJjW3SQ7lKARw2tHVR5M1P5HG12BJtYJsnaaSHOWdecagJB4sicDWwk2/vBTiJQRoNYofEy1u4neh1zXWYQsVYe2tLCux7xeBaCh3xBNiqPjgVm5sUv7v4fQoPJ/HjycTl3x0EILmvN2dOucQ4DVKH4xIyNYqHpd+MNeVRY8HJFthSwj3+S92nt3N+6FcFq+qKWYA6QLAYYfsqxfQwLctGSYk3tiVeMb5gzBYcN4nnxf03YPBAnXBXDKGTz3xhbfZ8//C4ZjlvzEvAAPtiHqA9eDqGQWh4YuFQRoi79GTXdU121TUWVCitXkYq2DWHSamoxYMlkwms5KtjhxnhZsObdFO4MesvLsKDkwrIiwOklFb/3Iu3ImOsEwmHLTJkVeJIqAiItMEds0V56Ip9opoDZLNcNmFnvoiIye9k6mwnOTR0tArtFQsukimuqdvdQEQxYPQX8Bf5AGcnFT52N5rhtvieSfNuJgQsE0LJUNB4ksYQLM4yTBV2MWfF14+kBxH7jdSv+SqWvuOzMgujvLYAGDylS5JVEE9bwyput2k=
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 Les Aker
|
4
|
+
|
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:
|
11
|
+
|
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.
|
22
|
+
|
data/README.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
prospectus_golang
|
2
|
+
=========
|
3
|
+
|
4
|
+
[![Gem Version](https://img.shields.io/gem/v/prospectus_golang.svg)](https://rubygems.org/gems/prospectus_golang)
|
5
|
+
[![Build Status](https://img.shields.io/travis/com/akerl/prospectus_golang.svg)](https://travis-ci.com/akerl/prospectus_golang)
|
6
|
+
[![Coverage Status](https://img.shields.io/codecov/c/github/akerl/prospectus_golang.svg)](https://codecov.io/github/akerl/prospectus_golang)
|
7
|
+
[![Code Quality](https://img.shields.io/codacy/3e438ed62cec4ceaa4cca42cb567e42e.svg)](https://www.codacy.com/app/akerl/prospectus_golang)
|
8
|
+
[![MIT Licensed](https://img.shields.io/badge/license-MIT-green.svg)](https://tldrlegal.com/license/mit-license)
|
9
|
+
|
10
|
+
[Prospectus](https://github.com/akerl/prospectus) helpers for checking Golang dependency status.
|
11
|
+
|
12
|
+
## Usage
|
13
|
+
|
14
|
+
Add the following 2 lines to the .prospectus:
|
15
|
+
|
16
|
+
```
|
17
|
+
## Add this at the top
|
18
|
+
Prospectus.extra_dep('file', 'prospectus_golang')
|
19
|
+
|
20
|
+
## Add this inside your item that has Golang deps
|
21
|
+
extend ProspectusGolang::Deps.new
|
22
|
+
```
|
23
|
+
|
24
|
+
## Installation
|
25
|
+
|
26
|
+
gem install prospectus_golang
|
27
|
+
|
28
|
+
## License
|
29
|
+
|
30
|
+
prospectus_golang is released under the MIT License. See the bundled LICENSE file for details.
|
31
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'rspec/core/rake_task'
|
3
|
+
require 'rubocop/rake_task'
|
4
|
+
|
5
|
+
desc 'Run tests'
|
6
|
+
RSpec::Core::RakeTask.new(:spec)
|
7
|
+
|
8
|
+
desc 'Run Rubocop on the gem'
|
9
|
+
RuboCop::RakeTask.new(:rubocop) do |task|
|
10
|
+
task.fail_on_error = true
|
11
|
+
end
|
12
|
+
|
13
|
+
task default: %i[spec rubocop build install]
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'json'
|
2
|
+
require 'open3'
|
3
|
+
|
4
|
+
module ProspectusGolang
|
5
|
+
##
|
6
|
+
# Helper for automatically adding dependency status check
|
7
|
+
class Deps < Module
|
8
|
+
def extended(other) # rubocop:disable Metrics/MethodLength
|
9
|
+
dep_list = parse_deps
|
10
|
+
other.deps do
|
11
|
+
dep_list.each do |dep_name, current, latest|
|
12
|
+
item do
|
13
|
+
name 'dep::' + dep_name
|
14
|
+
|
15
|
+
expected do
|
16
|
+
static
|
17
|
+
set latest
|
18
|
+
end
|
19
|
+
|
20
|
+
actual do
|
21
|
+
static
|
22
|
+
set current
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
def parse_deps
|
32
|
+
call_dep.map { |x| [x['ProjectRoot'], *parse_version(x)] }
|
33
|
+
end
|
34
|
+
|
35
|
+
def call_dep
|
36
|
+
o, e, s = Open3.capture3('STATUS_FLAGS=-json make -s status')
|
37
|
+
raise("Command failed: #{e}") unless s.success?
|
38
|
+
JSON.parse(o)
|
39
|
+
end
|
40
|
+
|
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]]
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = 'prospectus_golang'
|
3
|
+
s.version = '0.0.1'
|
4
|
+
s.date = Time.now.strftime('%Y-%m-%d')
|
5
|
+
|
6
|
+
s.summary = 'Prospectus helpers for golang'
|
7
|
+
s.description = 'Prospectus helpers for golang'
|
8
|
+
s.authors = ['Les Aker']
|
9
|
+
s.email = 'me@lesaker.org'
|
10
|
+
s.homepage = 'https://github.com/akerl/prospectus_golang'
|
11
|
+
s.license = 'MIT'
|
12
|
+
|
13
|
+
s.files = `git ls-files`.split
|
14
|
+
s.test_files = `git ls-files spec/*`.split
|
15
|
+
|
16
|
+
s.add_dependency 'prospectus', '~> 0.6.0'
|
17
|
+
|
18
|
+
s.add_development_dependency 'codecov', '~> 0.1.1'
|
19
|
+
s.add_development_dependency 'fuubar', '~> 2.3.0'
|
20
|
+
s.add_development_dependency 'goodcop', '~> 0.5.0'
|
21
|
+
s.add_development_dependency 'rake', '~> 12.3.0'
|
22
|
+
s.add_development_dependency 'rspec', '~> 3.8.0'
|
23
|
+
s.add_development_dependency 'rubocop', '~> 0.58.0'
|
24
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'spec_helper'
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,157 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: prospectus_golang
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Les Aker
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-09-05 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: prospectus
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.6.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.6.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: codecov
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.1.1
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.1.1
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: fuubar
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 2.3.0
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 2.3.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: goodcop
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.5.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.5.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 12.3.0
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 12.3.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 3.8.0
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 3.8.0
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.58.0
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 0.58.0
|
111
|
+
description: Prospectus helpers for golang
|
112
|
+
email: me@lesaker.org
|
113
|
+
executables: []
|
114
|
+
extensions: []
|
115
|
+
extra_rdoc_files: []
|
116
|
+
files:
|
117
|
+
- ".circle-ruby"
|
118
|
+
- ".gitignore"
|
119
|
+
- ".prospectus"
|
120
|
+
- ".rspec"
|
121
|
+
- ".rubocop.yml"
|
122
|
+
- ".travis.yml"
|
123
|
+
- Gemfile
|
124
|
+
- LICENSE
|
125
|
+
- README.md
|
126
|
+
- Rakefile
|
127
|
+
- lib/prospectus_golang.rb
|
128
|
+
- prospectus_golang.gemspec
|
129
|
+
- spec/prospectus_golang_spec.rb
|
130
|
+
- spec/spec_helper.rb
|
131
|
+
homepage: https://github.com/akerl/prospectus_golang
|
132
|
+
licenses:
|
133
|
+
- MIT
|
134
|
+
metadata: {}
|
135
|
+
post_install_message:
|
136
|
+
rdoc_options: []
|
137
|
+
require_paths:
|
138
|
+
- lib
|
139
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - ">="
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '0'
|
144
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
145
|
+
requirements:
|
146
|
+
- - ">="
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
version: '0'
|
149
|
+
requirements: []
|
150
|
+
rubyforge_project:
|
151
|
+
rubygems_version: 2.7.6
|
152
|
+
signing_key:
|
153
|
+
specification_version: 4
|
154
|
+
summary: Prospectus helpers for golang
|
155
|
+
test_files:
|
156
|
+
- spec/prospectus_golang_spec.rb
|
157
|
+
- spec/spec_helper.rb
|