project-report 0.0.1 → 0.0.2

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/project-report +9 -9
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bb2e40ca5b103334ae6bf30cb1d7d0adb72a9b5824c18e2480723d145ba27acf
4
- data.tar.gz: 17f2bc41029fdddd6e0839400e38f9dd409d317f333e4e8e4e7d7aa67bc8175f
3
+ metadata.gz: c9f327bbf489b9cdc8e6951d099c330be84916f345ce875cbbe8d336e2ab417a
4
+ data.tar.gz: e2e21dde777a3d8a855527c8f6ae662e55d5084dd5a414db0b15d3f4cd5c431c
5
5
  SHA512:
6
- metadata.gz: ee2a176a527dc6ab6aaea20fde66fb845d0b2308209548adb1a7f1f38497263d8fa43e0e74d885ecfcf49e6633cbbc4ef52e63064b3ef4c7d95f134365d027f4
7
- data.tar.gz: cb0cc8c3c9959cb0209057ee2b3085081d76d904eaba7141c5c676c96ca745001a700fc13cab04af25b25fafec00bee245f972a0b16920b96e02b4c181988af3
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
- :business => "",
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\" --business=\"Open Source\"
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("-bBUSINESS", "--business=BUSINESS", "Project business area, will be prompted if not set") do |business|
28
- options[:business] = business
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[:business] == ""
98
- print "Project business area (e.g. ecommerce, banking, etc..)? "
99
- options[:business] = STDIN.gets.strip
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
- "business" => options[:business],
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(indentation: 10))
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.1
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-03 00:00:00.000000000 Z
11
+ date: 2021-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github-linguist