how_is 21.0.0 → 22.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
  SHA256:
3
- metadata.gz: 973a137095b216856a457afd1d009ea2e5c538fa71fac17bb58d485ac82675e8
4
- data.tar.gz: be24df158f1a338d9e87ce40eb568eac9867ed32ee4102aa22d2450e3df22749
3
+ metadata.gz: 3c2eb30bb4b2e803b3387c09c7b87b24b915be2e39f0386646e4f47bfccb5a8a
4
+ data.tar.gz: ebd6e16d9a112ff3d58dbeb3969b0ab35b23bfd47dac055bc0d546b6cc79ed8d
5
5
  SHA512:
6
- metadata.gz: aff1859c734b5c6717c5bb3f1363e969eab9fc11836f56b7aa60eadee89593c4865dd255becfc3cabefba246fe622c06aad011bef2b50588307310bb792ec037
7
- data.tar.gz: 3279378598d6ba4e904b4b7c15cb4dd3d60ef0beb72933269f0e4455f70266b7e0bfbb617f7f600c851079da442fca2364f5f973c232fcc44f7d33d889393acb
6
+ metadata.gz: f5081c88ff5151a3ba270f8d3ed4bbd6cd63a88f3040c00a1d3b9f398a85c1c020513fee407923a25719d132e5b3b5d710bda249e80c9419ae31fc9a085a178e
7
+ data.tar.gz: 9fd4b6813e41217bffa5c46b596d49b8164c9dab55f73e0ab3347a16890b02f8780f73e0fd82ce16d04c9f9b3cd236b3b1354e887051a0176d7381253ac9bdc6
data/CHANGELOG.md CHANGED
@@ -1,10 +1,18 @@
1
1
  # Change Log
2
2
 
