how_is 24.0.0 → 25.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/.github_changelog_generator +0 -1
  3. data/.rubocop.yml +37 -12
  4. data/.travis.yml +6 -3
  5. data/CHANGELOG.md +56 -0
  6. data/CONTRIBUTING.md +34 -0
  7. data/Gemfile +8 -4
  8. data/ISSUES.md +30 -54
  9. data/README.md +16 -91
  10. data/Rakefile +3 -31
  11. data/bin/prerelease-generate-changelog +1 -1
  12. data/bin/setup +0 -0
  13. data/build-debug.rb +20 -0
  14. data/exe/how_is +25 -22
  15. data/fixtures/vcr_cassettes/how-is-example-empty-repository.yml +334 -1
  16. data/fixtures/vcr_cassettes/how-is-example-repository.yml +350 -1
  17. data/fixtures/vcr_cassettes/how-is-from-config-frontmatter.yml +15234 -1
  18. data/fixtures/vcr_cassettes/how-is-how-is-travis-api-repos-builds.yml +2694 -1
  19. data/fixtures/vcr_cassettes/how-is-with-config-file.yml +15234 -1
  20. data/fixtures/vcr_cassettes/how_is_contributions_additions_count.yml +70 -1
  21. data/fixtures/vcr_cassettes/how_is_contributions_all_contributors.yml +70 -1
  22. data/fixtures/vcr_cassettes/how_is_contributions_changed_files.yml +70 -1
  23. data/fixtures/vcr_cassettes/how_is_contributions_changes.yml +70 -1
  24. data/fixtures/vcr_cassettes/how_is_contributions_commits.yml +70 -1
  25. data/fixtures/vcr_cassettes/how_is_contributions_compare_url.yml +70 -1
  26. data/fixtures/vcr_cassettes/how_is_contributions_default_branch.yml +70 -1
  27. data/fixtures/vcr_cassettes/how_is_contributions_deletions_count.yml +70 -1
  28. data/fixtures/vcr_cassettes/how_is_contributions_new_contributors.yml +70 -1
  29. data/fixtures/vcr_cassettes/how_is_contributions_summary.yml +70 -1
  30. data/fixtures/vcr_cassettes/how_is_contributions_summary_2.yml +70 -1
  31. data/how_is.gemspec +12 -6
  32. data/lib/how_is/cacheable.rb +71 -0
  33. data/lib/how_is/cli.rb +121 -124
  34. data/lib/how_is/config.rb +123 -0
  35. data/lib/how_is/constants.rb +9 -0
  36. data/lib/how_is/date_time_helpers.rb +48 -0
  37. data/lib/how_is/frontmatter.rb +14 -9
  38. data/lib/how_is/report.rb +86 -58
  39. data/lib/how_is/report_collection.rb +113 -0
  40. data/lib/how_is/sources/ci/appveyor.rb +88 -0
  41. data/lib/how_is/sources/ci/travis.rb +159 -0
  42. data/lib/how_is/sources/github/contributions.rb +169 -128
  43. data/lib/how_is/sources/github/issue_fetcher.rb +148 -0
  44. data/lib/how_is/sources/github/issues.rb +86 -235
  45. data/lib/how_is/sources/github/pulls.rb +19 -18
  46. data/lib/how_is/sources/github.rb +40 -18
  47. data/lib/how_is/sources/github_helpers.rb +8 -91
  48. data/lib/how_is/sources.rb +2 -0
  49. data/lib/how_is/template.rb +9 -0
  50. data/lib/how_is/templates/contributions_partial.html +1 -0
  51. data/lib/how_is/templates/{issues_or_pulls_partial.html_template → issues_or_pulls_partial.html} +0 -0
  52. data/lib/how_is/templates/new_contributors_partial.html +5 -0
  53. data/lib/how_is/templates/{report.html_template → report.html} +0 -8
  54. data/lib/how_is/templates/{report_partial.html_template → report_partial.html} +3 -3
  55. data/lib/how_is/text.rb +26 -0
  56. data/lib/how_is/version.rb +2 -1
  57. data/lib/how_is.rb +33 -60
  58. metadata +28 -47
  59. data/.hound.yml +0 -2
  60. data/.rubocop_todo.yml +0 -21
  61. data/lib/how_is/sources/travis.rb +0 -37
  62. data/roadmap.markdown +0 -82
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 929a77a2520bd87d7067b5b9e0af99199d8d45f16056f105e3cdefc9da7475b5
4
- data.tar.gz: d49f3e59bc73ea1b2edd90ca0524e1c38c0e619b29795e57005973652adf8b37
3
+ metadata.gz: 1ac0ac76cee46ed40ee1b30ea3bc0fff1d2697c392739bee78914037db2b8363
4
+ data.tar.gz: e30ca45420ea7e194521ab801f783363e4e8d62f1e5dc18bffbb0f5b90876ded
5
5
  SHA512:
