coverband 0.0.21 → 0.0.22

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,8 +3,25 @@ namespace :coverband do
3
3
  desc "record coverband coverage baseline"
4
4
  task :baseline do
5
5
  Coverband::Reporter.baseline {
6
- require File.expand_path("./config/environment", Dir.pwd)
7
- }
6
+ if Rake::Task.tasks.any?{ |key| key.to_s.match(/environment$/) }
7
+ Rake::Task['environment'].invoke
8
+ elsif Rake::Task.tasks.any?{ |key| key.to_s.match(/env$/) }
9
+ Rake::Task["env"].invoke
10
+ else
11
+ baseline_files = [File.expand_path('./config/boot.rb', Dir.pwd),
12
+ File.expand_path('./config/application.rb', Dir.pwd),
13
+ File.expand_path('./config/environment.rb', Dir.pwd)]
14
+
15
+ baseline_files.each do |baseline_file|
16
+ if File.exists?(baseline_file)
17
+ require baseline_file
18
+ end
19
+ end
20
+ end
21
+ if defined? Rails
22
+ Dir.glob("#{Rails.root}/app/models/*.rb").sort.each { |file| require_dependency file }
23
+ end
24
+ }
8
25
  end
9
26
 
10
27
  desc "report runtime coverband code coverage"
@@ -1,3 +1,3 @@
1
1
  module Coverband
2
- VERSION = "0.0.21"
2
+ VERSION = "0.0.22"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coverband
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.21
4
+ version: 0.0.22
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-03-25 00:00:00.000000000 Z
12
+ date: 2014-03-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -184,7 +184,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
184
184
  version: '0'
185
185
  segments:
186
186
  - 0
187
- hash: 4325330329090522770
187
+ hash: -4510058149658372560
188
188
  required_rubygems_version: !ruby/object:Gem::Requirement
189
189
  none: false
190
190
  requirements:
@@ -193,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
193
  version: '0'
194
194
  segments:
195
195
  - 0
196
- hash: 4325330329090522770
196
+ hash: -4510058149658372560
197
197
  requirements: []
198
198
  rubyforge_project:
199
199
  rubygems_version: 1.8.23