code_poetry 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +1 -0
- data/.travis.yml +4 -0
- data/Gemfile +5 -0
- data/README.md +9 -0
- data/Rakefile +10 -1
- data/code_poetry.gemspec +9 -10
- data/lib/code_poetry/calculator.rb +5 -14
- data/lib/code_poetry/method.rb +23 -0
- data/lib/code_poetry/smell.rb +22 -0
- data/lib/code_poetry/stat.rb +31 -34
- data/lib/code_poetry/version.rb +1 -1
- data/lib/code_poetry/warning_scanner.rb +1 -1
- data/spec/dummy_files/1.rb +11 -0
- data/spec/dummy_files/2.rb +11 -0
- data/spec/method_spec.rb +29 -0
- data/spec/smell_spec.rb +39 -0
- data/spec/spec_helper.rb +12 -0
- data/spec/stat_spec.rb +133 -0
- data/spec/warning_scanner_spec.rb +18 -0
- metadata +21 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4351c2bdcf92e1b45ec1dace93b7923afca53c3f
|
4
|
+
data.tar.gz: 753445520ef195ff57eecc8697e93486ebd370fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0756a302d0bd0b14477e6dbd36b77c7aa9fb5c86428b8171635fa245c1e9b985ce0a57bb0ee9902c0946f6b27a9e253a0fad15db5713238acdad948829deb5c3
|
7
|
+
data.tar.gz: 3ad8999a9690de69339b9af840f0e6a1733d206c3b18767873ed2b9477ff2864e0bcb8d59a29883a800708f6e00db75834305dec01d005e44529d924b80c843f
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Code Poetry
|
2
2
|
|
3
|
+
[![Gem Version][rgb]][rgl] [![Build Status][trb]][trl] [![Code Climate][ccb]][ccl]
|
4
|
+
|
3
5
|
The poor men's [Code Climate][cc].
|
4
6
|
|
5
7
|
Analyzes the code of your Rails app and generates a straightforward HTML report.
|
@@ -36,6 +38,13 @@ This will generate a HTML report to ```metrics/index.html```.
|
|
36
38
|
4. Push to the branch (`git push origin my-new-feature`)
|
37
39
|
5. Create new Pull Request
|
38
40
|
|
41
|
+
[rgb]: https://badge.fury.io/rb/code_poetry.png
|
42
|
+
[rgl]: http://badge.fury.io/rb/code_poetry
|
43
|
+
[trb]: https://travis-ci.org/coding-chimp/code_poetry.png?branch=master
|
44
|
+
[trl]: https://travis-ci.org/coding-chimp/code_poetry
|
45
|
+
[ccb]: https://codeclimate.com/github/coding-chimp/code_poetry.png
|
46
|
+
[ccl]: https://codeclimate.com/github/coding-chimp/code_poetry
|
47
|
+
|
39
48
|
[cc]: https://codeclimate.com
|
40
49
|
[ch]: https://github.com/danmayer/churn
|
41
50
|
[fl]: https://github.com/seattlerb/flog
|
data/Rakefile
CHANGED
data/code_poetry.gemspec
CHANGED
@@ -4,25 +4,24 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
require 'code_poetry/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
7
|
+
spec.name = 'code_poetry'
|
8
8
|
spec.version = CodePoetry::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
9
|
+
spec.authors = ['Bastian Bartmann']
|
10
|
+
spec.email = ['babartmann@gmail.com']
|
11
11
|
spec.description = %q{Analyzes the code of your Rails app and generates a straightforward HTML report.}
|
12
12
|
spec.summary = %q{The poor men's Code Climate}
|
13
|
-
spec.homepage =
|
14
|
-
spec.license =
|
13
|
+
spec.homepage = 'https://github.com/coding-chimp/code_poetry'
|
14
|
+
spec.license = 'MIT'
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
17
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = [
|
19
|
+
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.add_development_dependency
|
22
|
-
spec.add_development_dependency
|
21
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
22
|
+
spec.add_development_dependency 'rake'
|
23
23
|
|
24
|
-
spec.add_runtime_dependency 'code_poetry-html', ['~> 0.
|
25
|
-
spec.add_runtime_dependency 'code_metrics', ['~> 0.1']
|
24
|
+
spec.add_runtime_dependency 'code_poetry-html', ['~> 0.1']
|
26
25
|
spec.add_runtime_dependency 'churn', ['~> 0.0']
|
27
26
|
spec.add_runtime_dependency 'flog', ['~> 4.2']
|
28
27
|
end
|
@@ -20,6 +20,7 @@ module CodePoetry
|
|
20
20
|
|
21
21
|
stat.set_churns(@churns[file])
|
22
22
|
measure_flog(stat)
|
23
|
+
stat.set_smells
|
23
24
|
|
24
25
|
@stats << stat
|
25
26
|
end
|
@@ -42,28 +43,18 @@ module CodePoetry
|
|
42
43
|
flogger.flog(stat.file)
|
43
44
|
flogger.calculate
|
44
45
|
|
45
|
-
outside_methods = 0
|
46
|
-
|
47
46
|
unless flogger.scores.empty?
|
48
47
|
klass = flogger.scores.first[0]
|
49
|
-
stat.complexity = flogger.total_score.round(
|
50
|
-
stat.complexity_per_method = flogger.average.round(
|
48
|
+
stat.complexity = flogger.total_score.round(0)
|
49
|
+
stat.complexity_per_method = flogger.average.round(0)
|
51
50
|
|
52
51
|
flogger.method_scores[klass].each do |name, score|
|
53
|
-
next if score.nil?
|
54
|
-
|
55
52
|
name = (name.match(/#(.+)/) || name.match(/::(.+)/))[1]
|
56
|
-
|
57
|
-
|
58
|
-
if method
|
59
|
-
method[:complexity] = score.round(2)
|
60
|
-
else
|
61
|
-
outside_methods += score
|
62
|
-
end
|
53
|
+
stat.set_method_complexity(name, score)
|
63
54
|
end
|
64
55
|
end
|
65
56
|
|
66
|
-
stat.
|
57
|
+
stat.definition_complexity = stat.definition_complexity.round(0)
|
67
58
|
end
|
68
59
|
end
|
69
60
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module CodePoetry
|
2
|
+
class Method
|
3
|
+
attr_accessor :node, :name, :first_line, :last_line, :complexity
|
4
|
+
|
5
|
+
def initialize(node, name, first_line, last_line)
|
6
|
+
@node = node
|
7
|
+
@name = name
|
8
|
+
@first_line = first_line
|
9
|
+
@last_line = last_line
|
10
|
+
@complexity = 0
|
11
|
+
end
|
12
|
+
|
13
|
+
def smelly?
|
14
|
+
complexity > 25
|
15
|
+
end
|
16
|
+
|
17
|
+
def pretty_name
|
18
|
+
symbol = node == :def ? "." : "#"
|
19
|
+
name.prepend(symbol)
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module CodePoetry
|
2
|
+
class Smell
|
3
|
+
attr_accessor :type, :method
|
4
|
+
|
5
|
+
def initialize(type, method = nil)
|
6
|
+
@type = type
|
7
|
+
@method = method
|
8
|
+
end
|
9
|
+
|
10
|
+
def complex_class?
|
11
|
+
@type == "ComplexClass"
|
12
|
+
end
|
13
|
+
|
14
|
+
def complex_class_definition?
|
15
|
+
@type == "ComplexClassDefinition"
|
16
|
+
end
|
17
|
+
|
18
|
+
def complex_method?
|
19
|
+
@type == "ComplexMethod"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
data/lib/code_poetry/stat.rb
CHANGED
@@ -1,14 +1,18 @@
|
|
1
|
+
require 'code_poetry/method'
|
1
2
|
require 'code_poetry/warning_scanner'
|
3
|
+
require 'code_poetry/smell'
|
2
4
|
|
3
5
|
module CodePoetry
|
4
6
|
class Stat
|
5
|
-
attr_accessor :file, :name, :lines, :lines_of_code, :churns, :complexity, :
|
7
|
+
attr_accessor :file, :name, :lines, :lines_of_code, :churns, :complexity, :methods, :smells
|
8
|
+
attr_accessor :complexity_per_method, :definition_complexity
|
6
9
|
|
7
10
|
def initialize(file)
|
8
|
-
@lines_of_code, @churns, @complexity, @complexity_per_method = 0, 0, 0, 0
|
11
|
+
@lines_of_code, @churns, @complexity, @complexity_per_method, @definition_complexity = 0, 0, 0, 0, 0
|
9
12
|
@file = file
|
10
13
|
@lines = {}
|
11
|
-
@
|
14
|
+
@methods = []
|
15
|
+
@smells = []
|
12
16
|
|
13
17
|
parse_file
|
14
18
|
end
|
@@ -18,41 +22,24 @@ module CodePoetry
|
|
18
22
|
end
|
19
23
|
|
20
24
|
def get_method(name)
|
21
|
-
|
22
|
-
method[0] unless method.empty?
|
25
|
+
@methods.find{|method| method.name == name}
|
23
26
|
end
|
24
27
|
|
25
|
-
def set_method_complexity(name,
|
26
|
-
method =
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
@details.unshift({name: "none", complexity: complexity})
|
28
|
+
def set_method_complexity(name, score)
|
29
|
+
if method = get_method(name)
|
30
|
+
method.complexity = score.round(0)
|
31
|
+
else
|
32
|
+
@definition_complexity += score
|
33
|
+
end
|
32
34
|
end
|
33
35
|
|
34
36
|
def get_method_at_line(line)
|
35
|
-
@method
|
36
|
-
|
37
|
-
@details.each do |detail|
|
38
|
-
next if detail[:first_line].nil?
|
39
|
-
|
40
|
-
if detail[:last_line].nil?
|
41
|
-
if detail[:first_line] == line
|
42
|
-
@method = detail
|
43
|
-
break
|
44
|
-
else
|
45
|
-
next
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
if detail[:first_line] <= line && detail[:last_line] >= line
|
50
|
-
@method = detail
|
51
|
-
break
|
52
|
-
end
|
53
|
-
end
|
37
|
+
@methods.find{|method| method.first_line <= line && method.last_line >= line}
|
38
|
+
end
|
54
39
|
|
55
|
-
|
40
|
+
def set_smells
|
41
|
+
set_class_smells
|
42
|
+
set_method_smells
|
56
43
|
end
|
57
44
|
|
58
45
|
private
|
@@ -97,13 +84,13 @@ module CodePoetry
|
|
97
84
|
name, first_line = find_method_params(element)
|
98
85
|
|
99
86
|
if @indentation_warnings['def'] && @indentation_warnings['def'].any? { |first, last| first == first_line }
|
100
|
-
warning = @indentation_warnings['def'].
|
87
|
+
warning = @indentation_warnings['def'].find{|first, last| first == first_line}
|
101
88
|
last_line = warning[1]
|
102
89
|
else
|
103
90
|
last_line = find_last_line(name, first_line)
|
104
91
|
end
|
105
92
|
|
106
|
-
@
|
93
|
+
@methods << Method.new(element.first, name, first_line, last_line)
|
107
94
|
else
|
108
95
|
scan_sexp(element)
|
109
96
|
end
|
@@ -129,5 +116,15 @@ module CodePoetry
|
|
129
116
|
warning_scanner = WarningScanner.new
|
130
117
|
warning_scanner.scan(@content)
|
131
118
|
end
|
119
|
+
|
120
|
+
def set_class_smells
|
121
|
+
@smells << Smell.new("ComplexClass") if @complexity > 150
|
122
|
+
@smells << Smell.new("ComplexClassDefinition") if @definition_complexity > 40
|
123
|
+
end
|
124
|
+
|
125
|
+
def set_method_smells
|
126
|
+
smelly_methods = @methods.select{|method| method.smelly?}
|
127
|
+
@smells.concat smelly_methods.map{|method| Smell.new("ComplexMethod", method)}
|
128
|
+
end
|
132
129
|
end
|
133
130
|
end
|
data/lib/code_poetry/version.rb
CHANGED
data/spec/method_spec.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require_relative '../lib/code_poetry/method'
|
3
|
+
|
4
|
+
describe CodePoetry::Method do
|
5
|
+
let(:method) { CodePoetry::Method.new(:def, "smelly?", 8, 10) }
|
6
|
+
|
7
|
+
describe ".smell?" do
|
8
|
+
it "returns true if the complexity is greater 25" do
|
9
|
+
method.complexity = 26
|
10
|
+
expect(method.smelly?).to be_true
|
11
|
+
end
|
12
|
+
|
13
|
+
it "returns false if the complexity is less or equal 25" do
|
14
|
+
method.complexity = 25
|
15
|
+
expect(method.smelly?).to be_false
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
describe ".pretty_name" do
|
20
|
+
it "prepends a '.' to the name if the method is an instance method" do
|
21
|
+
expect(method.pretty_name).to eq(".smelly?")
|
22
|
+
end
|
23
|
+
|
24
|
+
it "prepends a '#' to the name if the method is an class method" do
|
25
|
+
method.node = :defs
|
26
|
+
expect(method.pretty_name).to eq("#smelly?")
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
data/spec/smell_spec.rb
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require_relative '../lib/code_poetry/smell'
|
3
|
+
|
4
|
+
describe CodePoetry::Smell do
|
5
|
+
let(:smell) { CodePoetry::Smell.new("ComplexClass") }
|
6
|
+
|
7
|
+
describe ".complex_class?" do
|
8
|
+
it "returns true if the smells type is 'ComplexClass'" do
|
9
|
+
expect(smell.complex_class?).to be_true
|
10
|
+
end
|
11
|
+
|
12
|
+
it "returns false if the smell type isn't 'ComplexClass'" do
|
13
|
+
smell.type = "ComplexClassDefinition"
|
14
|
+
expect(smell.complex_class?).to be_false
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
describe ".complex_class_definition?" do
|
19
|
+
it "returns true if the smells type is 'ComplexClassDefinition'" do
|
20
|
+
smell.type = "ComplexClassDefinition"
|
21
|
+
expect(smell.complex_class_definition?).to be_true
|
22
|
+
end
|
23
|
+
|
24
|
+
it "returns false if the smell type isn't 'ComplexClassDefinition'" do
|
25
|
+
expect(smell.complex_class_definition?).to be_false
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
describe ".complex_method?" do
|
30
|
+
it "returns true if the smells type is 'ComplexMethod'" do
|
31
|
+
smell.type = "ComplexMethod"
|
32
|
+
expect(smell.complex_method?).to be_true
|
33
|
+
end
|
34
|
+
|
35
|
+
it "returns false if the smell type isn't 'ComplexMethod'" do
|
36
|
+
expect(smell.complex_method?).to be_false
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
data/spec/spec_helper.rb
ADDED
data/spec/stat_spec.rb
ADDED
@@ -0,0 +1,133 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'ripper'
|
3
|
+
require_relative '../lib/code_poetry/stat'
|
4
|
+
|
5
|
+
describe CodePoetry::Stat do
|
6
|
+
let(:stat) { CodePoetry::Stat.new(test_file(1)) }
|
7
|
+
|
8
|
+
describe ".initialize" do
|
9
|
+
it "sets the correct stat name" do
|
10
|
+
expect(stat.name).to eq("Foo")
|
11
|
+
end
|
12
|
+
|
13
|
+
it "counts the correct number of lines and lines of code" do
|
14
|
+
expect(stat.lines.count).to eq(11)
|
15
|
+
expect(stat.lines_of_code).to eq(8)
|
16
|
+
end
|
17
|
+
|
18
|
+
it "sets the methods correctly" do
|
19
|
+
expect(stat.methods.count).to eq(2)
|
20
|
+
|
21
|
+
method = stat.get_method("bar?")
|
22
|
+
expect(method.node).to eq(:defs)
|
23
|
+
expect(method.first_line).to eq(3)
|
24
|
+
expect(method.last_line).to eq(5)
|
25
|
+
|
26
|
+
method = stat.get_method("fooz?")
|
27
|
+
expect(method.node).to eq(:def)
|
28
|
+
expect(method.first_line).to eq(7)
|
29
|
+
expect(method.last_line).to eq(9)
|
30
|
+
end
|
31
|
+
|
32
|
+
it "sets the methods correctly even if they have indentation errors" do
|
33
|
+
stat = CodePoetry::Stat.new(test_file(2))
|
34
|
+
|
35
|
+
expect(stat.methods.count).to eq(2)
|
36
|
+
|
37
|
+
method = stat.get_method("bar?")
|
38
|
+
expect(method.node).to eq(:defs)
|
39
|
+
expect(method.first_line).to eq(3)
|
40
|
+
expect(method.last_line).to eq(5)
|
41
|
+
|
42
|
+
method = stat.get_method("fooz?")
|
43
|
+
expect(method.node).to eq(:def)
|
44
|
+
expect(method.first_line).to eq(7)
|
45
|
+
expect(method.last_line).to eq(9)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
describe ".set_churns" do
|
50
|
+
it "sets the churns" do
|
51
|
+
stat.set_churns(10)
|
52
|
+
expect(stat.churns).to eq(10)
|
53
|
+
end
|
54
|
+
|
55
|
+
it "leaves the churns alone, if the param is nil" do
|
56
|
+
stat.churns = 10
|
57
|
+
stat.set_churns(nil)
|
58
|
+
expect(stat.churns).to eq(10)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
describe ".get_method" do
|
63
|
+
it "returns the method with the specified name" do
|
64
|
+
expect(stat.get_method("bar?").first_line).to eq(3)
|
65
|
+
expect(stat.get_method("fooz?").first_line).to eq(7)
|
66
|
+
end
|
67
|
+
|
68
|
+
it "returns nil if there is no mehtod with the specified name" do
|
69
|
+
expect(stat.get_method("bar")).to eq(nil)
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
describe ".set_method_complexity" do
|
74
|
+
it "sets the complexity of the method with the specified name" do
|
75
|
+
stat.set_method_complexity("bar?", 200)
|
76
|
+
expect(stat.get_method("bar?").complexity).to eq(200)
|
77
|
+
end
|
78
|
+
|
79
|
+
it "adds the complexity to the definition_complexity if there is no method with the specified name" do
|
80
|
+
stat.definition_complexity = 25
|
81
|
+
stat.set_method_complexity("baz", 120)
|
82
|
+
expect(stat.definition_complexity).to eq(145)
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
describe ".get_method_at_line" do
|
87
|
+
it "return the method at the specified line" do
|
88
|
+
expect(stat.get_method_at_line(3).name).to eq("bar?")
|
89
|
+
expect(stat.get_method_at_line(7).name).to eq("fooz?")
|
90
|
+
end
|
91
|
+
|
92
|
+
it "returns nil if there is no mehtod at the specified line" do
|
93
|
+
expect(stat.get_method_at_line(20)).to eq(nil)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
describe ".set_smells" do
|
98
|
+
it "creates a 'ComplexClass' smell if the overall complexity is greater 150" do
|
99
|
+
stat.complexity = 151
|
100
|
+
stat.set_smells
|
101
|
+
expect(stat.smells.find{|smell| smell.type == "ComplexClass"}).to_not be_nil
|
102
|
+
end
|
103
|
+
|
104
|
+
it "creates no 'ComplexClass' smell if the overall complexity is less 151" do
|
105
|
+
stat.complexity = 150
|
106
|
+
stat.set_smells
|
107
|
+
expect(stat.smells.find{|smell| smell.type == "ComplexClass"}).to be_nil
|
108
|
+
end
|
109
|
+
|
110
|
+
it "creates a 'ComplexClassDefinition' smell if the definition complexity is greater 40" do
|
111
|
+
stat.definition_complexity = 41
|
112
|
+
stat.set_smells
|
113
|
+
expect(stat.smells.find{|smell| smell.type == "ComplexClassDefinition"}).to_not be_nil
|
114
|
+
end
|
115
|
+
|
116
|
+
it "creates no 'ComplexClassDefinition' smell if the definition complexity is less 41" do
|
117
|
+
stat.definition_complexity = 40
|
118
|
+
stat.set_smells
|
119
|
+
expect(stat.smells.find{|smell| smell.type == "ComplexClassDefinition"}).to be_nil
|
120
|
+
end
|
121
|
+
|
122
|
+
it "creates a 'ComplexMethod' smell if a methods complexity is greater 25" do
|
123
|
+
stat.set_method_complexity("bar?", 26)
|
124
|
+
stat.set_smells
|
125
|
+
expect(stat.smells.find{|smell| smell.type == "ComplexMethod"}).to_not be_nil
|
126
|
+
end
|
127
|
+
|
128
|
+
it "creates no 'ComplexMethod' smell if no methods complexity is greater 25" do
|
129
|
+
stat.set_smells
|
130
|
+
expect(stat.smells.find{|smell| smell.type == "ComplexMethod"}).to be_nil
|
131
|
+
end
|
132
|
+
end
|
133
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require_relative '../lib/code_poetry/warning_scanner'
|
3
|
+
|
4
|
+
describe CodePoetry::WarningScanner do
|
5
|
+
let(:scanner) { CodePoetry::WarningScanner.new }
|
6
|
+
|
7
|
+
describe ".scan" do
|
8
|
+
it "returns an array with warnings for every indendation in the source" do
|
9
|
+
source = File.open(test_file(1), "r").read
|
10
|
+
expect(scanner.scan(source).size).to eq(0)
|
11
|
+
|
12
|
+
source = File.open(test_file(2), "r").read
|
13
|
+
expect(scanner.scan(source)["def"].size).to eq(2)
|
14
|
+
expect(scanner.scan(source)["def"][0]).to eq([3, 5])
|
15
|
+
expect(scanner.scan(source)["def"][1]).to eq([7, 9])
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: code_poetry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bastian Bartmann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -40,20 +40,6 @@ dependencies:
|
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: code_poetry-html
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ~>
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0.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.0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: code_metrics
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
58
44
|
requirements:
|
59
45
|
- - ~>
|
@@ -103,6 +89,8 @@ extensions: []
|
|
103
89
|
extra_rdoc_files: []
|
104
90
|
files:
|
105
91
|
- .gitignore
|
92
|
+
- .rspec
|
93
|
+
- .travis.yml
|
106
94
|
- Gemfile
|
107
95
|
- LICENSE
|
108
96
|
- README.md
|
@@ -112,11 +100,20 @@ files:
|
|
112
100
|
- lib/code_poetry/calculator.rb
|
113
101
|
- lib/code_poetry/cli.rb
|
114
102
|
- lib/code_poetry/formatter.rb
|
103
|
+
- lib/code_poetry/method.rb
|
115
104
|
- lib/code_poetry/railtie.rb
|
105
|
+
- lib/code_poetry/smell.rb
|
116
106
|
- lib/code_poetry/stat.rb
|
117
107
|
- lib/code_poetry/version.rb
|
118
108
|
- lib/code_poetry/warning_scanner.rb
|
119
109
|
- lib/tasks/code_poetry.rake
|
110
|
+
- spec/dummy_files/1.rb
|
111
|
+
- spec/dummy_files/2.rb
|
112
|
+
- spec/method_spec.rb
|
113
|
+
- spec/smell_spec.rb
|
114
|
+
- spec/spec_helper.rb
|
115
|
+
- spec/stat_spec.rb
|
116
|
+
- spec/warning_scanner_spec.rb
|
120
117
|
homepage: https://github.com/coding-chimp/code_poetry
|
121
118
|
licenses:
|
122
119
|
- MIT
|
@@ -141,5 +138,12 @@ rubygems_version: 2.0.3
|
|
141
138
|
signing_key:
|
142
139
|
specification_version: 4
|
143
140
|
summary: The poor men's Code Climate
|
144
|
-
test_files:
|
141
|
+
test_files:
|
142
|
+
- spec/dummy_files/1.rb
|
143
|
+
- spec/dummy_files/2.rb
|
144
|
+
- spec/method_spec.rb
|
145
|
+
- spec/smell_spec.rb
|
146
|
+
- spec/spec_helper.rb
|
147
|
+
- spec/stat_spec.rb
|
148
|
+
- spec/warning_scanner_spec.rb
|
145
149
|
has_rdoc:
|