how_is 8.0.0 → 9.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,78 +1,78 @@
1
- require 'prawn'
2
- require 'how_is/chart'
3
-
4
- module HowIs
5
- class PdfReport < BaseReport
6
- def format
7
- :pdf
8
- end
9
-
10
- attr_accessor :pdf
11
-
12
- def title(_text)
13
- pdf.pad_bottom(10) {
14
- pdf.text(_text, size: 25)
15
- }
16
- end
17
-
18
- def header(_text)
19
- pdf.pad_top(15) {
20
- pdf.pad_bottom(3) {
21
- pdf.text _text, size: 20
22
- }
23
- }
24
- end
25
-
26
- def link(_text, url)
27
- # TODO: Actually have links.
28
- _text
29
- end
30
-
31
- def horizontal_bar_graph(data)
32
- filename_base = "./issues-per-label"
33
- dat_file = filename_base + '.dat'
34
- png_file = filename_base + '.png'
35
-
36
- File.open(dat_file, 'w') do |f|
37
- data.each_with_index do |(label, n, link), i|
38
- f.puts "#{i}\t#{n}\t\"#{label}\""
39
- end
40
- end
41
-
42
- Chart.gnuplot(label_font_size: 10,
43
- font_size: 16,
44
- data_file: dat_file,
45
- png_file: png_file)
46
- Chart.rotate(90, png_file)
47
-
48
- pdf.image png_file
49
- end
50
-
51
- def text(_text)
52
- pdf.text _text
53
- end
54
-
55
- # Prawn (afaict) doesn't let you export to a binary blob.
56
- # So export to a file, then read the file.
57
- def export(&block)
58
- # TODO: Use actual temporary file.
59
- export!('temp.pdf', &block)
60
-
61
- open('temp.pdf').read
62
- end
63
-
64
- def export!(file, &block)
65
- _self = self
66
-
67
- Prawn::Document.generate(file) do |pdf|
68
- _self.pdf = pdf
69
-
70
- pdf.font("Helvetica")
71
-
72
- pdf.span(450, position: :center) do
73
- _self.instance_eval(&block)
74
- end
75
- end
76
- end
77
- end
78
- end
1
+ require 'prawn'
2
+ require 'how_is/chart'
3
+
4
+ module HowIs
5
+ class PdfReport < BaseReport
6
+ def format
7
+ :pdf
8
+ end
9
+
10
+ attr_accessor :pdf
11
+
12
+ def title(_text)
13
+ pdf.pad_bottom(10) {
14
+ pdf.text(_text, size: 25)
15
+ }
16
+ end
17
+
18
+ def header(_text)
19
+ pdf.pad_top(15) {
20
+ pdf.pad_bottom(3) {
21
+ pdf.text _text, size: 20
22
+ }
23
+ }
24
+ end
25
+
26
+ def link(_text, url)
27
+ # TODO: Actually have links.
28
+ _text
29
+ end
30
+
31
+ def horizontal_bar_graph(data)
32
+ filename_base = "./issues-per-label"
33
+ dat_file = filename_base + '.dat'
34
+ png_file = filename_base + '.png'
35
+
36
+ File.open(dat_file, 'w') do |f|
37
+ data.each_with_index do |(label, n, link), i|
38
+ f.puts "#{i}\t#{n}\t\"#{label}\""
39
+ end
40
+ end
41
+
42
+ Chart.gnuplot(label_font_size: 10,
43
+ font_size: 16,
44
+ data_file: dat_file,
45
+ png_file: png_file)
46
+ Chart.rotate(90, png_file)
47
+
48
+ pdf.image png_file
49
+ end
50
+
51
+ def text(_text)
52
+ pdf.text _text
53
+ end
54
+
55
+ # Prawn (afaict) doesn't let you export to a binary blob.
56
+ # So export to a file, then read the file.
57
+ def export(&block)
58
+ # TODO: Use actual temporary file.
59
+ export!('temp.pdf', &block)
60
+
61
+ open('temp.pdf').read
62
+ end
63
+
64
+ def export!(file, &block)
65
+ _self = self
66
+
67
+ Prawn::Document.generate(file) do |pdf|
68
+ _self.pdf = pdf
69
+
70
+ pdf.font("Helvetica")
71
+
72
+ pdf.span(450, position: :center) do
73
+ _self.instance_eval(&block)
74
+ end
75
+ end
76
+ end
77
+ end
78
+ end
@@ -1,3 +1,3 @@
1
- module HowIs
2
- VERSION = "8.0.0"
3
- end
1
+ module HowIs
2
+ VERSION = "9.0.0"
3
+ end
data/roadmap.markdown CHANGED
@@ -1,49 +1,49 @@
1
- # How_is Roadmap
2
-
3
- A brief overview of how_is' goals and current status.
4
-
5
- ## Goals
6
-
7
- How_is is intended to be usable both as a standalone program and a as library, with reports generated as either files or Ruby Strings. Initial export formats supported will be JSON and PDF, with HTML to follow later. When exporting a report, you can use the data from a previous JSON export to avoid making network requests.
8
-
9
- Metrics will be divided into two categories during implementation: Simple and Complex. Simple ones will be implementable using only the information gathered from one API call to the issue tracker. Complex metrics require things like cloning the repository or making multiple API requests.
10
-
11
- Simple metrics will include:
12
-
13
- * number of open Issues,
14
- * number of open Pull Requests,
15
- * number of issues associated with each label, as well as the number associated with no label,
16
- * average Issue age,
17
- * average Pull Request age,
18
- * date oldest Issue was opened,
19
- * date oldest Pull Request was opened.
20
-
21
- Complex metrics will include:
22
-
23
- * code churn (code change over time),
24
- * average response time by a team member in the past week,
25
- * graph of average response time by a team member per week.
26
-
27
- These metrics serve to either quantify the state of the repository, quantify the state of the codebase itself, or both. By quantifying the state of the issue tracker and codebase, it will hopefully be easier to decide what needs to be done.
28
-
29
- Once HTML export is implemented, a web service is planned to be created which tracks these metrics over time for the RubyGems repository. The details of this have not been fully fleshed out, but I am attempting to design the library in such a way to allow the flexibility required to do this.
30
-
31
- ## Current Status
32
-
33
- As of June 15th 2016, how_is supports exports to JSON or PDF, but not HTML. For JSON and PDF, all Simple metrics have been implemented in some form, although they made need some polish ([#8](https://github.com/duckinator/how_is/issues/8)). HTML export is not implemented, and no Complex metrics are implemented. Tracking the number of issues without labels has also not been implemented ([#1](https://github.com/duckinator/how_is/issues/1)).
34
-
35
- Exporting to Ruby Strings that contain valid JSON, PDF, or HTML documents has also not been implemented ([#7](https://github.com/duckinator/how_is/issues/7)).
36
-
37
- Authentication is not being used, but will likely be necessary, as it would raise the API rate limits ([#6](https://github.com/duckinator/how_is/issues/6)).
38
-
39
- ### Requirements for 1.0
40
-
41
- Once JSON and PDF exports are fully implemented ([#1](https://github.com/duckinator/how_is/issues/1)) and the README has a proper list of the metrics covered, v1.0 will be released.
42
-
43
- ### Requirements for 2.0
44
-
45
- Once everything required for v1.0 as well as exporting to Strings ([#7](https://github.com/duckinator/how_is/issues/7)) has been implemented, v2.0 will be released.
46
-
47
- ### Other changes
48
-
49
- All other changes ([#8](https://github.com/duckinator/how_is/issues/8), [#6](https://github.com/duckinator/how_is/issues/6), any changes without an accompanying issue) will be grouped together in either the next major release, or a separate minor release.
1
+ # How_is Roadmap
2
+
3
+ A brief overview of how_is' goals and current status.
4
+
5
+ ## Goals
6
+
7
+ How_is is intended to be usable both as a standalone program and a as library, with reports generated as either files or Ruby Strings. Initial export formats supported will be JSON and PDF, with HTML to follow later. When exporting a report, you can use the data from a previous JSON export to avoid making network requests.
8
+
9
+ Metrics will be divided into two categories during implementation: Simple and Complex. Simple ones will be implementable using only the information gathered from one API call to the issue tracker. Complex metrics require things like cloning the repository or making multiple API requests.
10
+
11
+ Simple metrics will include:
12
+
13
+ * number of open Issues,
14
+ * number of open Pull Requests,
15
+ * number of issues associated with each label, as well as the number associated with no label,
16
+ * average Issue age,
17
+ * average Pull Request age,
18
+ * date oldest Issue was opened,
19
+ * date oldest Pull Request was opened.
20
+
21
+ Complex metrics will include:
22
+
23
+ * code churn (code change over time),
24
+ * average response time by a team member in the past week,
25
+ * graph of average response time by a team member per week.
26
+
27
+ These metrics serve to either quantify the state of the repository, quantify the state of the codebase itself, or both. By quantifying the state of the issue tracker and codebase, it will hopefully be easier to decide what needs to be done.
28
+
29
+ Once HTML export is implemented, a web service is planned to be created which tracks these metrics over time for the RubyGems repository. The details of this have not been fully fleshed out, but I am attempting to design the library in such a way to allow the flexibility required to do this.
30
+
31
+ ## Current Status
32
+
33
+ As of June 15th 2016, how_is supports exports to JSON or PDF, but not HTML. For JSON and PDF, all Simple metrics have been implemented in some form, although they made need some polish ([#8](https://github.com/duckinator/how_is/issues/8)). HTML export is not implemented, and no Complex metrics are implemented. Tracking the number of issues without labels has also not been implemented ([#1](https://github.com/duckinator/how_is/issues/1)).
34
+
35
+ Exporting to Ruby Strings that contain valid JSON, PDF, or HTML documents has also not been implemented ([#7](https://github.com/duckinator/how_is/issues/7)).
36
+
37
+ Authentication is not being used, but will likely be necessary, as it would raise the API rate limits ([#6](https://github.com/duckinator/how_is/issues/6)).
38
+
39
+ ### Requirements for 1.0
40
+
41
+ Once JSON and PDF exports are fully implemented ([#1](https://github.com/duckinator/how_is/issues/1)) and the README has a proper list of the metrics covered, v1.0 will be released.
42
+
43
+ ### Requirements for 2.0
44
+
45
+ Once everything required for v1.0 as well as exporting to Strings ([#7](https://github.com/duckinator/how_is/issues/7)) has been implemented, v2.0 will be released.
46
+
47
+ ### Other changes
48
+
49
+ All other changes ([#8](https://github.com/duckinator/how_is/issues/8), [#6](https://github.com/duckinator/how_is/issues/6), any changes without an accompanying issue) will be grouped together in either the next major release, or a separate minor release.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: how_is
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.0
4
+ version: 9.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ellen Marie Dash
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-28 00:00:00.000000000 Z
11
+ date: 2016-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github_api
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: slop
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: prawn
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -86,14 +100,14 @@ dependencies:
86
100
  requirements:
87
101
  - - "~>"
88
102
  - !ruby/object:Gem::Version
89
- version: 4.0.1
103
+ version: 5.0.0
90
104
  type: :runtime
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
108
  - - "~>"
95
109
  - !ruby/object:Gem::Version
96
- version: 4.0.1
110
+ version: 5.0.0
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: bundler
99
113
  requirement: !ruby/object:Gem::Requirement
@@ -160,6 +174,7 @@ extra_rdoc_files: []
160
174
  files:
161
175
  - ".gitignore"
162
176
  - ".rspec"
177
+ - ".rspec-ignore-tags"
163
178
  - ".travis.yml"
164
179
  - CODE_OF_CONDUCT.md
165
180
  - Gemfile
@@ -175,6 +190,7 @@ files:
175
190
  - lib/how_is/analyzer.rb
176
191
  - lib/how_is/chart.rb
177
192
  - lib/how_is/cli.rb
193
+ - lib/how_is/cli/parser.rb
178
194
  - lib/how_is/fetcher.rb
179
195
  - lib/how_is/pulse.rb
180
196
  - lib/how_is/report.rb
@@ -203,9 +219,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
203
219
  version: '0'
204
220
  requirements: []
205
221
  rubyforge_project:
206
- rubygems_version: 2.6.3
222
+ rubygems_version: 2.5.1
207
223
  signing_key:
208
224
  specification_version: 4
209
225
  summary: Quantify the health of a GitHub repository is.
210
226
  test_files: []
211
- has_rdoc: