fukuzatsu 2.3.1 → 2.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +11 -1
- data/lib/fukuzatsu/formatters/templates/index.html.haml +5 -4
- data/lib/fukuzatsu/formatters/templates/output.html.haml +6 -5
- data/lib/fukuzatsu/formatters/text.rb +0 -1
- data/lib/fukuzatsu/version.rb +1 -1
- data/spec/formatters/text_spec.rb +9 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ab3caae162e83641750c5198c397b5077aee4cf68c6e0e3bc2b1e609a9d98b80
|
4
|
+
data.tar.gz: 3b495eb54ddcddabb6324f11fa52e0181b1dc3caf73470731e7b3a1c2bd14c2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3371f6a662b2faed2a44641ccad50b360601ca6040a9edc453ab7ce8245ef611ca5b6a29a81e907dec156e45237d78cec8680f8798a7d10a9e9b399b9d40ef4b
|
7
|
+
data.tar.gz: e5add8c57beeaeca6166c0b433a305384df3140dd7c322c843561c87ee123810479a695f853ee6eae49fd788024ceb5d1c093dbfb216362327751dc253ce0825
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Fukuzatsu
|
2
2
|
|
3
|
-
Fukuzatsu ("complexity") is a tool for measuring code complexity in Ruby class files. Its analysis
|
3
|
+
Fukuzatsu (Japanese for "complexity") is a tool for measuring code complexity in Ruby class files. Its analysis
|
4
4
|
generates scores based on cyclomatic complexity algorithms, which in simplest terms measure the number of execution paths through a given piece of code. (You can learn more about cyclomatic complexity [here](http://en.wikipedia.org/wiki/Cyclomatic_complexity).)
|
5
5
|
|
6
6
|
Why should you care about this kind of complexity? More complex code tends to attract bugs and to
|
@@ -30,6 +30,9 @@ This installs the CLI tool.
|
|
30
30
|
|
31
31
|
fuku check path/to/file/my_file.rb
|
32
32
|
|
33
|
+
fuku check path/to/directory
|
34
|
+
# Generates report for all rb files in the given directory
|
35
|
+
|
33
36
|
fuku check path/to/file/my_file.rb -f html
|
34
37
|
# Writes to doc/fuzuzatsu/htm/index.htm
|
35
38
|
|
@@ -39,6 +42,13 @@ This installs the CLI tool.
|
|
39
42
|
fuku check path/to/file/my_file.rb -f json
|
40
43
|
# Writes to doc/fuzuzatsu/json/results.json
|
41
44
|
|
45
|
+
### Running as docker image
|
46
|
+
|
47
|
+
The following will download the latest docker image, mount the current directory inside the container and run `fuku check -f html .` which generates html report for all ruby files in the current directory.
|
48
|
+
|
49
|
+
docker run -v $(pwd):/tmp/fuku --workdir=/tmp/fuku rubygem/fukuzatsu check -f html .
|
50
|
+
|
51
|
+
|
42
52
|
## Contributing
|
43
53
|
|
44
54
|
Please note that this project is released with a [Contributor Code of Conduct](http://contributor-covenant.org/version/1/0/0/). By participating in this project you agree to abide by its terms.
|
@@ -3,10 +3,11 @@
|
|
3
3
|
%head
|
4
4
|
%title
|
5
5
|
Fukuzatsu
|
6
|
-
%
|
7
|
-
%
|
8
|
-
%script{language: "javascript", src: "
|
9
|
-
%script{language: "javascript", src: "
|
6
|
+
%meta{ :content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type" }
|
7
|
+
%link{href: "https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css", rel: "stylesheet"}
|
8
|
+
%script{language: "javascript", src: "https://code.jquery.com/jquery-1.11.0.min.js", type: "text/javascript"}
|
9
|
+
%script{language: "javascript", src: "https://code.jquery.com/jquery-migrate-1.2.1.min.js", type: "text/javascript"}
|
10
|
+
%script{language: "javascript", src: "https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js", type: "text/javascript"}
|
10
11
|
|
11
12
|
%style{media: "screen", type: "text/css"}
|
12
13
|
body { font-family: Arial, sans-serif; font-size: 13px; padding: 2em; }
|
@@ -4,11 +4,12 @@
|
|
4
4
|
%title
|
5
5
|
Fukuzatsu:
|
6
6
|
= class_name
|
7
|
-
%
|
8
|
-
%
|
9
|
-
%script{language: "javascript", src: "
|
10
|
-
%script{language: "javascript", src: "
|
11
|
-
%script{language: "javascript", src: "
|
7
|
+
%meta{ :content => "text/html; charset=UTF-8", "http-equiv" => "Content-Type" }
|
8
|
+
%link{href: "https://cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css", rel: "stylesheet"}
|
9
|
+
%script{language: "javascript", src: "https://code.jquery.com/jquery-1.12.4.min.js", type: "text/javascript"}
|
10
|
+
%script{language: "javascript", src: "https://code.jquery.com/jquery-migrate-1.2.1.min.js", type: "text/javascript"}
|
11
|
+
%script{language: "javascript", src: "https://cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js", type: "text/javascript"}
|
12
|
+
%script{language: "javascript", src: "https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js", type: "text/javascript"}
|
12
13
|
:css
|
13
14
|
#{Rouge::Theme.find('thankful_eyes').render(scope: '.highlight')}
|
14
15
|
|
data/lib/fukuzatsu/version.rb
CHANGED
@@ -35,4 +35,13 @@ describe Fukuzatsu::Formatters::Text do
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
|
+
describe "#export" do
|
39
|
+
it "'puts' a table" do
|
40
|
+
class_source = File.open("./spec/fixtures/class.rb", "r").readlines
|
41
|
+
summary = Fukuzatsu::Summary.from(content: class_source.join("\n")).first
|
42
|
+
|
43
|
+
text_formatter = Fukuzatsu::Formatters::Text.new(summary: summary, base_output_path: nil)
|
44
|
+
expect(text_formatter.export).to eq(nil)
|
45
|
+
end
|
46
|
+
end
|
38
47
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fukuzatsu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Coraline Ada Ehmke
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-12-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: analyst
|
@@ -261,7 +261,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
261
261
|
version: '0'
|
262
262
|
requirements: []
|
263
263
|
rubyforge_project:
|
264
|
-
rubygems_version: 2.
|
264
|
+
rubygems_version: 2.7.8
|
265
265
|
signing_key:
|
266
266
|
specification_version: 4
|
267
267
|
summary: A simple code complexity analyzer.
|