about_yml 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/about_yml_validate +5 -4
- data/lib/about_yml/about.rb +15 -3
- data/lib/about_yml/schema.json +3 -3
- data/lib/about_yml/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a3434a081c8ba183825647058a87aa9670f1f446
|
|
4
|
+
data.tar.gz: d48fc5b2f4d6b04272231be66f8306abbd66fa6c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c6629fe23082244cae129a1700ee8faf886cf22ad6858c3f5fb0556577cf224ac99203cd03dc2b522f98b76c4afa776db209dd8a39d33d6a111f22c8912bb00c
|
|
7
|
+
data.tar.gz: f1e1ca7bdca399056a1f07716e35726be7000994968544d2d9eea20bfa08384ef3facf1dd7c3ad2d65dba474f05d309e776eecfef97e13810a0ff56524559372
|
data/bin/about_yml_validate
CHANGED
|
@@ -6,15 +6,16 @@ require 'safe_yaml'
|
|
|
6
6
|
|
|
7
7
|
def usage(exitstatus = 0)
|
|
8
8
|
(exitstatus == 0 ? $stdout : $stderr).puts <<END_USAGE
|
|
9
|
-
#{$PROGRAM_NAME} path_to_about_file [...]
|
|
9
|
+
#{$PROGRAM_NAME} [path_to_about_file] [...]
|
|
10
10
|
|
|
11
|
-
Validates .about.yml file contents.
|
|
12
|
-
|
|
11
|
+
Validates .about.yml file contents. Assumes file in current directory
|
|
12
|
+
unless path specified. Prints nothing on success; prints errors to
|
|
13
|
+
standard error.
|
|
13
14
|
END_USAGE
|
|
14
15
|
exit exitstatus
|
|
15
16
|
end
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
ARGV << '.about.yml' if ARGV.empty?
|
|
18
19
|
ARGV.each { |f| abort "#{f} does not exist" unless File.exist? f }
|
|
19
20
|
|
|
20
21
|
exitstatus = 0
|
data/lib/about_yml/about.rb
CHANGED
|
@@ -36,16 +36,28 @@ module AboutYml
|
|
|
36
36
|
SafeYAML.load Base64.decode64(about['content'])
|
|
37
37
|
end
|
|
38
38
|
|
|
39
|
+
def self.write_error(err, repo, result)
|
|
40
|
+
$stderr.puts('Error while parsing .about.yml for ' \
|
|
41
|
+
"#{repo.full_name}:\n #{err}")
|
|
42
|
+
result['errors'] << { repo.full_name => err.message }
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def self.add_github_metadata(result, repo)
|
|
46
|
+
result['github'] = {
|
|
47
|
+
'name' => repo.full_name,
|
|
48
|
+
'description' => repo.description,
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
|
|
39
52
|
def self.collect_repository_data(repo, client, result)
|
|
40
53
|
collection = (repo.private == true) ? 'private' : 'public'
|
|
41
54
|
repo_name = repo.full_name
|
|
42
55
|
result[collection][repo_name] = fetch_file_contents client, repo_name
|
|
56
|
+
add_github_metadata result[collection][repo_name], repo
|
|
43
57
|
rescue Octokit::NotFound
|
|
44
58
|
result['missing'] << repo.full_name
|
|
45
59
|
rescue StandardError => err
|
|
46
|
-
|
|
47
|
-
"#{repo.full_name}:\n #{err}")
|
|
48
|
-
result['errors'] << {repo.full_name => err.message}
|
|
60
|
+
write_error err, repo, result
|
|
49
61
|
end
|
|
50
62
|
private_class_method :collect_repository_data
|
|
51
63
|
|
data/lib/about_yml/schema.json
CHANGED
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"testable": {
|
|
45
45
|
"type": "boolean",
|
|
46
46
|
"default": false,
|
|
47
|
-
"description": "Should
|
|
47
|
+
"description": "Should this repo have automated tests? If so, set to `true`."
|
|
48
48
|
},
|
|
49
49
|
"team": {
|
|
50
50
|
"type": "array",
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
}
|
|
129
129
|
},
|
|
130
130
|
"required": [
|
|
131
|
-
"name", "full_name", "stage", "team", "licenses", "owner_type", "
|
|
131
|
+
"name", "full_name", "stage", "team", "licenses", "owner_type", "testable"
|
|
132
132
|
],
|
|
133
133
|
"definitions": {
|
|
134
134
|
"person": {
|
|
@@ -223,7 +223,7 @@
|
|
|
223
223
|
"properties": {
|
|
224
224
|
"url": {
|
|
225
225
|
"type": "string",
|
|
226
|
-
"description": "
|
|
226
|
+
"description": "URL for the link",
|
|
227
227
|
"format": "uri"
|
|
228
228
|
},
|
|
229
229
|
"text": {
|
data/lib/about_yml/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: about_yml
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mike Bland
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2015-
|
|
12
|
+
date: 2015-11-06 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: safe_yaml
|