project-report 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/project-report +9 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9f327bbf489b9cdc8e6951d099c330be84916f345ce875cbbe8d336e2ab417a
|
4
|
+
data.tar.gz: e2e21dde777a3d8a855527c8f6ae662e55d5084dd5a414db0b15d3f4cd5c431c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c017cc5d017cda4c38bcc6b751acc6fa6fa64d29db8f5a73896f814400e6a8dcc95423370756dadac03b33b6e6f423ec06a720219fe7525ad3a43cb52b8e0a7
|
7
|
+
data.tar.gz: 109836a85a52259a14c0dca0521fa5e27463e5441041d8a7981c92e1845a78e51299977e7bde327c5e965ca032459b4110a33934a8470ce8c3d3ba846d5404a3
|
data/bin/project-report
CHANGED
@@ -7,13 +7,13 @@ require 'bibliothecary'
|
|
7
7
|
def parse_options
|
8
8
|
ARGV.push('-h') if ARGV.empty?
|
9
9
|
options = { :name => "",
|
10
|
-
:
|
10
|
+
:tags => "",
|
11
11
|
}
|
12
12
|
OptionParser.new do |opts|
|
13
13
|
opts.banner = "Generate statistics about project, such as used languages, row counts and dependencies.
|
14
14
|
Usage: project-report [options] -r<paths to git repository in local directory>
|
15
15
|
|
16
|
-
Example: ./project-report -r . -n\"Project Report\" --
|
16
|
+
Example: ./project-report -r . -n\"Project Report\" --tags=\"OSS,Reporting\"
|
17
17
|
|
18
18
|
Options:
|
19
19
|
"
|
@@ -24,8 +24,8 @@ def parse_options
|
|
24
24
|
opts.on("-nNAME", "--project-name=NAME", "Project name, will be prompted if not set") do |name|
|
25
25
|
options[:name] = name
|
26
26
|
end
|
27
|
-
opts.on("-
|
28
|
-
options[:
|
27
|
+
opts.on("-tTAGS", "--tags=TAGS", Array, "Tags for project. This can be things as business area, open source etc... Will be prompted if not set") do |tags|
|
28
|
+
options[:tags] = tags
|
29
29
|
end
|
30
30
|
opts.on("-h", "--help", "Show this message") do
|
31
31
|
puts opts
|
@@ -94,21 +94,21 @@ if options[:name] == ""
|
|
94
94
|
print "Project name? "
|
95
95
|
options[:name] = STDIN.gets.strip
|
96
96
|
end
|
97
|
-
if options[:
|
98
|
-
print "Project
|
99
|
-
options[:
|
97
|
+
if options[:tags] == ""
|
98
|
+
print "Project tags (e.g. ecommerce, banking, etc..)? "
|
99
|
+
options[:tags] = STDIN.gets.strip.split(",").map(&:strip)
|
100
100
|
end
|
101
101
|
|
102
102
|
# Generate end result
|
103
103
|
project = {
|
104
104
|
"project" => {
|
105
105
|
"name" => options[:name],
|
106
|
-
"
|
106
|
+
"tags" => options[:tags],
|
107
107
|
"repos" => options[:repos].map{ |repo| repo_stats(repo)}
|
108
108
|
}
|
109
109
|
}
|
110
110
|
if options[:output]
|
111
111
|
File.write(options[:output], project.to_yaml)
|
112
112
|
else
|
113
|
-
puts(project.to_yaml
|
113
|
+
puts(project.to_yaml)
|
114
114
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: project-report
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tatu Lahtela
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-08-
|
11
|
+
date: 2021-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: github-linguist
|