corundum 0.0.30 → 0.0.31

Sign up to get free protection for your applications and to get access to all the features.
data/lib/corundum/core.rb CHANGED
@@ -36,7 +36,8 @@ module Corundum
36
36
  :test => FileList['test/**/*.rb','spec/**/*.rb','features/**/*.rb'],
37
37
  :docs => FileList['doc/**/*.rb'],
38
38
  :project => FileList['Rakefile'],
39
- :all => nil)
39
+ :all => nil),
40
+ :file_patterns => nested( :code => [%r{^lib/}], :test => [%r{^spec/}, %r{^test/}], :docs => [%r{^doc/}])
40
41
  )
41
42
 
42
43
  def load_gemspec
@@ -58,9 +59,9 @@ module Corundum
58
59
 
59
60
  @qa_rejections ||= []
60
61
 
61
- @files.code ||= gemspec.files.grep(%r{^lib/})
62
- @files.test ||= gemspec.files.grep(%r{^spec/})
63
- @files.docs ||= gemspec.files.grep(%r{^doc/})
62
+ @files.code ||= file_patterns.code.map{ |pattern| gemspec.files.grep(pattern) }.flatten
63
+ @files.test ||= file_patterns.test.map{ |pattern| gemspec.files.grep(pattern) }.flatten
64
+ @files.docs ||= file_patterns.docs.map{ |pattern| gemspec.files.grep(pattern) }.flatten
64
65
 
65
66
  @file_lists.project << gemspec_path
66
67
  @file_lists.all ||=
@@ -58,7 +58,7 @@ module Corundum
58
58
  end
59
59
  file entry_path => :doc
60
60
 
61
- task :verify => :doc do |task|
61
+ task :verify => entry_path do |task|
62
62
  require 'nokogiri'
63
63
  require 'corundum/qa-report'
64
64
 
@@ -73,10 +73,10 @@ module Corundum
73
73
 
74
74
  fails_path = "//*[" + %w{example failed}.map{|kind| class_xpath(kind)}.join(" and ") + "]"
75
75
  doc.xpath(fails_path).each do |node|
76
- backtrace_line = node.xpath(".//*[#{class_xpath("backtrace")}]").contents.split("\n").last
76
+ backtrace_line = node.xpath(".//*[#{class_xpath("backtrace")}]").first.content.split("\n").last
77
77
  file,line,_ = backtrace_line.split(":")
78
78
  label = "fail"
79
- value = node.xpath(".//[#{class_xpath("message")}]").contents.gsub(/\s+/m, " ")
79
+ value = node.xpath(".//*[#{class_xpath("message")}]").first.content.gsub(/\s+/m, " ")
80
80
 
81
81
  rejections.add(label, file, line, value)
82
82
  end
@@ -114,7 +114,7 @@ module Corundum
114
114
  "//table[@class='file_list']//td//a[@class='src_link']").map do |link|
115
115
  link.content
116
116
  end
117
- need_coverage = @code_files.find_all(&coverage_filter)
117
+ need_coverage = code_files.find_all(&coverage_filter)
118
118
 
119
119
  report = QA::Report.new("Stragglers")
120
120
  qa_rejections << report
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: corundum
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.30
5
+ version: 0.0.31
6
6
  platform: ruby
7
7
  authors:
8
8
  - Judson Lester
@@ -415,7 +415,7 @@ licenses:
415
415
  post_install_message:
416
416
  rdoc_options:
417
417
  - --title
418
- - corundum-0.0.30 RDoc
418
+ - corundum-0.0.31 RDoc
419
419
  require_paths:
420
420
  - lib/
421
421
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -424,7 +424,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
424
424
  - !ruby/object:Gem::Version
425
425
  segments:
426
426
  - 0
427
- hash: -251699523
427
+ hash: -138913361
428
428
  version: '0'
429
429
  none: false
430
430
  required_rubygems_version: !ruby/object:Gem::Requirement