6
- metadata.gz: 0c731eb03f270014a8b48bbeb5fa24b5cb1e5602ae700f58ba9ab72b47afee5a3fa645b9fb191717ceea5457610752510e9909c4c0feafc8383e6cedb52c56fe
7
- data.tar.gz: b026dcd32d434658c9b4acfd7679d2971adbb0a72c1523198f98f8940afd9f47626f9d1b854f2670d2f7ebb458c03188494aacffce4d30676a5fead0088f975b
6
+ metadata.gz: 9201750e11232cb08a17f48a7a4df7b8109dc7dd0655dfdadf6860c78661b117447654dd07d67c1cbcbbd730ce318b83395140fa69d45824875dd26e4308876b
7
+ data.tar.gz: 27a3ba1808a832a240a65214633e1599322aca4664eb4deb36adea33596c7e6a13ccca075f0b3b8f7e46d690547ffbcac4ba7c209cc629d82c1b4d0d0fd2a288
@@ -1,3 +1,2 @@
1
1
  user=how-is
2
2
  project=how_is
3
-
data/.rubocop.yml CHANGED
@@ -1,29 +1,30 @@
1
- inherit_from: .rubocop_todo.yml
2
-
3
1
  AllCops:
4
2
  DisplayCopNames: true
5
3
  DisplayStyleGuide: true
6
- TargetRubyVersion: 2.3
4
+ TargetRubyVersion: 2.4
7
5
  Exclude:
8
6
  - 'how_is.gemspec'
9
7
  - 'bin/*'
10
8
  - '**/*~'
11
9
  - 'spec/capture_warnings.rb'
12
- - 'lib/how_is/cli.rb' # FIXME: Make HowIs::CLI.parse not a disaster.
13
10
 
14
11
  # Exceptions should inherit from StandardError.
15
12
  # (RuboCop default is to inherit from RuntimeError.)
16
13
  Lint/InheritException:
17
14
  EnforcedStyle: standard_error
18
15
 
16
+ Metrics/AbcSize:
17
+ Max: 17
18
+
19
19
  Metrics/BlockLength:
20
20
  Exclude:
21
21
  - 'spec/**/*_spec.rb'
22
22
 
23
23
 
24
- # The guiding principle of classes is SRP, SRP can't be accurately measured by LoC
25
- #Metrics/ClassLength:
26
- # Max: 1500
24
+ # Getting this back to the default of 100 would be nice,
25
+ # but the few cases that exceed it don't seem overly concerning.
26
+ Metrics/ClassLength:
27
+ Max: 130
27
28
 
28
29
  # Still try for 80, but we'll allow 110 because there's a not-insignificant
29
30
  # number of cases where we have long lines.
@@ -36,7 +37,7 @@ Metrics/LineLength:
36
37
  # Too short methods lead to extraction of single-use methods, which can make
37
38
  # the code easier to read (by naming things), but can also clutter the class
38
39
  Metrics/MethodLength:
39
- Max: 20
40
+ Max: 25
40
41
 
41
42
  Style/Alias:
42
43
  EnforcedStyle: prefer_alias_method
@@ -77,6 +78,9 @@ Style/BlockDelimiters:
77
78
  Style/BracesAroundHashParameters:
78
79
  Enabled: false
79
80
 
81
+ Style/ConditionalAssignment:
82
+ Enabled: false
83
+
80
84
  # Don't force use of Time or Date; DateTime is okay.
81
85
  Style/DateTime:
82
86
  Enabled: false
@@ -112,10 +116,9 @@ Style/FormatStringToken:
112
116
  EnforcedStyle: template
113
117
 
114
118
  # Freeze string literals to future-proof the code.
115
- # TODO: Enable this always. (Disabled due to not knowing what will happen.)
116
119
  Style/FrozenStringLiteralComment:
117
120
  Enabled: true
