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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 61710b91b95cd1041ad01257e788fa9a51c38f22
4
- data.tar.gz: a616eb3c539c5f8cedd1ce6a07ccfbfeb071fece
2
+ SHA256:
3
+ metadata.gz: ab3caae162e83641750c5198c397b5077aee4cf68c6e0e3bc2b1e609a9d98b80
4
+ data.tar.gz: 3b495eb54ddcddabb6324f11fa52e0181b1dc3caf73470731e7b3a1c2bd14c2a
5
5
  SHA512:
6
- metadata.gz: 16310467e60397fbf65d6cd4b24406165594aedaf91ed75ae54f28af4f078089e93651f5b53e6a45f62d4c08fb12c558519001a0000820159178dbdf2787da45
7
- data.tar.gz: 652645ca320ae874caad38a6a41617fbbecc7b2e60d8201b0bfb9355b7910ea92365390381a94a54e5519b3332495c85e5902334199ec02fb91b8013a008ef66
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
- %link{href: "http://cdn.datatables.net/1.10.0/css/jquery.dataTables.css", rel: "stylesheet"}
7
- %script{language: "javascript", src: "http://code.jquery.com/jquery-1.11.0.min.js", type: "text/javascript"}
8
- %script{language: "javascript", src: "http://code.jquery.com/jquery-migrate-1.2.1.min.js", type: "text/javascript"}
9
- %script{language: "javascript", src: "http://cdn.datatables.net/1.10.0/js/jquery.dataTables.js", type: "text/javascript"}
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
- %link{href: "http://cdn.datatables.net/1.10.0/css/jquery.dataTables.css", rel: "stylesheet"}
8
- %script{language: "javascript", src: "http://code.jquery.com/jquery-1.11.0.min.js", type: "text/javascript"}
9
- %script{language: "javascript", src: "http://code.jquery.com/jquery-migrate-1.2.1.min.js", type: "text/javascript"}
10
- %script{language: "javascript", src: "http://cdn.datatables.net/1.10.0/js/jquery.dataTables.js", type: "text/javascript"}
11
- %script{language: "javascript", src: "http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.0/highlight.min.js", type: "text/javascript"}
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
 
@@ -33,7 +33,6 @@ module Fukuzatsu
33
33
  headings: header,
34
34
  rows: rows,
35
35
  )
36
- table.align_column(3, :right)
37
36
  puts table
38
37
  end
39
38
 
@@ -1,3 +1,3 @@
1
1
  module Fukuzatsu
2
- VERSION = "2.3.1"
2
+ VERSION = "2.3.2"
3
3
  end
@@ -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.1
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: 2015-01-02 00:00:00.000000000 Z
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.2.2
264
+ rubygems_version: 2.7.8
265
265
  signing_key:
266
266
  specification_version: 4
267
267
  summary: A simple code complexity analyzer.