fukuzatsu 2.2.4 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/fuku +1 -1
- data/lib/fukuzatsu.rb +2 -0
- data/lib/fukuzatsu/cli.rb +1 -1
- data/lib/fukuzatsu/formatters/base.rb +4 -0
- data/lib/fukuzatsu/formatters/json_stdout.rb +27 -0
- data/lib/fukuzatsu/parser.rb +4 -2
- data/lib/fukuzatsu/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f07a403fbf77bc5aa045f8d28699999fbc954550
|
4
|
+
data.tar.gz: 1fabf7d8de5355aef3458d402a8ee3d643fd07ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 804fea9b31e7394be09f5bb7450acd91e337d6228c9a53aaacac565f642ae010a2d5e60262fa2875a0a5520f981efee8d265ad8f2bed9cd65ce23e0290fb23b8
|
7
|
+
data.tar.gz: e739fe0ebda996301973c086718d5718b587ce8759cba071d260ff593cb4d08d5e3dda5f83e9af47d08ccf1ceff8e9f2202b69b8909ca5085a2272281bbc6105
|
data/bin/fuku
CHANGED
data/lib/fukuzatsu.rb
CHANGED
@@ -13,6 +13,7 @@ require_relative "fukuzatsu/formatters/html"
|
|
13
13
|
require_relative "fukuzatsu/formatters/html_index"
|
14
14
|
require_relative "fukuzatsu/formatters/json"
|
15
15
|
require_relative "fukuzatsu/formatters/json_index"
|
16
|
+
require_relative "fukuzatsu/formatters/json_stdout"
|
16
17
|
require_relative "fukuzatsu/formatters/text"
|
17
18
|
require_relative "fukuzatsu/parser"
|
18
19
|
require_relative "fukuzatsu/summary"
|
@@ -28,6 +29,7 @@ module Fukuzatsu
|
|
28
29
|
html: Fukuzatsu::Formatters::Html,
|
29
30
|
csv: Fukuzatsu::Formatters::Csv,
|
30
31
|
json: Fukuzatsu::Formatters::Json,
|
32
|
+
json_stdout: Fukuzatsu::Formatters::JsonStdout,
|
31
33
|
text: Fukuzatsu::Formatters::Text
|
32
34
|
}
|
33
35
|
end
|
data/lib/fukuzatsu/cli.rb
CHANGED
@@ -5,7 +5,7 @@ module Fukuzatsu
|
|
5
5
|
|
6
6
|
class CLI < Thor
|
7
7
|
|
8
|
-
desc_text = "Formats are text (default, to STDOUT), html, and csv. "
|
8
|
+
desc_text = "Formats are text (default, to STDOUT), html, json, json_stdout, and csv. "
|
9
9
|
desc_text << "Example: fuku check foo/ -f html"
|
10
10
|
|
11
11
|
desc "check PATH_TO_FILE [-f FORMAT] [-t MAX_COMPLEXITY_ALLOWED] [-o OUTPUT_PATH]", desc_text
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Fukuzatsu
|
2
|
+
|
3
|
+
module Formatters
|
4
|
+
|
5
|
+
class JsonStdout
|
6
|
+
|
7
|
+
include Formatters::Base
|
8
|
+
|
9
|
+
attr_reader :summaries
|
10
|
+
|
11
|
+
def self.reset_output_directory(base_output_path)
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.no_stdout?
|
15
|
+
true
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.index(summaries, base_output_path)
|
19
|
+
puts summaries.map { |summary| Json.new(summary: summary, base_output_path: base_output_path).as_json }.to_json
|
20
|
+
end
|
21
|
+
|
22
|
+
def export
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/lib/fukuzatsu/parser.rb
CHANGED
@@ -27,8 +27,10 @@ module Fukuzatsu
|
|
27
27
|
summaries.uniq(&:container_name).each do |summary|
|
28
28
|
self.formatter.new(summary: summary, base_output_path: self.output_path).export
|
29
29
|
end
|
30
|
-
|
31
|
-
|
30
|
+
unless self.formatter.no_stdout?
|
31
|
+
explain
|
32
|
+
check_complexity
|
33
|
+
end
|
32
34
|
end
|
33
35
|
|
34
36
|
private
|
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: 2.
|
4
|
+
version: 2.3.0
|
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: 2014-12-
|
12
|
+
date: 2014-12-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: analyst
|
@@ -237,6 +237,7 @@ files:
|
|
237
237
|
- lib/fukuzatsu/formatters/html_index.rb
|
238
238
|
- lib/fukuzatsu/formatters/json.rb
|
239
239
|
- lib/fukuzatsu/formatters/json_index.rb
|
240
|
+
- lib/fukuzatsu/formatters/json_stdout.rb
|
240
241
|
- lib/fukuzatsu/formatters/templates/index.html.haml
|
241
242
|
- lib/fukuzatsu/formatters/templates/output.html.haml
|
242
243
|
- lib/fukuzatsu/formatters/text.rb
|