118
- #EnforcedStyle: always
121
+ EnforcedStyle: always
119
122
 
120
123
  # Mixing hash styles just looks silly.
121
124
  # http://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style/HashSyntax
@@ -162,6 +165,14 @@ Style/PreferredHashMethods:
162
165
  Style/MethodCalledOnDoEndBlock:
163
166
  Enabled: true
164
167
 
168
+ # Indent method calls relative to the receiver, e.g.:
169
+ # foo \
170
+ # .bar \
171
+ # .baz \
172
+ # .asdf
173
+ Layout/MultilineMethodCallIndentation:
174
+ EnforcedStyle: indented_relative_to_receiver
175
+
165
176
  # Indenting the chained dots beneath each other is not supported by this cop,
166
177
  # see https://github.com/bbatsov/rubocop/issues/1633
167
178
  Layout/MultilineOperationIndentation:
@@ -172,13 +183,27 @@ Layout/SpaceInsideHashLiteralBraces:
172
183
  Enabled: true
173
184
  EnforcedStyle: no_space
174
185
 
186
+ # I find "foo > 0" more readable than "foo.positive?" personally.
187
+ Style/NumericPredicate:
188
+ Enabled: false
189
+
190
+ # https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style/RegexpLiteral
191
+ Style/RegexpLiteral:
192
+ Enabled: false
193
+
175
194
  # Use double quotes everywhere by default.
176
195
  Style/StringLiterals:
177
196
  EnforcedStyle: double_quotes
178
197
 
179
- # TODO: Maybe make it so you have to do [:foo, :bar] not %i[foo bar]?
198
+ # Prefer [:foo, :bar] over %i[foo bar].
180
199
  Style/SymbolArray:
181
- Enabled: false
200
+ Enabled: true
201
+ EnforcedStyle: brackets
202
+
203
+ # Prefer ["foo", "bar"] over %w[foo bar].
204
+ Style/WordArray:
205
+ Enabled: true
206
+ EnforcedStyle: brackets
182
207
 
183
208
  # Require parentheses around complex ternary conditions.
184
209
  Style/TernaryParentheses:
data/.travis.yml CHANGED
@@ -1,8 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.3.3
4
- - 2.4.1
5
- - 2.5.0
3
+ - 2.4
4
+ - 2.5
5
+ - 2.6
6
6
  - ruby-head
7
7
 
8
8
  matrix:
@@ -10,6 +10,9 @@ matrix:
10
10
  - rvm:
11
11
  - ruby-head
12
12
 
13
+ before_install:
14
+ - gem install bundler
15
+
13
16
  # See https://bors.tech/documentation/getting-started/
14
17
  branches:
15
18
  only:
data/CHANGELOG.md CHANGED
@@ -1,10 +1,66 @@
1
1
  # Change Log
2
2
 
