corundum 0.0.10 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/coverage/index.html +3706 -2868
- data/lib/corundum.rb +3 -1
- data/lib/corundum/configuration_store.rb +2 -2
- data/lib/corundum/default_configuration/templates/doc_assembly/index.html.erb +28 -0
- data/lib/corundum/documentation-task.rb +69 -0
- data/lib/corundum/documentation.rb +2 -0
- data/lib/corundum/documentation/assembly.rb +56 -0
- data/lib/corundum/{yardoc.rb → documentation/yardoc.rb} +9 -36
- data/lib/corundum/rspec-task.rb +78 -0
- data/lib/corundum/rspec.rb +15 -61
- data/lib/corundum/simplecov.rb +17 -31
- data/lib/corundum/tasklibs.rb +1 -1
- metadata +13 -8
data/lib/corundum/simplecov.rb
CHANGED
@@ -1,27 +1,20 @@
|
|
1
|
-
require 'corundum/
|
1
|
+
require 'corundum/documentation-task'
|
2
2
|
require 'corundum/browser-task'
|
3
3
|
|
4
4
|
module Corundum
|
5
|
-
class RSpecReportTask < RSpecTask
|
6
|
-
def command_task
|
7
|
-
@command_task ||= file task_name do
|
8
|
-
decorated(command).must_succeed!
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
5
|
|
13
|
-
class SimpleCov <
|
6
|
+
class SimpleCov < DocumentationTask
|
14
7
|
default_namespace :coverage
|
15
8
|
|
9
|
+
setting(:title, "Coverage report")
|
10
|
+
|
16
11
|
setting(:test_lib)
|
17
|
-
setting(:browser)
|
18
12
|
setting(:code_files)
|
19
13
|
setting(:all_files)
|
20
14
|
|
21
|
-
setting(:report_path, nil)
|
22
15
|
setting(:config_path, nil)
|
23
16
|
|
24
|
-
setting(:
|
17
|
+
setting(:sub_dir, "coverage")
|
25
18
|
setting(:config_file, ".simplecov")
|
26
19
|
setting(:filters, ["./spec"])
|
27
20
|
setting(:threshold, 80)
|
@@ -31,15 +24,15 @@ module Corundum
|
|
31
24
|
end)
|
32
25
|
|
33
26
|
def default_configuration(toolkit, testlib)
|
27
|
+
super(toolkit)
|
34
28
|
self.test_lib = testlib
|
35
|
-
self.browser = toolkit.browser
|
36
29
|
self.code_files = toolkit.files.code
|
37
30
|
self.all_files = toolkit.file_lists.project + toolkit.file_lists.code + toolkit.file_lists.test
|
38
31
|
end
|
39
32
|
|
40
33
|
def resolve_configuration
|
41
34
|
self.config_path ||= File::expand_path(config_file, Rake::original_dir)
|
42
|
-
|
35
|
+
super
|
43
36
|
end
|
44
37
|
|
45
38
|
def filter_lines
|
@@ -58,7 +51,7 @@ module Corundum
|
|
58
51
|
|
59
52
|
def config_file_contents
|
60
53
|
contents = ["SimpleCov.start do"]
|
61
|
-
contents << " coverage_dir \"#{
|
54
|
+
contents << " coverage_dir \"#{target_dir}\""
|
62
55
|
contents += filter_lines.map{|line| " " + line}
|
63
56
|
contents += group_lines.map{|line| " " + line}
|
64
57
|
contents << "end"
|
@@ -66,9 +59,8 @@ module Corundum
|
|
66
59
|
end
|
67
60
|
|
68
61
|
def define
|
62
|
+
super
|
69
63
|
in_namespace do
|
70
|
-
file "Rakefile"
|
71
|
-
|
72
64
|
task :example_config do
|
73
65
|
$stderr.puts "Try this in #{config_path}"
|
74
66
|
$stderr.puts "(You can just do #$0 > #{config_path})"
|
@@ -77,27 +69,21 @@ module Corundum
|
|
77
69
|
end
|
78
70
|
|
79
71
|
task :config_exists do
|
80
|
-
File::exists?(
|
72
|
+
File::exists?(config_path) or fail "No .simplecov (try: rake #{self[:example_config]})"
|
73
|
+
File::read(config_path) =~ /coverage_dir.*#{target_dir}/ or fail ".simplecov doesn't refer to #{target_dir}"
|
81
74
|
end
|
82
75
|
|
83
|
-
|
84
|
-
RSpecReportTask.new(@test_lib) do |t|
|
85
|
-
t.task_name = report_path
|
76
|
+
RSpecReportTask.new(@test_lib, :report => [:config_exists] + all_files) do |t|
|
86
77
|
t.rspec_opts += %w{-r simplecov}
|
87
78
|
end
|
88
|
-
file
|
79
|
+
file entry_path => :report
|
89
80
|
|
90
|
-
task :generate_report => [:preflight,
|
91
|
-
|
92
|
-
desc "View coverage in browser"
|
93
|
-
BrowserTask.new(self) do |t|
|
94
|
-
t.index_html = report_path
|
95
|
-
end
|
81
|
+
task :generate_report => [:preflight, entry_path]
|
96
82
|
|
97
83
|
task :verify_coverage => :generate_report do
|
98
84
|
require 'nokogiri'
|
99
85
|
|
100
|
-
doc = Nokogiri::parse(File::read(
|
86
|
+
doc = Nokogiri::parse(File::read(entry_path))
|
101
87
|
|
102
88
|
coverage_total_xpath = "//span[@class='covered_percent']/span"
|
103
89
|
percentage = doc.xpath(coverage_total_xpath).first.content.to_f
|
@@ -109,7 +95,7 @@ module Corundum
|
|
109
95
|
task :find_stragglers => :generate_report do
|
110
96
|
require 'nokogiri'
|
111
97
|
|
112
|
-
doc = Nokogiri::parse(File::read(
|
98
|
+
doc = Nokogiri::parse(File::read(entry_path))
|
113
99
|
|
114
100
|
covered_files = doc.xpath(
|
115
101
|
"//table[@class='file_list']//td//a[@class='src_link']").map do |link|
|
@@ -126,8 +112,8 @@ module Corundum
|
|
126
112
|
end
|
127
113
|
end
|
128
114
|
end
|
129
|
-
task :preflight => in_namespace(:config_exists)
|
130
115
|
|
116
|
+
task :preflight => in_namespace(:config_exists)
|
131
117
|
task :qa => in_namespace(:verify_coverage, :find_stragglers)
|
132
118
|
end
|
133
119
|
end
|
data/lib/corundum/tasklibs.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: corundum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.12
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Judson Lester
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2012-02-
|
13
|
+
date: 2012-02-06 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: corundum
|
@@ -133,7 +133,7 @@ dependencies:
|
|
133
133
|
type: :runtime
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: *id010
|
136
|
-
description: " A
|
136
|
+
description: " A corundum is a synthetic gemstone - including synthetic rubies. Ergo: a tool for synthesizing gems.\n\n Corundum starts with the outlook that gemspecs are relatively easy to work with, and that the opinion of the RubyGems team is that they should be treated as a configuration file, not a code file. Furthermore, Rake is a powerful, easy to use tool, and does admit the use of Ruby code to get the job done.\n\n The hard part about publishing gems is getting them into a state you'll be proud of. There's dozens of fiddly steps to putting together a gem fit for public consumption, and it's very easy to get some of them wrong.\n\n Corundum is a collection of Rake tasklibs, therefore, that will perform the entire process of releasing gems, including QA steps up front through generating and publishing documentation.\n"
|
137
137
|
email:
|
138
138
|
- nyarly@gmail.com
|
139
139
|
executables: []
|
@@ -196,11 +196,15 @@ files:
|
|
196
196
|
- lib/corundum/browser-task.rb
|
197
197
|
- lib/corundum/github-pages.rb
|
198
198
|
- lib/corundum/rspec.rb
|
199
|
+
- lib/corundum/rspec-task.rb
|
199
200
|
- lib/corundum/email.rb
|
200
201
|
- lib/corundum/gemspec_sanity.rb
|
201
202
|
- lib/corundum/gemcutter.rb
|
202
203
|
- lib/corundum/tasklib.rb
|
203
|
-
- lib/corundum/
|
204
|
+
- lib/corundum/documentation.rb
|
205
|
+
- lib/corundum/documentation-task.rb
|
206
|
+
- lib/corundum/documentation/yardoc.rb
|
207
|
+
- lib/corundum/documentation/assembly.rb
|
204
208
|
- lib/corundum/gem_building.rb
|
205
209
|
- lib/corundum/tasklibs.rb
|
206
210
|
- lib/corundum/simplecov.rb
|
@@ -210,6 +214,7 @@ files:
|
|
210
214
|
- lib/corundum/version_control/git.rb
|
211
215
|
- lib/corundum/configuration_store.rb
|
212
216
|
- lib/corundum/default_configuration/preferences.yaml
|
217
|
+
- lib/corundum/default_configuration/templates/doc_assembly/index.html.erb
|
213
218
|
- lib/corundum.rb
|
214
219
|
- README.md
|
215
220
|
- spec/smoking_spec.rb
|
@@ -268,7 +273,7 @@ files:
|
|
268
273
|
- doc/coverage/assets/0.5.3/jquery.timeago.js
|
269
274
|
- doc/coverage/assets/0.5.3/loading.gif
|
270
275
|
- doc/coverage/assets/0.5.3/jquery-1.6.2.min.js
|
271
|
-
homepage: http://
|
276
|
+
homepage: http://nyarly.github.com/corundum/
|
272
277
|
licenses:
|
273
278
|
- MIT
|
274
279
|
post_install_message: Another tidy package brought to you by Judson
|
@@ -277,7 +282,7 @@ rdoc_options:
|
|
277
282
|
- --main
|
278
283
|
- doc/README
|
279
284
|
- --title
|
280
|
-
- corundum-0.0.
|
285
|
+
- corundum-0.0.12 RDoc
|
281
286
|
require_paths:
|
282
287
|
- lib/
|
283
288
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -285,7 +290,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
285
290
|
requirements:
|
286
291
|
- - ">="
|
287
292
|
- !ruby/object:Gem::Version
|
288
|
-
hash: -
|
293
|
+
hash: -129852127
|
289
294
|
segments:
|
290
295
|
- 0
|
291
296
|
version: "0"
|
@@ -301,6 +306,6 @@ rubyforge_project: corundum
|
|
301
306
|
rubygems_version: 1.8.11
|
302
307
|
signing_key:
|
303
308
|
specification_version: 3
|
304
|
-
summary: Tools for
|
309
|
+
summary: Tools for synthesizing rubygems
|
305
310
|
test_files:
|
306
311
|
- spec_help/gem_test_suite.rb
|