app_reporter 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +39 -0
- data/Rakefile +1 -0
- data/app_reporter.gemspec +27 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/lib/app_reporter.rb +117 -0
- data/lib/app_reporter/railtie.rb +8 -0
- data/lib/app_reporter/templates/summary_report.html.erb +185 -0
- data/lib/app_reporter/version.rb +3 -0
- data/lib/tasks/app_reporter.rake +17 -0
- metadata +128 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3103273fc6390755fde74f62c4392e0a31c05e07
|
4
|
+
data.tar.gz: f1d37d776fb9f7310bf73e5883b8a6408f64beba
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 03bce62d87262257dda41436b5a49e6edd49ab5fe1afeca98fedd9fa04fa96c54021eecb9043d60fd2eb64f925e99e8c3dbac8d65c3c4eb1efef074bd702710c
|
7
|
+
data.tar.gz: 48f84185b2cb02ebeaa8b98d304426a7b7e6fbe2639d340aeff316058fe22759ac0122150c69d15f5a1457ca43ca11c9d7f85cae4fb94aed3c1c0f9757478cb7
|
data/.gitignore
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
+
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
|
6
|
+
|
7
|
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
+
|
9
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
+
|
11
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
+
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Rohit Bhore
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# AppReporter
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/app_reporter`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'app_reporter'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install app_reporter
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
1. Fork it ( https://github.com/[my-github-username]/app_reporter/fork )
|
36
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
37
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
38
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
39
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'app_reporter/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "app_reporter"
|
8
|
+
spec.version = AppReporter::VERSION
|
9
|
+
spec.authors = ["Rohit Bhore"]
|
10
|
+
spec.email = ["rohitpbhore@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Code quality report through metric_fu and brakeman gem}
|
13
|
+
spec.description = %q{Code quality report through metric_fu and brakeman gem}
|
14
|
+
spec.homepage = "https://github.com/rohitpbhore/app_reporter.git"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.8"
|
22
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
+
|
24
|
+
spec.add_runtime_dependency "brakeman"
|
25
|
+
spec.add_runtime_dependency "metric_fu"
|
26
|
+
spec.add_runtime_dependency "railties"
|
27
|
+
end
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "app_reporter"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/lib/app_reporter.rb
ADDED
@@ -0,0 +1,117 @@
|
|
1
|
+
require "app_reporter/version"
|
2
|
+
require 'app_reporter/railtie' if defined?(Rails)
|
3
|
+
|
4
|
+
module AppReporter
|
5
|
+
def brakeman_report
|
6
|
+
# Breakman source file
|
7
|
+
file = File.read("#{Rails.root}/report.json")
|
8
|
+
data_hash = JSON.parse(file)
|
9
|
+
|
10
|
+
# collect information related to the application
|
11
|
+
@breakman_info = {}
|
12
|
+
@breakman_info['security_warnings'] = data_hash['scan_info']['security_warnings']
|
13
|
+
@breakman_info['errors'] = data_hash['errors']
|
14
|
+
|
15
|
+
# Create an array of all warnings
|
16
|
+
@brakeman_warnings = []
|
17
|
+
data_hash['warnings'].each do |warning|
|
18
|
+
hash = {}
|
19
|
+
hash['warning_type'] = warning['warning_type']
|
20
|
+
hash['warning_code'] = warning['warning_code']
|
21
|
+
hash['fingerprint'] = warning['fingerprint']
|
22
|
+
hash['message'] = warning['message']
|
23
|
+
hash['file'] = warning['file']
|
24
|
+
hash['line'] = warning['line']
|
25
|
+
hash['code'] = warning['code']
|
26
|
+
hash['render_path'] = warning['render_path']
|
27
|
+
hash['location'] = warning['location']
|
28
|
+
hash['user_input'] = warning['user_input']
|
29
|
+
hash['confidence'] = warning['confidence']
|
30
|
+
@brakeman_warnings.push(hash)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def metric_fu_report
|
35
|
+
# parsing metric_fu report from .yml file
|
36
|
+
@surveys = YAML.load(ERB.new(File.read("#{Rails.root}/tmp/metric_fu/report.yml")).result)
|
37
|
+
@matric_fu_info = []
|
38
|
+
|
39
|
+
@surveys.each do |survey|
|
40
|
+
unless survey.blank?
|
41
|
+
p "===== From #{survey[0]} ====="
|
42
|
+
case survey[0]
|
43
|
+
when :flog
|
44
|
+
hash = {}
|
45
|
+
# hash['flog'] = "Flog measures code complexity. Total Flog score for all methods: #{survey[1][:total].round(1)}. Average Flog score for all methods: #{survey[1][:average].round(1)}"
|
46
|
+
hash['flog'] = survey[1][:average].round(1)
|
47
|
+
@matric_fu_info.push(hash)
|
48
|
+
when :stats
|
49
|
+
hash = {}
|
50
|
+
# hash['stats'] = "Lines of Code/Tests Metric Results. Lines of Code: #{survey[1][:codeLOC]}. Lines of Test: #{survey[1][:testLOC]}. Code to test ratio: #{survey[1][:code_to_test_ratio]}."
|
51
|
+
hash['stats'] = survey[1][:code_to_test_ratio]
|
52
|
+
hash['codeLOC'] = survey[1][:codeLOC]
|
53
|
+
hash['testLOC'] = survey[1][:testLOC]
|
54
|
+
@matric_fu_info.push(hash)
|
55
|
+
when :roodi
|
56
|
+
hash = {}
|
57
|
+
hash['roodi'] = "Roodi parses Ruby code and warns about design issues. #{survey[1][:total].first} and found #{survey[1][:problems].count} problems."
|
58
|
+
@matric_fu_info.push(hash)
|
59
|
+
when :reek
|
60
|
+
hash = {}
|
61
|
+
hash['reek'] = "Reek detects common code smells in ruby code. Found #{survey[1][:matches].count} matches."
|
62
|
+
@matric_fu_info.push(hash)
|
63
|
+
when :cane
|
64
|
+
hash = {}
|
65
|
+
hash['cane'] = "Cane reports code quality threshold violations. Found total #{survey[1][:violations].count} types of #{survey[1][:total_violations]} violations."
|
66
|
+
@matric_fu_info.push(hash)
|
67
|
+
when :flay
|
68
|
+
hash = {}
|
69
|
+
hash['flay'] = "Flay analyzes ruby code for structural similarities. Total Score (lower is better): #{survey[1][:total_score]}."
|
70
|
+
@matric_fu_info.push(hash)
|
71
|
+
when :churn
|
72
|
+
hash = {}
|
73
|
+
hash['churn'] = "Source Control Churn Results. Files that change a lot in your project may be bad a sign. Count: #{survey[1][:changes].count}."
|
74
|
+
@matric_fu_info.push(hash)
|
75
|
+
when :saikuro
|
76
|
+
hash = {}
|
77
|
+
hash['saikuro'] = "Saikuro analyzes ruby code for cyclomatic complexity. Analyzed #{survey[1][:files].count} Classes."
|
78
|
+
@matric_fu_info.push(hash)
|
79
|
+
when :rails_best_practices
|
80
|
+
hash = {}
|
81
|
+
hash['rails_best_practices'] = survey[1][:total].first.gsub(/[^\d]/, '').to_i
|
82
|
+
@matric_fu_info.push(hash)
|
83
|
+
when :hotspots
|
84
|
+
hash = {}
|
85
|
+
hash['hotspots'] = "Meta analysis of metrics to find hotspots in code. Hotspot Results: #{survey[1]['files'].count}."
|
86
|
+
@matric_fu_info.push(hash)
|
87
|
+
else
|
88
|
+
puts "No Report"
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
def generate_final_report
|
95
|
+
spec = Gem::Specification.find_by_name 'app_reporter'
|
96
|
+
erb_file = "/#{spec.gem_dir}/lib/app_reporter/templates/summary_report.html.erb"
|
97
|
+
html_file = File.basename(erb_file, '.erb')
|
98
|
+
erb_str = File.read(erb_file)
|
99
|
+
|
100
|
+
@flog_info = @matric_fu_info.select{|d| d.keys.first == 'flog'}
|
101
|
+
@stats_info = @matric_fu_info.select{|d| d.keys.first == 'stats'}
|
102
|
+
@rails_best_practices_info = @matric_fu_info.select{|d| d.keys.first == 'rails_best_practices'}
|
103
|
+
@app_root = Rails.root
|
104
|
+
|
105
|
+
begin
|
106
|
+
renderer = ERB.new(erb_str)
|
107
|
+
result = renderer.result()
|
108
|
+
|
109
|
+
File.open(html_file, 'w') do |f|
|
110
|
+
f.write(result)
|
111
|
+
end
|
112
|
+
rescue StandardError => e
|
113
|
+
p e.message
|
114
|
+
p e.backtrace
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
@@ -0,0 +1,185 @@
|
|
1
|
+
<!DOCTYPE HTML SYSTEM>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
5
|
+
<title>Brakeman Report</title>
|
6
|
+
<script>
|
7
|
+
function toggle(context) {
|
8
|
+
var elem = document.getElementById(context);
|
9
|
+
|
10
|
+
if (elem.style.display != "block")
|
11
|
+
elem.style.display = "block";
|
12
|
+
else
|
13
|
+
elem.style.display = "none";
|
14
|
+
|
15
|
+
elem.parentNode.scrollIntoView();
|
16
|
+
}
|
17
|
+
</script>
|
18
|
+
<style>
|
19
|
+
/* CSS style used for HTML reports */
|
20
|
+
|
21
|
+
body {
|
22
|
+
font-family: sans-serif;
|
23
|
+
color: #161616;
|
24
|
+
width: 70%;
|
25
|
+
margin: auto;
|
26
|
+
}
|
27
|
+
th {
|
28
|
+
background-color: #980905;
|
29
|
+
border-bottom: 5px solid #530200;
|
30
|
+
color: white;
|
31
|
+
font-size: 11pt;
|
32
|
+
padding: 1px 8px 1px 8px;
|
33
|
+
}
|
34
|
+
|
35
|
+
td {
|
36
|
+
border-bottom: 2px solid white;
|
37
|
+
font-family: monospace;
|
38
|
+
padding: 5px 8px 1px 8px;
|
39
|
+
}
|
40
|
+
|
41
|
+
table {
|
42
|
+
background-color: #FCF4D4;
|
43
|
+
border-collapse: collapse;
|
44
|
+
}
|
45
|
+
|
46
|
+
tr.first {
|
47
|
+
border-top: 1px solid #7ecc54;
|
48
|
+
padding-top: 2px;
|
49
|
+
}
|
50
|
+
|
51
|
+
tr.error {
|
52
|
+
background-color: #f4c1c1 !important
|
53
|
+
}
|
54
|
+
|
55
|
+
table{
|
56
|
+
width: 100%;
|
57
|
+
border: 1px;
|
58
|
+
border-color: black;
|
59
|
+
}
|
60
|
+
th, td{
|
61
|
+
width: 33.33%;
|
62
|
+
}
|
63
|
+
|
64
|
+
.done {
|
65
|
+
list-style: none; /* remove normal bullet for done items */
|
66
|
+
position: relative; /* necessary for positioning the :after */
|
67
|
+
margin-left: 30px;
|
68
|
+
}
|
69
|
+
|
70
|
+
.done:after {
|
71
|
+
content: "";
|
72
|
+
background-color: transparent;
|
73
|
+
|
74
|
+
/* position the checkbox */
|
75
|
+
position: absolute;
|
76
|
+
left: -16px;
|
77
|
+
top: 0px;
|
78
|
+
|
79
|
+
/* setting the checkbox */
|
80
|
+
/* short arm */
|
81
|
+
width: 5px;
|
82
|
+
border-bottom: 3px solid #4D7C2A;
|
83
|
+
/* long arm */
|
84
|
+
height: 11px;
|
85
|
+
border-right: 3px solid #4D7C2A;
|
86
|
+
|
87
|
+
/* rotate the mirrored L to make it a checkbox */
|
88
|
+
transform: rotate(45deg);
|
89
|
+
-o-transform: rotate(45deg);
|
90
|
+
-ms-transform: rotate(45deg);
|
91
|
+
-webkit-transform: rotate(45deg);
|
92
|
+
}
|
93
|
+
|
94
|
+
.cross:after{
|
95
|
+
display: inline-block;
|
96
|
+
content: "\00d7"; /* This will render the 'X' */
|
97
|
+
font-size: 30px;
|
98
|
+
color: #4D7C2A;
|
99
|
+
}
|
100
|
+
</style>
|
101
|
+
</head>
|
102
|
+
<body>
|
103
|
+
|
104
|
+
<table>
|
105
|
+
<tr>
|
106
|
+
<% if @brakeman_warnings.count > 1 %>
|
107
|
+
<td style="width:25%;"><span class='cross'></span>Brakeman Warnings(<%= @brakeman_warnings.count %>)</td>
|
108
|
+
<% else %>
|
109
|
+
<td style="width:25%;"><span class='done'></span>Brakeman Warnings(<%= @brakeman_warnings.count %>)</td>
|
110
|
+
<% end %>
|
111
|
+
|
112
|
+
<% if @rails_best_practices_info.first['rails_best_practices'] > 50 %>
|
113
|
+
<td style="width:25%;"><span class='cross'></span>Rails Best Practices(<%= @rails_best_practices_info.first['rails_best_practices'] %>)</td>
|
114
|
+
<% else %>
|
115
|
+
<td style="width:25%;"><span class='done'></span>Rails Best Practices(<%= @rails_best_practices_info.first['rails_best_practices'] %>)</td>
|
116
|
+
<% end %>
|
117
|
+
|
118
|
+
<% if @flog_info.first['flog'] > 5 %>
|
119
|
+
<td style="width:25%;"><span class='cross'></span>Flog(<%= @flog_info.first['flog'] %>)</td>
|
120
|
+
<% else %>
|
121
|
+
<td style="width:25%;"><span class='done'></span>Flog(<%= @flog_info.first['flog'] %>)</td>
|
122
|
+
<% end %>
|
123
|
+
|
124
|
+
<% if @stats_info.first['stats'] == 0.0 %>
|
125
|
+
<td style="width:25%;"><span class='cross'></span>Stats</td>
|
126
|
+
<% else %>
|
127
|
+
<td style="width:25%;"><span class='done'></span>Stats</td>
|
128
|
+
<% end %>
|
129
|
+
</tr>
|
130
|
+
</table>
|
131
|
+
|
132
|
+
<p></p>
|
133
|
+
|
134
|
+
<h2>Brakeman Warnings</h2>
|
135
|
+
<table>
|
136
|
+
<tr>
|
137
|
+
<th>Type</th>
|
138
|
+
<th>File</th>
|
139
|
+
<th>Message</th>
|
140
|
+
</tr>
|
141
|
+
|
142
|
+
<% @brakeman_warnings.each do |warning| %>
|
143
|
+
<tr>
|
144
|
+
<td><h4><%= warning['warning_type'] %></h4></td>
|
145
|
+
<td><%= warning['file'] %></td>
|
146
|
+
<td><%= warning['message'] %></td>
|
147
|
+
</tr>
|
148
|
+
<% end %>
|
149
|
+
<tr><td><a href="<%= @app_root %>/report.html">Report</a></td></tr>
|
150
|
+
</table>
|
151
|
+
<p></p>
|
152
|
+
|
153
|
+
<h2>Rails Best Practices</h2>
|
154
|
+
<table>
|
155
|
+
<tr>
|
156
|
+
<td><a href="<%= @app_root %>/tmp/metric_fu/output/rails_best_practices.html">Found <%= @rails_best_practices_info.first['rails_best_practices'] %> issues.</a></td>
|
157
|
+
</tr>
|
158
|
+
</table>
|
159
|
+
<p></p>
|
160
|
+
|
161
|
+
<h2>Flog code complexity</h2>
|
162
|
+
<table>
|
163
|
+
<tr>
|
164
|
+
<td><a href="<%= @app_root %>/tmp/metric_fu/output/flog.html">Average Flog score for all methods: <%= @flog_info.first['flog'] %></a></td>
|
165
|
+
</tr>
|
166
|
+
</table>
|
167
|
+
<p></p>
|
168
|
+
|
169
|
+
|
170
|
+
<h2>Stats</h2>
|
171
|
+
<table>
|
172
|
+
<tr>
|
173
|
+
<td>
|
174
|
+
testLOC: <%= @matric_fu_info.first['testLOC'] %>/
|
175
|
+
codeLOC: <%= @matric_fu_info.first['codeLOC'] %>
|
176
|
+
</br>
|
177
|
+
<a href="<%= @app_root %>/tmp/metric_fu/output/stats.html">Code to test ratio: <%= @stats_info.first['stats'] %></a>
|
178
|
+
</td>
|
179
|
+
</tr>
|
180
|
+
</table>
|
181
|
+
<p></p>
|
182
|
+
|
183
|
+
<h2><%= "Generated on #{Time.now}" %></h2>
|
184
|
+
</body>
|
185
|
+
</html>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'erb'
|
2
|
+
|
3
|
+
namespace :app_reporter do
|
4
|
+
desc "Run AppReporter"
|
5
|
+
task :run do
|
6
|
+
extend AppReporter
|
7
|
+
# Function call
|
8
|
+
p "===== Collecting data from brakeman report ====="
|
9
|
+
self.brakeman_report
|
10
|
+
|
11
|
+
p "===== Collecting data from metric_fu_report report ====="
|
12
|
+
self.metric_fu_report
|
13
|
+
|
14
|
+
p "===== Generating final report ====="
|
15
|
+
self.generate_final_report
|
16
|
+
end
|
17
|
+
end
|
metadata
ADDED
@@ -0,0 +1,128 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: app_reporter
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Rohit Bhore
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-03-25 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.8'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.8'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: brakeman
|
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'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: metric_fu
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: railties
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
description: Code quality report through metric_fu and brakeman gem
|
84
|
+
email:
|
85
|
+
- rohitpbhore@gmail.com
|
86
|
+
executables: []
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- ".gitignore"
|
91
|
+
- CODE_OF_CONDUCT.md
|
92
|
+
- Gemfile
|
93
|
+
- LICENSE.txt
|
94
|
+
- README.md
|
95
|
+
- Rakefile
|
96
|
+
- app_reporter.gemspec
|
97
|
+
- bin/console
|
98
|
+
- bin/setup
|
99
|
+
- lib/app_reporter.rb
|
100
|
+
- lib/app_reporter/railtie.rb
|
101
|
+
- lib/app_reporter/templates/summary_report.html.erb
|
102
|
+
- lib/app_reporter/version.rb
|
103
|
+
- lib/tasks/app_reporter.rake
|
104
|
+
homepage: https://github.com/rohitpbhore/app_reporter.git
|
105
|
+
licenses:
|
106
|
+
- MIT
|
107
|
+
metadata: {}
|
108
|
+
post_install_message:
|
109
|
+
rdoc_options: []
|
110
|
+
require_paths:
|
111
|
+
- lib
|
112
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
117
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
118
|
+
requirements:
|
119
|
+
- - ">="
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: '0'
|
122
|
+
requirements: []
|
123
|
+
rubyforge_project:
|
124
|
+
rubygems_version: 2.2.2
|
125
|
+
signing_key:
|
126
|
+
specification_version: 4
|
127
|
+
summary: Code quality report through metric_fu and brakeman gem
|
128
|
+
test_files: []
|