3
+ ## [v25.0.0](https://github.com/how-is/how_is/tree/v25.0.0) (2019-04-26)
4
+ [Full Changelog](https://github.com/how-is/how_is/compare/v24.0.0...v25.0.0)
5
+
6
+ **Closed issues:**
7
+
8
+ - Image example of report.html [\#260](https://github.com/how-is/how_is/issues/260)
9
+ - Add ReportCollection\#save\_all [\#257](https://github.com/how-is/how_is/issues/257)
10
+ - Show progress while generating reports [\#255](https://github.com/how-is/how_is/issues/255)
11
+ - Use config file instead of env vars [\#253](https://github.com/how-is/how_is/issues/253)
12
+ - Include new contributors in reports [\#248](https://github.com/how-is/how_is/issues/248)
13
+ - Alternative to "Issues Per Label" section [\#245](https://github.com/how-is/how_is/issues/245)
14
+ - Remove "Issues per Label" section. [\#244](https://github.com/how-is/how_is/issues/244)
15
+ - Refactor how\_is/cli.rb [\#243](https://github.com/how-is/how_is/issues/243)
16
+ - Refactor Sources::Github.basic\_auth [\#241](https://github.com/how-is/how_is/issues/241)
17
+ - Travis CI: Configure HOWIS\_BASIC\_AUTH et al [\#240](https://github.com/how-is/how_is/issues/240)
18
+ - "Issues per label" missing issues. [\#230](https://github.com/how-is/how_is/issues/230)
19
+ - resolve codeclimate issues [\#227](https://github.com/how-is/how_is/issues/227)
20
+ - no implicit conversion of nil into String \(TypeError\) [\#222](https://github.com/how-is/how_is/issues/222)
21
+ - Document PR process [\#198](https://github.com/how-is/how_is/issues/198)
22
+ - Better visualization of 'Issues Per Label' section [\#152](https://github.com/how-is/how_is/issues/152)
23
+ - Exporting to HTML file returns HTML partial [\#151](https://github.com/how-is/how_is/issues/151)
24
+ - Track data over time [\#111](https://github.com/how-is/how_is/issues/111)
25
+ - group Issues Per Label by category type [\#71](https://github.com/how-is/how_is/issues/71)
26
+ - Use authentication [\#6](https://github.com/how-is/how_is/issues/6)
27
+
28
+ **Merged pull requests:**
29
+
30
+ - Version bump to v25.0.0. [\#269](https://github.com/how-is/how_is/pull/269) ([duckinator](https://github.com/duckinator))
31
+ - Multi repo configs [\#268](https://github.com/how-is/how_is/pull/268) ([duckinator](https://github.com/duckinator))
32
+ - Remove dead code. [\#266](https://github.com/how-is/how_is/pull/266) ([duckinator](https://github.com/duckinator))
33
+ - yay documentation! [\#265](https://github.com/how-is/how_is/pull/265) ([duckinator](https://github.com/duckinator))
34
+ - Add caching mechanism to speed up duplicate runs [\#263](https://github.com/how-is/how_is/pull/263) ([jules2689](https://github.com/jules2689))
35
+ - README: Add screenshot [\#261](https://github.com/how-is/how_is/pull/261) ([olleolleolle](https://github.com/olleolleolle))
36
+ - Clean up reports [\#259](https://github.com/how-is/how_is/pull/259) ([duckinator](https://github.com/duckinator))
37
+ - Refactor; support config files. [\#254](https://github.com/how-is/how_is/pull/254) ([duckinator](https://github.com/duckinator))
38
+ - HowIs::CLI refactor [\#252](https://github.com/how-is/how_is/pull/252) ([duckinator](https://github.com/duckinator))
39
+ - update build-debug.rb script [\#251](https://github.com/how-is/how_is/pull/251) ([duckinator](https://github.com/duckinator))
40
+ - update supported Ruby versions [\#250](https://github.com/how-is/how_is/pull/250) ([duckinator](https://github.com/duckinator))
41
+ - Misc cleanup [\#249](https://github.com/how-is/how_is/pull/249) ([duckinator](https://github.com/duckinator))
42
+ - Refactor GitHub authentication [\#247](https://github.com/how-is/how_is/pull/247) ([duckinator](https://github.com/duckinator))
43
+ - Document PR and issue management processes. [\#246](https://github.com/how-is/how_is/pull/246) ([duckinator](https://github.com/duckinator))
44
+ - Skip tests that require an access token if running as a PR build. [\#242](https://github.com/how-is/how_is/pull/242) ([duckinator](https://github.com/duckinator))
45
+ - README: fix typo [\#239](https://github.com/how-is/how_is/pull/239) ([olleolleolle](https://github.com/olleolleolle))
46
+ - Enable the executable flag \(chmod +x\) for bin/setup [\#238](https://github.com/how-is/how_is/pull/238) ([olleolleolle](https://github.com/olleolleolle))
47
+ - Only throw errors for undefined env vars if they're used. [\#237](https://github.com/how-is/how_is/pull/237) ([duckinator](https://github.com/duckinator))
48
+ - README: Drop Gemnasium badge [\#236](https://github.com/how-is/how_is/pull/236) ([olleolleolle](https://github.com/olleolleolle))
49
+ - Rubocop-related cleanup [\#235](https://github.com/how-is/how_is/pull/235) ([duckinator](https://github.com/duckinator))
50
+ - Refactor cli [\#234](https://github.com/how-is/how_is/pull/234) ([duckinator](https://github.com/duckinator))
51
+ - Refactor 2 [\#233](https://github.com/how-is/how_is/pull/233) ([duckinator](https://github.com/duckinator))
52
+ - Fix Rubocop warnings. [\#232](https://github.com/how-is/how_is/pull/232) ([duckinator](https://github.com/duckinator))
53
+ - Refactor [\#231](https://github.com/how-is/how_is/pull/231) ([duckinator](https://github.com/duckinator))
54
+ - Miscellaneous cleanup. [\#229](https://github.com/how-is/how_is/pull/229) ([duckinator](https://github.com/duckinator))
55
+ - CLI Refactor [\#228](https://github.com/how-is/how_is/pull/228) ([duckinator](https://github.com/duckinator))
56
+ - \[WIP\] Collect CI information. [\#226](https://github.com/how-is/how_is/pull/226) ([duckinator](https://github.com/duckinator))
57
+
3
58
  ## [v24.0.0](https://github.com/how-is/how_is/tree/v24.0.0) (2018-03-17)
4
59
  [Full Changelog](https://github.com/how-is/how_is/compare/v23.0.0...v24.0.0)
5
60
 
6
61
  **Merged pull requests:**
7
62
 
63
+ - bump version to v24.0.0; add json dependency; add future\_changelog Rake task [\#225](https://github.com/how-is/how_is/pull/225) ([duckinator](https://github.com/duckinator))
8
64
  - Improve error output; update README. [\#224](https://github.com/how-is/how_is/pull/224) ([duckinator](https://github.com/duckinator))
9
65
  - update .travis.yml. [\#223](https://github.com/how-is/how_is/pull/223) ([duckinator](https://github.com/duckinator))
10
66
 
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,34 @@
1
+ # How to contribute
2
+
3
+ Want to contribute to HowIs? This document has the information you need
4
+ to make sure the process goes smoothly.
5
+
6
+ By contributing to this project, you agree to follow our
7
+ [Code of Conduct](https://github.com/how-is/how_is/blob/master/CODE_OF_CONDUCT.md).
8
+
9
+ ## Guidelines
10
+
11
+ 2. New features should be paired with tests.
12
+ 3. Ensure your code follows our general code style.
13
+ * Run `bundle exec rubocop` to check for any violations.
14
+ 4. Don't modify the CHANGELOG or version number.
15
+ 5. If you need feedback or assistance, feel free to join us on Slack
16
+ (http://slack.bundler.io/) or open an issue on GitHub
17
+ (https://github.com/how-is/how_is).
18
+
19
+ ## Getting started
20
+
21
+ ```
22
+ $ bundle install
23
+ $ bundle exec rake test
24
+ ```
25
+
26
+ Then, to run how_is commands, simply run `bundle exec how_is <args>`.
27
+
28
+ ## Issues
29
+
30
+ HowIs uses the GitHub issue tracker for tracking bugs and feature
31
+ requests.
32
+
33
+ For more details, including information on the various labels we use, see
34
+ [ISSUES.md](https://github.com/how-is/how_is/blob/master/ISSUES.md).
data/Gemfile CHANGED
@@ -2,10 +2,14 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- # how_is only supports Ruby versions receiving general bug fixes ("normal
6
- # maintenance"). This should be updated when a Ruby version goes into security
7
- # maintenance. Ruby maintenance: https://www.ruby-lang.org/en/downloads/branches/
8
- ruby "~> 2.3"
5
+ # how_is only supports Ruby versions under "normal maintenance".
6
+ # This number should be updated when a Ruby version goes into security
7
+ # maintenance.
8
+ #
9
+ # Ruby maintenance info: https://www.ruby-lang.org/en/downloads/branches/
10
+ #
11
+ # NOTE: Update how_is.gemspec when this is updated!
12
+ ruby "~> 2.4"
9
13
 
10
14
  # Specify your gem's dependencies in how_is.gemspec
11
15
  gemspec
data/ISSUES.md CHANGED
@@ -1,86 +1,62 @@
1
1
  # Issue Management
2
2
 
3
- The goal of issue management is to organize the work that needs to be
4
- done when working on a project, by allowing users to report bugs,
5
- request features or documentation, and start discussions.
3
+ This document explains what labels on a given issue mean, or to help you
4
+ choose labels for new/updated issues.
6
5
 
7
- To simplify that task, issues have _labels_. The purpose of labels is to
8
- group issues in ways developers find useful. The obvious examples being
9
- bug reports and feature requests.
10
-
11
- This document is intended as a guide to help you understand what labels
12
- on a given issue mean, or to help you choose labels for a new issue.
13
-
14
- Labels on this repository are grouped, using the section before the
15
- first colon in an issue name.
16
-
17
- Issue groups:
18
-
19
- * [(ungrouped)](#ungrouped)
20
- * [category](#categories)
21
- * [closed](#closed)
22
- * [size](#size)
23
- * [status](#status)
24
- * [type](#type)
6
+ We use an issue tracker to organize and prioritize work by allowing users
7
+ to report bugs, request features or documentation, and start discussions.
25
8
 
26
9
  ---
27
10
 
28
- ## (ungrouped)
29
-
30
- ### blocked
31
-
32
- An issue which can't be worked on until some other work is finished.
33
- If an issue has this label, it _should_ (but, unfortunately, may not)
34
- have an explanation of what other work needs to be done before it can be
35
- worked on.
36
-
37
- ### duplicate
11
+ ## high priority
38
12
 
39
- A duplicate issue.
13
+ An issue that should be resolved as soon as possible.
40
14
 
41
- ### in progress
15
+ ## in progress
42
16
 
43
17
  An issue which is currently being worked on. This should be added when
44
18
  someone begins work on an issue.
45
19
 
46
- ### ready
20
+ ## ready
47
21
 
48
22
  An issue which is ready to be worked on. This should be removed when
49
23
  someone begins work on an issue.
50
24
 
51
- ## categories
25
+ ## size: large
52
26
 
53
- ### category: export
27
+ An issue which is expected to take a large amount of effort to resolve.
54
28
 
55
- Issues relating to exporting reports.
29
+ ## size: small
56
30
 
57
- ## size
31
+ An issue which is expected to be relatively simple to resolve.
58
32
 
59
- ### size: small
33
+ ## type: bug report
60
34
 
61
- An issue which should, at least in theory, be relatively simple to
62
- resolve.
35
+ A bug report.
63
36
 
64
- ### size: large
37
+ ## type: documentation
65
38
 
66
- An issue which is expected to take a large amount of effort to resolve.
39
+ A request for additional or updated documentation.
67
40
 
68
- ### size: here be dragons
41
+ ## type: feature request
69
42
 
70
- An issue which is extremely difficult, possibly impossible, to determine
71
- the actual difficulty of. It could be resolved quickly, or it could grow
72
- significantly.
43
+ A request for a new feature to be added.
73
44
 
74
- ## type
45
+ ## type: question/discussion
75
46
 
76
- ### type: bug report
47
+ A question or discussion. Issues with this label are likely to not have
48
+ any immediately-actionable tasks.
77
49
 
78
- A bug report.
50
+ When any tasks do arise from an issue with this label, more specific
51
+ issues will likely be opened to replace it.
79
52
 
80
- ### type: feature request
53
+ ## type: refactoring
81
54
 
82
- A request for a new feature to be added.
55
+ A request for a particular section of code to be refactored.
56
+
57
+ Including concrete suggestions for smaller areas will likely get these
58
+ issues resolved more quickly.
83
59
 
84
- ### type: question
60
+ ## type: tests
85
61
 
86
- An issue which is a question or discussion.
62
+ A request for new or improved tests addressing specific situations.
data/README.md CHANGED
@@ -2,9 +2,9 @@
2
2
  [![Travis](https://img.shields.io/travis/how-is/how_is.svg)](https://travis-ci.org/how-is/how_is)
3
3
  [![Code Climate](https://img.shields.io/codeclimate/github/how-is/how_is.svg)](https://codeclimate.com/github/how-is/how_is)
4
4
  [![Gem](https://img.shields.io/gem/v/how_is.svg)](https://rubygems.org/gems/how_is)
5
- [![Gemnasium](https://img.shields.io/gemnasium/how-is/how_is.svg)](https://gemnasium.com/github.com/how-is/how_is)
5
+ [Documentation](https://how-is.github.io)
6
6
 
7
- # How is [your repo]?
7
+ # How is [your project]?
8
8
 
9
9
  `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.
10
10
 
@@ -18,10 +18,8 @@ If you want to contribute or discuss how_is, you can [join Bundler's slack](http
18
18
 
19
19
  ## Configuration
20
20
 
21
- HowIs can hit the default API limits for GitHub for even small reports.
22
-
23
21
  To avoid errors due to hitting rate limits, HowIs requires a Personal
24
- Access Token, which GitHub provides with higher rate limits.
22
+ Access Token for GitHub.
25
23
 
26
24
  ### Acquiring A Personal Access Token
27
25
 
@@ -37,30 +35,27 @@ To acquire a personal access token:
37
35
 
38
36
  #### Using The Token
39
37
 
40
- You now need to define the `HOWIS_GITHUB_TOKEN` and `HOWIS_BASIC_AUTH`
41
- variables.
42
-
43
- An example of how to do so for the Bash shell is provided below.
44
-
45
- Make sure to replaceall instances of `<TOKEN>` with the actual token,
46
- and `<USERNAME>` with your GitHub username.
38
+ Create a file in `~/.config/how_is/config.yml`:
47
39
 
48
- ```bash
49
- export HOWIS_GITHUB_TOKEN=<TOKEN>
50
- export HOWIS_BASIC_AUTH="<USERNAME>:<TOKEN>"
40
+ ```
41
+ sources/github:
42
+ username: <USERNAME>
43
+ token: <TOKEN>
51
44
  ```
52
45
 
46
+ Make sure to replace `<TOKEN>` with the actual token, and `<USERNAME>`
47
+ with your GitHub username.
53
48
 
54
49
  ## Usage
55
50
 
56
51
  ### Command Line
57
52
 
58
- $ how_is REPOSITORY DATE [--output OUTPUT_FILENAME]
53
+ $ how_is --repository REPOSITORY --date DATE [--output OUTPUT_FILENAME]
59
54
  # OUTPUT_FILENAME defaults to ./report.html.
60
55
 
61
56
  or
62
57
 
63
- $ how_is REPOSITORY --config CONFIG_FILENAME
58
+ $ how_is --date DATE --config CONFIG_FILENAME
64
59
 
65
60
  #### Example \#1
66
61
 
@@ -72,85 +67,15 @@ December 01 2016, and saves it as `./report-2016-12-01.html`.
72
67
 
73
68
  #### Example \#2
74
69
 
75
- $ how_is 2016-12-01 --config some-config.yml
70
+ $ how_is --date 2016-12-01 --config some-config.yml
76
71
 
77
- Generates the report(s) specified in the config file, for the period
72
+ This generates the report(s) specified in the config file, for the period
78
73
  from November 01 2016 to December 01 2016, and saves them in the
79
74
  locations specified in the config file.
80
75
 
81
- #### Generating reports from a config file
82
-
83
- You can also create a config file and run
84
- `how_is --config YAML_CONFIG_FILE_PATH`.
85
-
86
- E.g., if the config file is `how_is.yml`, you would run
87
- `how_is --config how_is.yml`.
88
-
89
- Below is an example config file, [from the how-is/manual-reports
90
- repository](https://raw.githubusercontent.com/how-is/manual-reports/gh-pages/how-is-configs/01-rubygems-rubygems.yml).
91
-
92
- ```yaml
93
- repository: rubygems/rubygems
94
- reports:
95
- html:
96
- directory: rubygems/_posts
97
- frontmatter:
98
- title: "%{date} Report"
99
- layout: default
100
- filename: "%{date}-report.html"
101
- json:
102
- directory: json/rubygems
103
- filename: "%{date}.json"
104
- ```
76
+ #### Screenshot
105
77
 
106
- The config file is a YAML file. The two root keys are `repository`
107
- and `reports`.
108
-
109
- `reports` is a hash of key/value pairs, with the keys being the type of report
110
- ("html" or "json") and the values being another hash.
111
-
112
- That hash can have the following keys: `directory` (the directory to place the
113
- report in), `filename` (the format string for filenames), and (optionally)
114
- `frontmatter`.
115
-
116
- `frontmatter` is a set of key/value pairs specifying frontmatter as used by
117
- various blog engines (e.g. Jekyll), so you can set the title, layout, etc of
118
- the page.
119
-
120
- Every value under `reports` is a format string, so you can do e.g.
121
- `filename: "%{date}-report.html"` or (under `frontmatter`)
122
- `title: "%{date} Report"`.
123
-
124
- ### Ruby API
125
-
126
- ```ruby
127
- # Generate an HTML report for rubygems/rubygems, for December 01
128
- # 2017, and save it to report.html:
129
- report = HowIs.new("rubygems/rubygems", "2017-12-01").to_html
130
- report.save_as("report.html")
131
-
132
- # Generate a report from a config Hash.
133
- reports = HowIs.from_config({
134
- repository: 'rubygems/rubygems',
135
- reports: {
136
- html: {
137
- directory: '_posts',
138
- frontmatter: {
139
- title: '%{date} Report',
140
- layout: 'default'
141
- },
142
- filename: "%{date}-report.html"
143
- },
144
- json: {
145
- directory: 'json',
146
- filename: '%{date}.json'
147
- }
148
- }
149
- }, "2017-12-01")
150
- # Save all of the rports.
151
- # This assumes all of the directories the files go in already exist!
152
- reports.map {|file, report| File.write(file, report) }
153
- ```
78
+ ![image](https://user-images.githubusercontent.com/211/55504154-89284180-5650-11e9-9a13-e03e9b83c749.png)
154
79
 
155
80
  ## Development
156
81
 
data/Rakefile CHANGED
@@ -59,9 +59,9 @@ end
59
59
  namespace :generate_reports do
60
60
  desc "Generate example HTML reports."
61
61
  task :html do
62
- %w[
63
- how-is/example-repository
64
- how-is/example-empty-repository
62
+ [
63
+ "how-is/example-repository",
64
+ "how-is/example-empty-repository",
65
65
  ].each do |repo|
66
66
  HelperFunctions.generate_report(repo, "html")
67
67
  end
@@ -74,31 +74,3 @@ namespace :generate_reports do
74
74
 
75
75
  task :all => [:html, :json]
76
76
  end
77
-
78
- desc "List new contributors. Lists committers with no earlier commits then "\
79
- "given start_date (as %Y-%m-%d). Defaults to first of current month."
80
- task :new_contributors, [:user, :repo, :start_date] => [] do |_t, args|
81
- require "how_is/contributions"
82
- user = args[:user] || "how-is"
83
- repo = args[:repo] || "how_is"
84
- start_date = args[:start_date] || Time.now.strftime("%Y-%m-01")
85
-
86
- contributions = HowIs::Contributions.new(start_date: start_date,
87
- user: user,
88
- repo: repo)
89
-
90
- puts "New committers:"
91
- puts contributions.summary
92
- puts contributions.new_contributors
93
- end
94
-
95
- desc "Display duration of latest CI build. CI builds supported include Travis."
96
- task :test_execution_time, [:user, :repo] => [] do |_t, args|
97
- require "how_is/builds"
98
- user = args[:user] || "how-is"
99
- repo = args[:repo] || "how_is"
100
- builds = HowIs::Builds.new(user: user, repo: repo)
101
-
102
- puts "Test execution information:"
103
- puts builds.summary
104
- end
@@ -8,7 +8,7 @@ SCRIPT_DIR="$(dirname $(readlink -f $0))" # Directory this script is in.
8
8
  cd "$SCRIPT_DIR/.."
9
9
 
10
10
  LAST_RELEASE="$(git tag --list | cut -d 'v' -f 2 | sort -n | tail -n 1)"
11
- NEXT_RELEASE=$(cat lib/$PROJECT/version.rb | grep '^\s*VERSION\s*' | cut -d '"' -f 2)
11
+ NEXT_RELEASE=$(cat lib/$PROJECT/version.rb | grep '^\s*VERSION\s*=\s*' | cut -d '"' -f 2)
12
12
 
13
13
  if [ -z "$LAST_RELEASE" ]; then
14
14
  echo "error: Could not find latest release using \`git tag --list\`"
data/bin/setup CHANGED
File without changes
data/build-debug.rb ADDED
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # frozen_string_literal: true
4
+
5
+ require "bundler/setup" # to avoid having to do `bundle exec ...`
6
+ require "how_is/sources/ci/travis"
7
+ require "how_is/sources/ci/appveyor"
8
+ require "pp"
9
+
10
+ travis = HowIs::Sources::CI::Travis.new("rubygems/rubygems", "2018-12-01", "2019-02-01")
11
+ builds = travis.builds
12
+ puts "Number of builds: #{builds.length}"
13
+ puts "First build: #{builds.first['html_url']} (#{builds.first['started_at'].rfc3339})"
14
+ puts "Last build: #{builds.last['html_url']} (#{builds.last['started_at'].rfc3339})"
15
+
16
+ appveyor = HowIs::Sources::CI::Appveyor.new("rubygems/rubygems", "2018-12-01", "2019-02-01")
17
+ builds = appveyor.builds
18
+ puts "Number of builds: #{builds.length}"
19
+ puts "First build: #{builds.first['html_url']} (#{builds.first['started_at'].rfc3339})"
20
+ puts "Last build: #{builds.last['html_url']} (#{builds.last['started_at'].rfc3339})"