how_is 10.0.0 → 11.0.0

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
  SHA1:
3
- metadata.gz: 7d2232f2f2d17f748d7c1ad440d9cfb2d0185146
4
- data.tar.gz: 19c398abf2048d22a7fb69ee7935b782572d44ec
3
+ metadata.gz: 54f57134fd048db57ac6305e075305d6e26d0bcc
4
+ data.tar.gz: 8b822b82157a68d82c4f842af37ebe21b2b98834
5
5
  SHA512:
6
- metadata.gz: efb076d7b3a488721c39d0b9389938a53a8075e4a52d70039b62d6ffd603081110012280c734d62c7d50ad10f2728a0ad221544e8f689d96ec06ac1cb64800e0
7
- data.tar.gz: 6454fe522a6da9d7a706b39360823704a50025b247544ec45a65b1112fa38e94ac886b0034425c63da7667f39dd6fcf5135cc1d1540a608f88f8c99f9a1c05c3
6
+ metadata.gz: f71efbd4e9393c1f4b93ba3e24b43c4a9bb2ed9ed46d2bfb7de7464337e1eb7788092c5d05a5ff782709114c30512dbc730941d88b1ea035c0b717085bd22232
7
+ data.tar.gz: 79f8473db656c9cfd5588345bd4ac9c8055dcae692d55dde7dfaa4d4af457511d499f456dbf1031041126ae16ea6e5adb193d25db5c9ccf0b67953aba01bc4c3
data/.gitignore CHANGED
@@ -7,7 +7,6 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
- report.pdf
11
10
  report.json
12
11
  report.html
13
12
  *.dat
data/CHANGELOG.md ADDED
@@ -0,0 +1,34 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](http://keepachangelog.com) and
6
+ this project adheres to [Semantic Versioning](http://semver.org).
7
+
8
+ ## [Unreleased]
9
+
10
+ (Nothing so far.)
11
+
12
+ ## [11.0.0]
13
+
14
+ ### Added
15
+
16
+ - Document Ruby API
17
+
18
+ ### Changed
19
+
20
+ - Fixed command-line help text (it was incorrect in v10.0.0 and some earlier versions)
21
+ - Handles generating reports for repositories with no issues and/or no PRs
22
+ - Handles generating reports for repositories with no activity in the
23
+ past month
24
+ - Tests are improved
25
+ - Tests no longer make actual network requests
26
+
27
+ ### Removed
28
+
29
+ - PDF reports
30
+
31
+ ## [10.0.0 and earlier]
32
+
33
+ This changelog was started while working on v11.0.0.
34
+ Prior to that, I have no idea what was added or when.
data/README.md CHANGED
@@ -20,22 +20,21 @@ If you want to contribute or discuss how_is, you can [join Bundler's slack](http
20
20
 
21
21
  ## Installation
22
22
 
23
- If you want to generate PDF reports, make sure you have
24
- [gnuplot](http://gnuplot.info/) installed.
25
-
26
23
  $ gem install how_is
27
24
 
28
25
  ## Usage
29
26
 
30
- $ how_is <orgname>/<reponame> [--report-file FILENAME]
27
+ ### Command Line
28
+
29
+ $ how_is <orgname>/<reponame> [--report FILENAME]
31
30
 
32
31
  E.g.,
33
32
 
34
- $ how_is rubygems/rubygems --report-file report.html
33
+ $ how_is rubygems/rubygems --report report.html
35
34
 
36
35
  The above command creates a HTML file containing the summary at `./report.html`.
37
36
 
38
- ### Generating reports from a config file
37
+ #### Generating reports from a config file
39
38
 
40
39
  Beyond the above, you can also create a config file &mdash; typically called
41
40
  how_is.yml &mdash; and run `how_is --config YAML_CONFIG_FILE`. If your config
@@ -49,7 +48,7 @@ repository name, of format USER_OR_ORG/REPOSITORY &mdash; e.g. how-is/how_is)
49
48
  and `reports`.
50
49
 
51
50
  `reports` is a hash of key/value pairs, with the keys being the type of report
52
- ("html", "pdf", or "json") and the values being another hash.
51
+ ("html" or "json") and the values being another hash.
53
52
 
54
53
  That hash can have the following keys: `directory` (the directory to place the
55
54
  report in), `filename` (the format string for filenames), and (optionally)
@@ -62,6 +61,43 @@ Every value under `reports` is a format string, so you can do e.g.
62
61
  `filename: "%{date}-report.html"` or (under `frontmatter`)
63
62
  `title: "%{date} Report"`.
64
63
 
64
+ ### Ruby API
65
+
66
+ ```ruby
67
+ # Generate a report for <orgname>/<reponame>, defaulting to
68
+ # the report file being report.html.
69
+ HowIs.generate_report(repository: '<orgname>/<reponame>')
70
+
71
+ # Generate a report for <orgname>/<reponame>, specifying
72
+ # a report file of blah-report.html.
73
+ HowIs.generate_report(repository: '<orgname>/<reponame>', report:
74
+ 'blah-report.html')
75
+
76
+ # Generate a report from a config file located at ./how_is.yml.
77
+ # Example config file: https://github.com/how-is/how-is-rubygems/blob/gh-pages/how_is.yml
78
+ # NOTE: This is going to be moved outside of HowIs::CLI at some point.
79
+ HowIs::CLI.new.from_config_file('how_is.yml')
80
+
81
+ # Generate a report from a config Hash.
82
+ # NOTE: This is going to be moved outside of HowIs::CLI at some point.
83
+ HowIs::CLI.new.from_config({
84
+ repository: '<orgname>/<reponame>',
85
+ reports: {
86
+ html: {
87
+ directory: '_posts',
88
+ frontmatter: {
89
+ title: '%{date} Report',
90
+ layout: 'default'
91
+ },
92
+ filename: "%{date}-report.html"
93
+ },
94
+ json: {
95
+ directory: 'json',
96
+ filename: '%{date}.json'
97
+ }
98
+ }
99
+ })
100
+ ```
65
101
 
66
102
  ## Development
67
103