rails_code_qa 0.5.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT_LICENSE +1 -1
- data/README.markdown +4 -14
- data/lib/rails_code_qa/railtie.rb +1 -1
- data/lib/tasks/rails_code_qa.rake +8 -26
- metadata +32 -37
data/MIT_LICENSE
CHANGED
data/README.markdown
CHANGED
@@ -2,12 +2,6 @@
|
|
2
2
|
|
3
3
|
## Installation
|
4
4
|
|
5
|
-
### Ruby 1.8.x
|
6
|
-
Add the following to your gemfile
|
7
|
-
|
8
|
-
gem 'rails_code_qa'
|
9
|
-
|
10
|
-
### Ruby 1.9.x
|
11
5
|
Add the following to your gemfile
|
12
6
|
|
13
7
|
gem 'rails_code_qa'
|
@@ -21,23 +15,19 @@ Add the following to your test/test_helper.rb file
|
|
21
15
|
|
22
16
|
#Everything:
|
23
17
|
rake rcqa
|
24
|
-
|
18
|
+
|
25
19
|
#Just tests and coverage:
|
26
20
|
rake rcqa:test
|
27
|
-
|
21
|
+
|
28
22
|
#Just Flog:
|
29
23
|
rake rcqa:flog
|
30
|
-
|
24
|
+
|
31
25
|
#Just Flay:
|
32
26
|
rake rcqa:flay
|
33
27
|
|
34
28
|
## Features
|
35
29
|
### Ruby 1.8.x
|
36
|
-
|
37
|
-
* Runs unit and functional tests with rcov for code coverage
|
38
|
-
* Runs integration tests
|
39
|
-
* Runs Flog
|
40
|
-
* Runs Flay
|
30
|
+
No longer supported
|
41
31
|
|
42
32
|
### Ruby 1.9.x
|
43
33
|
|
@@ -1,6 +1,4 @@
|
|
1
|
-
require 'rcov/rcovtask'
|
2
1
|
require 'task_helpers'
|
3
|
-
require 'flog'
|
4
2
|
|
5
3
|
desc 'Run all Rails Code QA tests'
|
6
4
|
task :rcqa => ["rcqa:default"]
|
@@ -11,7 +9,7 @@ namespace :rcqa do
|
|
11
9
|
"units" => {:folders => "app\/models|app\/helpers|lib"},
|
12
10
|
"functionals" => {:folders => "app\/controllers|app\/mailers"},
|
13
11
|
"integration" => {}
|
14
|
-
}
|
12
|
+
}
|
15
13
|
|
16
14
|
task :default => [:test, :flog, :flay]
|
17
15
|
|
@@ -22,39 +20,23 @@ namespace :rcqa do
|
|
22
20
|
puts "Running #{section_name.singularize} tests"
|
23
21
|
puts "#################################################"
|
24
22
|
Rake::Task["rcqa:#{section_name}"].invoke
|
25
|
-
unless '1.9'.respond_to?(:encoding)
|
26
|
-
unless section[:folders].nil?
|
27
|
-
puts "HTML output: <file:///#{File.join([Rails.root, 'coverage', section_name, 'index.html'])}>"
|
28
|
-
end
|
29
|
-
puts "\n\n"
|
30
|
-
end
|
31
|
-
end
|
32
|
-
if '1.9'.respond_to?(:encoding)
|
33
|
-
puts "Coverage output: <file:///#{File.join([Rails.root, 'coverage', 'index.html'])}>"
|
34
23
|
end
|
24
|
+
puts "Coverage output: <file:///#{File.join([Rails.root, 'coverage', 'index.html'])}>"
|
35
25
|
end
|
36
26
|
|
37
27
|
SECTIONS.each do |section_name, section|
|
38
28
|
unless section[:folders].nil?
|
39
|
-
|
40
|
-
task section_name.to_sym => ["test:#{section_name}"]
|
41
|
-
else
|
42
|
-
Rcov::RcovTask.new("#{section_name}") do |t|
|
43
|
-
t.libs << "test"
|
44
|
-
t.test_files = Dir["test/#{section_name.singularize}/**/*_test.rb"]
|
45
|
-
t.rcov_opts = ["--html", "--text-report", "--exclude '^(?!(#{section[:folders]}))'"]
|
46
|
-
t.output_dir = "coverage/#{section_name}"
|
47
|
-
end
|
48
|
-
end
|
29
|
+
task section_name.to_sym => ["test:#{section_name}"]
|
49
30
|
end
|
50
31
|
end
|
51
32
|
|
52
33
|
task :integration => ["test:integration"]
|
53
34
|
|
54
35
|
desc "Run Flog"
|
55
|
-
task(:flog) do
|
56
|
-
|
57
|
-
flog_runner(
|
36
|
+
task(:flog) do
|
37
|
+
require 'flog'
|
38
|
+
flog_runner(20, ['app/models', 'app/helpers', 'lib'])
|
39
|
+
flog_runner(35, ['app/controllers'])
|
58
40
|
end
|
59
41
|
|
60
42
|
desc "Run Flay"
|
@@ -62,7 +44,7 @@ namespace :rcqa do
|
|
62
44
|
require 'flay'
|
63
45
|
puts "=============================================="
|
64
46
|
puts "Flay output: "
|
65
|
-
threshold =
|
47
|
+
threshold = 20
|
66
48
|
flay = Flay.new({:fuzzy => false, :verbose => false, :mass => threshold})
|
67
49
|
flay.process(*Flay.expand_dirs_to_files(['app/models', 'app/helpers', 'lib']))
|
68
50
|
flay.report
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_code_qa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 23
|
5
|
+
prerelease:
|
5
6
|
segments:
|
6
|
-
- 0
|
7
|
-
- 5
|
8
7
|
- 1
|
9
|
-
|
8
|
+
- 0
|
9
|
+
- 0
|
10
|
+
version: 1.0.0
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Nathan Humbert
|
@@ -14,65 +15,56 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date:
|
18
|
-
default_executable:
|
18
|
+
date: 2013-03-12 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
|
-
name:
|
21
|
+
name: flog
|
22
22
|
prerelease: false
|
23
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
24
25
|
requirements:
|
25
|
-
- -
|
26
|
+
- - ~>
|
26
27
|
- !ruby/object:Gem::Version
|
28
|
+
hash: 11
|
27
29
|
segments:
|
28
|
-
-
|
29
|
-
-
|
30
|
-
-
|
31
|
-
version:
|
30
|
+
- 3
|
31
|
+
- 2
|
32
|
+
- 2
|
33
|
+
version: 3.2.2
|
32
34
|
type: :runtime
|
33
35
|
version_requirements: *id001
|
34
36
|
- !ruby/object:Gem::Dependency
|
35
|
-
name:
|
37
|
+
name: flay
|
36
38
|
prerelease: false
|
37
39
|
requirement: &id002 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
38
41
|
requirements:
|
39
|
-
- -
|
42
|
+
- - ~>
|
40
43
|
- !ruby/object:Gem::Version
|
44
|
+
hash: 11
|
41
45
|
segments:
|
42
46
|
- 2
|
43
|
-
- 5
|
44
47
|
- 1
|
45
|
-
|
48
|
+
- 0
|
49
|
+
version: 2.1.0
|
46
50
|
type: :runtime
|
47
51
|
version_requirements: *id002
|
48
|
-
- !ruby/object:Gem::Dependency
|
49
|
-
name: flay
|
50
|
-
prerelease: false
|
51
|
-
requirement: &id003 !ruby/object:Gem::Requirement
|
52
|
-
requirements:
|
53
|
-
- - "="
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
segments:
|
56
|
-
- 1
|
57
|
-
- 4
|
58
|
-
- 2
|
59
|
-
version: 1.4.2
|
60
|
-
type: :runtime
|
61
|
-
version_requirements: *id003
|
62
52
|
- !ruby/object:Gem::Dependency
|
63
53
|
name: simplecov
|
64
54
|
prerelease: false
|
65
|
-
requirement: &
|
55
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
56
|
+
none: false
|
66
57
|
requirements:
|
67
58
|
- - ~>
|
68
59
|
- !ruby/object:Gem::Version
|
60
|
+
hash: 1
|
69
61
|
segments:
|
70
62
|
- 0
|
71
|
-
-
|
72
|
-
-
|
73
|
-
version: 0.
|
63
|
+
- 7
|
64
|
+
- 1
|
65
|
+
version: 0.7.1
|
74
66
|
type: :runtime
|
75
|
-
version_requirements: *
|
67
|
+
version_requirements: *id003
|
76
68
|
description: This gem uses several different methods to help QA the code in your rails app
|
77
69
|
email:
|
78
70
|
- nathan.humbert+rcqa@gmail.com
|
@@ -89,7 +81,6 @@ files:
|
|
89
81
|
- lib/rails_code_qa.rb
|
90
82
|
- lib/rails_code_qa/railtie.rb
|
91
83
|
- lib/task_helpers.rb
|
92
|
-
has_rdoc: true
|
93
84
|
homepage: http://github.com/nathanhumbert/rails_code_qa
|
94
85
|
licenses: []
|
95
86
|
|
@@ -99,23 +90,27 @@ rdoc_options: []
|
|
99
90
|
require_paths:
|
100
91
|
- lib
|
101
92
|
required_ruby_version: !ruby/object:Gem::Requirement
|
93
|
+
none: false
|
102
94
|
requirements:
|
103
95
|
- - ">="
|
104
96
|
- !ruby/object:Gem::Version
|
97
|
+
hash: 3
|
105
98
|
segments:
|
106
99
|
- 0
|
107
100
|
version: "0"
|
108
101
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
|
+
none: false
|
109
103
|
requirements:
|
110
104
|
- - ">="
|
111
105
|
- !ruby/object:Gem::Version
|
106
|
+
hash: 3
|
112
107
|
segments:
|
113
108
|
- 0
|
114
109
|
version: "0"
|
115
110
|
requirements: []
|
116
111
|
|
117
112
|
rubyforge_project:
|
118
|
-
rubygems_version: 1.
|
113
|
+
rubygems_version: 1.8.23
|
119
114
|
signing_key:
|
120
115
|
specification_version: 3
|
121
116
|
summary: Rails Code QA
|