how_is 11.0.0 → 12.0.0
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/.rspec +0 -4
- data/.travis.yml +1 -4
- data/CHANGELOG.md +24 -0
- data/README.md +21 -7
- data/Rakefile +50 -18
- data/fixtures/vcr_cassettes/how-is-example-empty-repository.yml +946 -0
- data/fixtures/vcr_cassettes/how-is-example-repository.yml +956 -0
- data/fixtures/vcr_cassettes/how-is-with-config-file.yml +23877 -0
- data/lib/how_is/analyzer.rb +17 -2
- data/lib/how_is/report/base_report.rb +129 -0
- data/lib/how_is/report/html.rb +27 -13
- data/lib/how_is/report/json.rb +4 -2
- data/lib/how_is/report.rb +2 -87
- data/lib/how_is/version.rb +1 -1
- metadata +7 -6
- data/.rspec-ignore-tags +0 -2
- data/fixtures/vcr_cassettes/how_is-example-repository.yml +0 -951
- data/fixtures/vcr_cassettes/how_is-with-config-file.yml +0 -23582
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f94a1942844fecd5d67a87e5bcfa10fa8cfb9218
|
4
|
+
data.tar.gz: 71f9b9df67822471f710bb78ecec7e8ce7e7c219
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ed0992ecdf4d9a7f4b0351ede0961e3daa82a33d759652b20643b7238fcc515487a4b820c0e4643c95e60f9ee76e1a88566c83f5ea115e4298a24b1b9cac425
|
7
|
+
data.tar.gz: 1fbe9fd60239c6f478164ffc3feb2e890053a87c7fd44e7cb821da869ca976f881b5c368948c00d9c48f7b4cdd87b6396d35ef039b7ff6ed9f9c2bc51822af10
|
data/.rspec
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -9,6 +9,30 @@ this project adheres to [Semantic Versioning](http://semver.org).
|
|
9
9
|
|
10
10
|
(Nothing so far.)
|
11
11
|
|
12
|
+
## [v12.0.0]
|
13
|
+
|
14
|
+
This release largely focused on refactoring and developer experience
|
15
|
+
improvements (e.g. adding Rake tasks and improving the generated JSON and HTML).
|
16
|
+
|
17
|
+
Pull Requests for this release can be [viewed on
|
18
|
+
GitHub](https://github.com/how-is/how_is/pulls?utf8=&q=is%3Apr%20created%3A2016-11-11..2016-12-11).
|
19
|
+
|
20
|
+
### Added
|
21
|
+
|
22
|
+
- Include newest PR/issue in reports.
|
23
|
+
([#85](https://github.com/how-is/how_is/pull/85))
|
24
|
+
|
25
|
+
### Changed
|
26
|
+
|
27
|
+
- Refactoring. ([#79](https://github.com/how-is/how_is/pull/79), [#80](https://github.com/how-is/how_is/pull/80), [#82](https://github.com/how-is/how_is/pull/82), [#88](https://github.com/how-is/how_is/pull/88))
|
28
|
+
- JSON and HTML reports have nicer source.
|
29
|
+
([#82](https://github.com/how-is/how_is/pulls/82),
|
30
|
+
[#84](https://github.com/how-is/how_is/pulls/84))
|
31
|
+
- Handle generating a report on a repository with no open issues.
|
32
|
+
([#92](https://github.com/how-is/how_is/pull/92))
|
33
|
+
- Add Rake tasks to make development easier. ([#86](https://github.com/how-is/how_is/pull/86), [#94](https://github.com/how-is/how_is/pull/94), [#96](https://github.com/how-is/how_is/pull/96))
|
34
|
+
- PR/issue info is now displayed as lists instead of paragraphs. ([#83](https://github.com/how-is/how_is/pull/83))
|
35
|
+
|
12
36
|
## [11.0.0]
|
13
37
|
|
14
38
|
### Added
|
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
# How is [your repo]?
|
5
5
|
|
6
|
-
`how_is` is tool for generating summaries of the health of a codebase. It uses information available from issues and pull requests to provide an overview of a repository and highlight problem areas of the codebase.
|
6
|
+
`how_is` is tool for generating summaries of the health of a codebase hosted on GitHub. It uses information available from issues and pull requests to provide an overview of a repository and highlight problem areas of the codebase.
|
7
7
|
|
8
8
|
The summary includes:
|
9
9
|
|
@@ -37,11 +37,24 @@ The above command creates a HTML file containing the summary at `./report.html`.
|
|
37
37
|
#### Generating reports from a config file
|
38
38
|
|
39
39
|
Beyond the above, you can also create a config file — typically called
|
40
|
-
how_is.yml — and run `how_is --config YAML_CONFIG_FILE`.
|
41
|
-
file is
|
42
|
-
|
43
|
-
|
44
|
-
|
40
|
+
how_is.yml — and run `how_is --config YAML_CONFIG_FILE`. (E.g., if
|
41
|
+
the config file is how_is.yml, you would run `how_is --config how_is.yml`.)
|
42
|
+
|
43
|
+
Below is an example config file, [from the how-is-rubygems repository](https://github.com/how-is/how-is-rubygems/blob/gh-pages/how_is.yml).
|
44
|
+
|
45
|
+
```yaml
|
46
|
+
repository: rubygems/rubygems
|
47
|
+
reports:
|
48
|
+
html:
|
49
|
+
directory: _posts
|
50
|
+
frontmatter:
|
51
|
+
title: "%{date} Report"
|
52
|
+
layout: default
|
53
|
+
filename: "%{date}-report.html"
|
54
|
+
json:
|
55
|
+
directory: json
|
56
|
+
filename: "%{date}.json"
|
57
|
+
```
|
45
58
|
|
46
59
|
The config file is a YAML file. The two root keys are `repository` (the
|
47
60
|
repository name, of format USER_OR_ORG/REPOSITORY — e.g. how-is/how_is)
|
@@ -55,7 +68,8 @@ report in), `filename` (the format string for filenames), and (optionally)
|
|
55
68
|
`frontmatter`.
|
56
69
|
|
57
70
|
`frontmatter` is a set of key/value pairs specifying frontmatter as used by
|
58
|
-
various blog engines (e.g. Jekyll), so you can set title, layout, etc
|
71
|
+
various blog engines (e.g. Jekyll), so you can set the title, layout, etc of
|
72
|
+
the page.
|
59
73
|
|
60
74
|
Every value under `reports` is a format string, so you can do e.g.
|
61
75
|
`filename: "%{date}-report.html"` or (under `frontmatter`)
|
data/Rakefile
CHANGED
@@ -1,30 +1,62 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'rspec/core/rake_task'
|
3
|
+
require 'timecop'
|
4
|
+
#require 'vcr'
|
5
|
+
require './spec/vcr_helper.rb'
|
6
|
+
require 'how_is'
|
3
7
|
|
4
8
|
RSpec::Core::RakeTask.new(:spec)
|
5
9
|
|
6
10
|
task :default => :spec
|
7
11
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
task.rspec_opts = '--tag integration'
|
12
|
+
class HelperFunctions
|
13
|
+
def self.freeze_time(&block)
|
14
|
+
date = DateTime.parse('2016-11-01').new_offset(0)
|
15
|
+
Timecop.freeze(date) do
|
16
|
+
yield
|
17
|
+
end
|
15
18
|
end
|
16
19
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
20
|
+
def self.generate_report(repository, format)
|
21
|
+
freeze_time do
|
22
|
+
report = nil
|
23
|
+
|
24
|
+
options = {
|
25
|
+
repository: repository,
|
26
|
+
format: format,
|
27
|
+
}
|
28
|
+
|
29
|
+
cassette = repository.gsub('/', '-')
|
30
|
+
VCR.use_cassette(cassette) do
|
31
|
+
report = HowIs.generate_report(**options)
|
32
|
+
end
|
33
|
+
|
34
|
+
filename = "#{cassette}-report.#{format}"
|
35
|
+
path = File.expand_path("spec/data/#{filename}", __dir__)
|
36
|
+
File.open(path, 'w') do |f|
|
37
|
+
f.puts report
|
38
|
+
# HACK: Trailing newline is missing, otherwise.
|
39
|
+
f.puts if format == 'html'
|
40
|
+
end
|
41
|
+
end
|
21
42
|
end
|
43
|
+
end
|
22
44
|
|
45
|
+
namespace :generate_reports do
|
46
|
+
desc 'Generate example HTML reports.'
|
47
|
+
task :html do
|
48
|
+
%w[
|
49
|
+
how-is/example-repository
|
50
|
+
how-is/example-empty-repository
|
51
|
+
].each do |repo|
|
52
|
+
HelperFunctions.generate_report(repo, 'html')
|
53
|
+
end
|
54
|
+
end
|
23
55
|
|
24
|
-
desc '
|
25
|
-
|
26
|
-
|
27
|
-
# Load the tagless options file
|
28
|
-
task.rspec_opts = '-O .rspec-ignore-tags'
|
56
|
+
desc 'Generate example JSON reports.'
|
57
|
+
task :json do
|
58
|
+
HelperFunctions.generate_report('how-is/example-repository', 'json')
|
29
59
|
end
|
60
|
+
|
61
|
+
task :all => [:html, :json]
|
30
62
|
end
|