rails_code_qa 0.4.2 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown ADDED
@@ -0,0 +1,50 @@
1
+ # Rails Code QA
2
+
3
+ ## Installation
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
+ Add the following to your gemfile
12
+
13
+ gem 'rails_code_qa'
14
+
15
+ Add the following to your test/test_helper.rb file
16
+
17
+ require 'simplecov'
18
+ SimpleCov.start 'rails'
19
+
20
+ ## Usage:
21
+
22
+ #Everything:
23
+ rake rcqa
24
+
25
+ #Just tests and coverage:
26
+ rake rcqa:test
27
+
28
+ #Just Flog:
29
+ rake rcqa:flog
30
+
31
+ #Just Flay:
32
+ rake rcqa:flay
33
+
34
+ ## Features
35
+ ### 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
41
+
42
+ ### Ruby 1.9.x
43
+
44
+ * Runs tests with simplecov
45
+ * Runs Flog
46
+ * Runs Flay
47
+
48
+
49
+
50
+ Copyright (c) 2009-2011 Nathan Humbert, released under the MIT license
@@ -8,4 +8,5 @@ module RailsCodeQa
8
8
  end
9
9
 
10
10
  end
11
+
11
12
  end
@@ -22,20 +22,29 @@ namespace :rcqa do
22
22
  puts "Running #{section_name.singularize} tests"
23
23
  puts "#################################################"
24
24
  Rake::Task["rcqa:#{section_name}"].invoke
25
- unless section[:folders].nil?
26
- puts "HTML output: <file:///#{File.join([Rails.root, 'coverage', section_name, 'index.html'])}>"
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"
27
30
  end
28
- puts "\n\n"
31
+ end
32
+ if '1.9'.respond_to?(:encoding)
33
+ puts "Coverage output: <file:///#{File.join([Rails.root, 'coverage', 'index.html'])}>"
29
34
  end
30
35
  end
31
36
 
32
37
  SECTIONS.each do |section_name, section|
33
38
  unless section[:folders].nil?
34
- Rcov::RcovTask.new("#{section_name}") do |t|
35
- t.libs << "test"
36
- t.test_files = Dir["test/#{section_name.singularize}/**/*_test.rb"]
37
- t.rcov_opts = ["--html", "--text-report", "--exclude '^(?!(#{section[:folders]}))'"]
38
- t.output_dir = "coverage/#{section_name}"
39
+ if '1.9'.respond_to?(:encoding)
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
39
48
  end
40
49
  end
41
50
  end
metadata CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 4
9
- - 2
10
- version: 0.4.2
8
+ - 5
9
+ - 0
10
+ version: 0.5.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Nathan Humbert
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-19 00:00:00 Z
18
+ date: 2011-09-08 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rcov
@@ -65,6 +65,22 @@ dependencies:
65
65
  version: 1.4.2
66
66
  type: :runtime
67
67
  version_requirements: *id003
68
+ - !ruby/object:Gem::Dependency
69
+ name: simplecov
70
+ prerelease: false
71
+ requirement: &id004 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ hash: 15
77
+ segments:
78
+ - 0
79
+ - 4
80
+ - 0
81
+ version: 0.4.0
82
+ type: :runtime
83
+ version_requirements: *id004
68
84
  description: This gem uses several different methods to help QA the code in your rails app
69
85
  email:
70
86
  - nathan.humbert+rcqa@gmail.com
@@ -75,7 +91,7 @@ extensions: []
75
91
  extra_rdoc_files: []
76
92
 
77
93
  files:
78
- - README
94
+ - README.markdown
79
95
  - MIT_LICENSE
80
96
  - lib/tasks/rails_code_qa.rake
81
97
  - lib/rails_code_qa.rb
@@ -110,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
126
  requirements: []
111
127
 
112
128
  rubyforge_project:
113
- rubygems_version: 1.7.2
129
+ rubygems_version: 1.8.6
114
130
  signing_key:
115
131
  specification_version: 3
116
132
  summary: Rails Code QA
data/README DELETED
@@ -1,24 +0,0 @@
1
- Rails Code QA
2
-
3
- Currently does the following:
4
- - Runs unit and functional tests with rcov for code coverage
5
- - Runs integration tests
6
- - Runs Flog
7
- - Runs Flay
8
-
9
- Usage:
10
-
11
- Everything:
12
- rake rcqa
13
-
14
- Just tests and coverage:
15
- rake rcqa:test
16
-
17
- Just Flog:
18
- rake rcqa:flog
19
-
20
- Just Flay:
21
- rake rcqa:flay
22
-
23
-
24
- Copyright (c) 2009-2010 Nathan Humbert, released under the MIT license