fukuzatsu 0.9.1 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/fukuzatsu.gemspec +1 -1
- data/lib/fukuzatsu/version.rb +1 -1
- metadata +2 -4
- data/spec/formatters/csv_spec.rb +0 -42
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e6fdba938e9136224afea8638c506c0cf39ab3d0
|
|
4
|
+
data.tar.gz: 64f1f63abe6700b0c88e6f04ea84810f608e22c1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b70fa09ea627baed21c750aa9b4ccd63762aa2e25d193144b3d6e56860cbe73d5dc8b4dece6b98b393c14b57e5392e162d3865f5cfa08f92a2debeea1a870c9f
|
|
7
|
+
data.tar.gz: c5a1d4b1fcfba4bd10eac975502f6cb8b7e4eca192aed40973b1bda753d3ade10caeee5c0a189b42f4da05e268f1d7fd93e2d1913886078cad050b0d0abd106e
|
data/fukuzatsu.gemspec
CHANGED
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
|
10
10
|
spec.email = ["coraline@idolhands.com"]
|
|
11
11
|
spec.summary = "A simple code complexity analyzer."
|
|
12
12
|
spec.description = "Calculates the cyclomatic complexity of methods within a given file."
|
|
13
|
-
spec.homepage = "https://gitlab.com/coraline/fukuzatsu/
|
|
13
|
+
spec.homepage = "https://gitlab.com/coraline/fukuzatsu/tree/master"
|
|
14
14
|
spec.license = "MIT"
|
|
15
15
|
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
data/lib/fukuzatsu/version.rb
CHANGED
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: 0.9.
|
|
4
|
+
version: 0.9.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bantik
|
|
@@ -168,9 +168,8 @@ files:
|
|
|
168
168
|
- spec/fixtures/program_1.rb
|
|
169
169
|
- spec/fixtures/program_2.rb
|
|
170
170
|
- spec/fixtures/program_3.rb
|
|
171
|
-
- spec/formatters/csv_spec.rb
|
|
172
171
|
- spec/spec_helper.rb
|
|
173
|
-
homepage: https://gitlab.com/coraline/fukuzatsu/
|
|
172
|
+
homepage: https://gitlab.com/coraline/fukuzatsu/tree/master
|
|
174
173
|
licenses:
|
|
175
174
|
- MIT
|
|
176
175
|
metadata: {}
|
|
@@ -199,5 +198,4 @@ test_files:
|
|
|
199
198
|
- spec/fixtures/program_1.rb
|
|
200
199
|
- spec/fixtures/program_2.rb
|
|
201
200
|
- spec/fixtures/program_3.rb
|
|
202
|
-
- spec/formatters/csv_spec.rb
|
|
203
201
|
- spec/spec_helper.rb
|
data/spec/formatters/csv_spec.rb
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
require 'spec_helper'
|
|
2
|
-
|
|
3
|
-
describe Formatters::Csv do
|
|
4
|
-
|
|
5
|
-
let(:formatter) { Formatters::Csv.new }
|
|
6
|
-
|
|
7
|
-
describe "#header" do
|
|
8
|
-
it "outputs a header row" do
|
|
9
|
-
expect(formatter.header).to eq("class,method,complexity,lines")
|
|
10
|
-
end
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
describe "#rows" do
|
|
14
|
-
|
|
15
|
-
let(:expected) {
|
|
16
|
-
[
|
|
17
|
-
"Foo,baz,5,10",
|
|
18
|
-
"Foo,bat,15,100",
|
|
19
|
-
"Bar,gum,51,110",
|
|
20
|
-
"Bar,bun,55,101"
|
|
21
|
-
]
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
let(:file_1) { ParsedFile.new(class_name: "Foo") }
|
|
25
|
-
let(:file_2) { ParsedFile.new(class_name: "Bar") }
|
|
26
|
-
let(:method_1) { ParsedMethod.new(method_name: "baz", complexity: 5, loc: 10)}
|
|
27
|
-
let(:method_2) { ParsedMethod.new(method_name: "bat", complexity: 15, loc: 100)}
|
|
28
|
-
let(:method_3) { ParsedMethod.new(method_name: "gum", complexity: 51, loc: 110)}
|
|
29
|
-
let(:method_4) { ParsedMethod.new(method_name: "bun", complexity: 55, loc: 101)}
|
|
30
|
-
|
|
31
|
-
before do
|
|
32
|
-
file_1.parsed_methods = [method_1, method_2]
|
|
33
|
-
file_2.parsed_methods = [method_3, method_4]
|
|
34
|
-
formatter.parsed_files = [file_1, file_2]
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
it "builds an array" do
|
|
38
|
-
expect(formatter.rows).to eq(expected)
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
end
|