3
+ ## [v22.0.0](https://github.com/how-is/how_is/tree/v22.0.0) (2018-01-19)
4
+ [Full Changelog](https://github.com/how-is/how_is/compare/v21.0.0...v22.0.0)
5
+
6
+ **Merged pull requests:**
7
+
8
+ - Update readme [\#219](https://github.com/how-is/how_is/pull/219) ([duckinator](https://github.com/duckinator))
9
+
3
10
  ## [v21.0.0](https://github.com/how-is/how_is/tree/v21.0.0) (2018-01-19)
4
11
  [Full Changelog](https://github.com/how-is/how_is/compare/v20.0.0...v21.0.0)
5
12
 
6
13
  **Merged pull requests:**
7
14
 
15
+ - Release v21.0.0 [\#218](https://github.com/how-is/how_is/pull/218) ([duckinator](https://github.com/duckinator))
8
16
  - Idempotent reports [\#217](https://github.com/how-is/how_is/pull/217) ([duckinator](https://github.com/duckinator))
9
17
 
10
18
  ## [v20.0.0](https://github.com/how-is/how_is/tree/v20.0.0) (2017-12-22)
data/README.md CHANGED
@@ -10,17 +10,6 @@
10
10
 
11
11
  Reports can be generated retroactively.
12
12
 
13
- The summary includes:
14
-
15
- * repository name,
16
- * number of open issues,
17
- * number of open pull requests,
18
- * number of open issues associated with each label and with no label,
19
- * average issue age,
20
- * average pull request age,
21
- * date oldest issue was opened,
22
- * date oldest pull request was opened.
23
-
24
13
  If you want to contribute or discuss how_is, you can [join Bundler's slack](http://slack.bundler.io/) and join the #how_is channel.
25
14
 
26
15
  ## Installation
@@ -31,42 +20,56 @@ If you want to contribute or discuss how_is, you can [join Bundler's slack](http
31
20
 
32
21
  ### Command Line
33
22
 
34
- $ how_is <orgname>/<reponame> [--output FILENAME]
23
+ $ how_is REPOSITORY DATE [--output OUTPUT_FILENAME]
24
+ # OUTPUT_FILENAME defaults to ./report.html.
25
+
26
+ or
27
+
28
+ $ how_is REPOSITORY --config CONFIG_FILENAME
29
+
35
30
 
36
- E.g.,
31
+ #### Example \#1
37
32
 
38
- $ how_is rubygems/rubygems 2016-12-01 --output report.html
33
+ $ how_is rubygems/rubygems 2016-12-01 --output report-2016-12-01.html
39
34
 
40
35
  The above command creates a HTML file containing the report for the state of
41
- the rubygems/rubygems repository, as of December 01 2016, at `./report.html`.
36
+ the rubygems/rubygems repository, for November 01 2016 to
37
+ December 01 2016, and saves it as `./report-2016-12-01.html`.
42
38
 
43
- If you don't pass the `--output` flag, it defaults to
44
- `./report.html`.
39
+ #### Example \#2
40
+
41
+ $ how_is 2016-12-01 --config some-config.yml
42
+
43
+ Generates the report(s) specified in the config file, for the period
44
+ from November 01 2016 to December 01 2016, and saves them in the
45
+ locations specified in the config file.
45
46
 
46
47
  #### Generating reports from a config file
47
48
 
48
- You can also create a config file &mdash; typically called
49
- how_is.yml &mdash; and run `how_is --config YAML_CONFIG_FILE`. (E.g., if
50
- the config file is how_is.yml, you would run `how_is --config how_is.yml`.)
49
+ You can also create a config file and run
50
+ `how_is --config YAML_CONFIG_FILE_PATH`.
51
51
 
52
- 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).
52
+ E.g., if the config file is `how_is.yml`, you would run
53
+ `how_is --config how_is.yml`.
54
+
55
+ Below is an example config file, [from the how-is/manual-reports
56
+ repository](https://raw.githubusercontent.com/how-is/manual-reports/gh-pages/how-is-configs/01-rubygems-rubygems.yml).
53
57
 
54
58
  ```yaml
55
59
  repository: rubygems/rubygems
56
60
  reports:
57
61
  html:
58
- directory: _posts
62
+ directory: rubygems/_posts
59
63
  frontmatter:
60
64
  title: "%{date} Report"
61
65
  layout: default
62
66
  filename: "%{date}-report.html"
63
67
  json:
64
- directory: json
68
+ directory: json/rubygems
65
69
  filename: "%{date}.json"
66
70
  ```
67
71
 
68
- The config file is a YAML file. The two root keys are `repository` (the
69
- repository name, of format `USER_OR_ORG/REPOSITORY` &mdash; e.g. `how-is/how_is`)
72
+ The config file is a YAML file. The two root keys are `repository`
70
73
  and `reports`.
71
74
 
72
75
  `reports` is a hash of key/value pairs, with the keys being the type of report
@@ -93,7 +96,7 @@ report = HowIs.new("rubygems/rubygems", "2017-12-01").to_html
93
96
  report.save_as("report.html")
94
97
 
95
98
  # Generate a report from a config Hash.
96
- HowIs.from_config({
99
+ reports = HowIs.from_config({
97
100
  repository: 'rubygems/rubygems',
98
101
  reports: {
99
102
  html: {
@@ -109,7 +112,10 @@ HowIs.from_config({
109
112
  filename: '%{date}.json'
110
113
  }
111
114
  }
112
- })
115
+ }, "2017-12-01")
116
+ # Save all of the rports.
117
+ # This assumes all of the directories the files go in already exist!
118
+ reports.map {|file, report| File.write(file, report) }
113
119
  ```
114
120
 
115
121
  ## Development
@@ -122,7 +128,6 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
122
128
 
123
129
  Bug reports and pull requests are welcome on GitHub at https://github.com/how-is/how_is. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
124
130
 
125
-
126
131
  ## License
127
132
 
128
133
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/lib/how_is/cli.rb CHANGED
@@ -98,6 +98,11 @@ module HowIs::CLI
98
98
  elsif options[:config]
99
99
  # If --config is passed, _only_ accept --config.
100
100
  options = keep_only.call(options, :config)
101
+ if argv.length >= 1
102
+ options[:date] = argv.delete_at(0)
103
+ else
104
+ raise HowIsArgumentError, "Expected date."
105
+ end
101
106
  else
102
107
  # If we get here, we're generating a report from the command line,
103
108
  # without using --from or --config.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HowIs
4
- VERSION = "21.0.0"
4
+ VERSION = "22.0.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: how_is
3
3
  version: !ruby/object:Gem::Version
4
- version: 21.0.0
4
+ version: 22.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ellen Marie Dash