how_is 9.0.0 → 10.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: d7243c84fe47a38ab1ebe38586797bfab2e859bb
4
- data.tar.gz: 51107d4818272e4019f38592b0b7d2ce55dbdf1d
3
+ metadata.gz: 7d2232f2f2d17f748d7c1ad440d9cfb2d0185146
4
+ data.tar.gz: 19c398abf2048d22a7fb69ee7935b782572d44ec
5
5
  SHA512:
6
- metadata.gz: 9b9edbd04e8104938e57015d8615f2d49d3503675648b7b6b7a2662f5a6f692689cf5dbc877bf1d62342e64a1d2549af9c93c825782f20266feb9664801130d5
7
- data.tar.gz: e60c288394b391aab576498d6b068963d49a030a6211674123b9ad322b01d3b32c786e892b3cc618232a481ec0803bbaed71c3b5357c56b1ba2cc71e0bb57b01
6
+ metadata.gz: efb076d7b3a488721c39d0b9389938a53a8075e4a52d70039b62d6ffd603081110012280c734d62c7d50ad10f2728a0ad221544e8f689d96ec06ac1cb64800e0
7
+ data.tar.gz: 6454fe522a6da9d7a706b39360823704a50025b247544ec45a65b1112fa38e94ac886b0034425c63da7667f39dd6fcf5135cc1d1540a608f88f8c99f9a1c05c3
data/README.md CHANGED
@@ -16,9 +16,12 @@ The summary includes:
16
16
  * date oldest issue was opened,
17
17
  * date oldest pull request was opened.
18
18
 
19
+ 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.
20
+
19
21
  ## Installation
20
22
 
21
- Make sure you have [gnuplot](http://gnuplot.info/) installed, then:
23
+ If you want to generate PDF reports, make sure you have
24
+ [gnuplot](http://gnuplot.info/) installed.
22
25
 
23
26
  $ gem install how_is
24
27
 
@@ -28,9 +31,9 @@ Make sure you have [gnuplot](http://gnuplot.info/) installed, then:
28
31
 
29
32
  E.g.,
30
33
 
31
- $ how_is rubygems/rubygems --report-file report.pdf
34
+ $ how_is rubygems/rubygems --report-file report.html
32
35
 
33
- The above command creates a PDF containing the summary at `./report.pdf`.
36
+ The above command creates a HTML file containing the summary at `./report.html`.
34
37
 
35
38
  ### Generating reports from a config file
36
39
 
data/how_is.gemspec CHANGED
@@ -18,12 +18,12 @@ Gem::Specification.new do |spec|
18
18
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_runtime_dependency "github_api", "~> 0.13.1"
22
- spec.add_runtime_dependency "contracts"
23
- spec.add_runtime_dependency "slop"
24
- spec.add_runtime_dependency "prawn"
21
+ spec.add_runtime_dependency "github_api", "~> 0.14.5"
22
+ spec.add_runtime_dependency "contracts", "~> 0.14.0"
23
+ spec.add_runtime_dependency "slop", "~> 4.4.1"
24
+ spec.add_runtime_dependency "prawn", "~> 2.1.0"
25
25
 
26
- spec.add_runtime_dependency "mini_magick"
26
+ spec.add_runtime_dependency "mini_magick", "~> 4.5.1"
27
27
 
28
28
  # Travis CI only supports up to Ruby 2.2.0, but Rack 2.0+ requires Ruby 2.2.2+,
29
29
  # so this pegs Rack to the latest version that works with Ruby 2.2.0.
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
32
32
  spec.add_runtime_dependency "tessellator-fetcher", "~> 5.0.0"
33
33
 
34
34
  spec.add_development_dependency "bundler", "~> 1.11"
35
- spec.add_development_dependency "rake", "~> 10.0"
36
- spec.add_development_dependency "rspec", "~> 3.0"
35
+ spec.add_development_dependency "rake", "~> 11.2"
36
+ spec.add_development_dependency "rspec", "~> 3.5"
37
37
  spec.add_development_dependency "timecop", "~> 0.8.1"
38
38
  end
@@ -10,6 +10,15 @@ class HowIs::CLI
10
10
  class OptionsError < StandardError
11
11
  end
12
12
 
13
+ class InvalidOutputFileError < OptionsError
14
+ end
15
+
16
+ class InvalidInputFileError < OptionsError
17
+ end
18
+
19
+ class NoRepositoryError < OptionsError
20
+ end
21
+
13
22
  class Parser
14
23
  attr_reader :opts
15
24
 
@@ -35,7 +44,7 @@ class HowIs::CLI
35
44
  opts.string "--config", "YAML config file, used to generate a group of reports"
36
45
  opts.string "--from", "JSON report file, used instead of fetching the data again"
37
46
  opts.string "--report", "output file for the report (valid extensions: #{HowIs.supported_formats.join(', ')}; default: #{DEFAULT_REPORT_FILE})"
38
- opts.string "-v", "--version", "prints the version"
47
+ opts.bool "-v", "--version", "prints the version"
39
48
 
40
49
  parser = Slop::Parser.new(opts)
41
50
  result = parser.parse(argv)
@@ -51,19 +60,21 @@ class HowIs::CLI
51
60
  options.delete(:version) unless options[:version]
52
61
 
53
62
  unless HowIs.can_export_to?(options[:report])
54
- raise OptionsError, "Invalid file: #{options[:report_file]}. Supported formats: #{HowIs.supported_formats.join(', ')}"
63
+ raise InvalidOutputFileError, "Invalid file: #{options[:report_file]}. Supported formats: #{HowIs.supported_formats.join(', ')}"
55
64
  end
56
65
 
57
66
  if options[:config]
58
67
  # Nothing to do.
59
68
  elsif options[:from]
60
69
  # Opening this file here seems a bit messy, but it works.
70
+ raise InvalidInputFileError, "No such file: #{options[:from]}" unless File.file?(options[:from])
71
+
61
72
  options[:repository] = JSON.parse(open(options[:from_file]).read)['repository']
62
- raise OptionsError, "Invalid JSON report file." unless options[:repository]
73
+ raise InvalidInputFileError, "Invalid JSON report file." unless options[:repository]
63
74
  elsif argv.length >= 1
64
75
  options[:repository] = argv.delete_at(0)
65
76
  else
66
- raise OptionsError, "No repository specified."
77
+ raise NoRepositoryError, "No repository specified."
67
78
  end
68
79
 
69
80
  {
@@ -1,3 +1,3 @@
1
1
  module HowIs
2
- VERSION = "9.0.0"
2
+ VERSION = "10.0.0"
3
3
  end
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: 9.0.0
4
+ version: 10.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-08-20 00:00:00.000000000 Z
11
+ date: 2016-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github_api
@@ -16,70 +16,70 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.13.1
19
+ version: 0.14.5
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.13.1
26
+ version: 0.14.5
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: contracts
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 0.14.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 0.14.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: slop
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: 4.4.1
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: 4.4.1
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: prawn
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: 2.1.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: 2.1.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: mini_magick
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: 4.5.1
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: 4.5.1
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rack
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -128,28 +128,28 @@ dependencies:
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '10.0'
131
+ version: '11.2'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '10.0'
138
+ version: '11.2'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: rspec
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '3.0'
145
+ version: '3.5'
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '3.0'
152
+ version: '3.5'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: timecop
155
155
  requirement: !ruby/object:Gem::Requirement