simplecov 0.3.5 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile CHANGED
@@ -13,6 +13,7 @@ begin
13
13
  gem.add_dependency 'simplecov-html', ">= 0.3.7"
14
14
  gem.add_development_dependency "shoulda", "2.10.3"
15
15
  gem.add_development_dependency "rspec", "~> 2.0.0.beta.20"
16
+ gem.add_development_dependency "jeweler", "1.4.0"
16
17
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
17
18
  end
18
19
  Jeweler::GemcutterTasks.new
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.5
1
+ 0.3.6
@@ -40,6 +40,9 @@ SimpleCov.adapters.define 'rails' do
40
40
  add_filter '/features/'
41
41
  add_filter '/spec/'
42
42
  add_filter '/config/'
43
+ add_filter '/db/'
44
+ add_filter '/autotest/'
45
+ add_filter '/vendor/bundle/'
43
46
 
44
47
  add_group 'Controllers', 'app/controllers'
45
48
  add_group 'Models', 'app/models'
@@ -14,7 +14,7 @@ module SimpleCov::ResultMerger
14
14
  # Loads the cached resultset from YAML and returns it as a Hash
15
15
  def resultset
16
16
  return {} unless File.exist?(resultset_path)
17
- YAML.load(File.read(resultset_path))
17
+ YAML.load(File.read(resultset_path)) || {}
18
18
  end
19
19
 
20
20
  # Gets the resultset hash and re-creates all included instances
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{simplecov}
8
- s.version = "0.3.5"
8
+ s.version = "0.3.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Christoph Olszowka"]
12
- s.date = %q{2010-09-03}
12
+ s.date = %q{2010-09-16}
13
13
  s.description = %q{Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites}
14
14
  s.email = %q{christoph at olszowka de}
15
15
  s.extra_rdoc_files = [
@@ -86,15 +86,18 @@ Gem::Specification.new do |s|
86
86
  s.add_runtime_dependency(%q<simplecov-html>, [">= 0.3.7"])
87
87
  s.add_development_dependency(%q<shoulda>, ["= 2.10.3"])
88
88
  s.add_development_dependency(%q<rspec>, ["~> 2.0.0.beta.20"])
89
+ s.add_development_dependency(%q<jeweler>, ["= 1.4.0"])
89
90
  else
90
91
  s.add_dependency(%q<simplecov-html>, [">= 0.3.7"])
91
92
  s.add_dependency(%q<shoulda>, ["= 2.10.3"])
92
93
  s.add_dependency(%q<rspec>, ["~> 2.0.0.beta.20"])
94
+ s.add_dependency(%q<jeweler>, ["= 1.4.0"])
93
95
  end
94
96
  else
95
97
  s.add_dependency(%q<simplecov-html>, [">= 0.3.7"])
96
98
  s.add_dependency(%q<shoulda>, ["= 2.10.3"])
97
99
  s.add_dependency(%q<rspec>, ["~> 2.0.0.beta.20"])
100
+ s.add_dependency(%q<jeweler>, ["= 1.4.0"])
98
101
  end
99
102
  end
100
103
 
@@ -41,6 +41,18 @@ class TestMergeHelpers < Test::Unit::TestCase
41
41
  end
42
42
  end
43
43
 
44
+ # See Github issue #6
45
+ should "return an empty hash when the resultset cache file is empty" do
46
+ File.open(SimpleCov::ResultMerger.resultset_path, "w+") {|f| f.puts ""}
47
+ assert_equal Hash.new, SimpleCov::ResultMerger.resultset
48
+ end
49
+
50
+ # See Github issue #6
51
+ should "return an empty hash when the resultset cache file is not present" do
52
+ system "rm #{SimpleCov::ResultMerger.resultset_path}" if File.exist?(SimpleCov::ResultMerger.resultset_path)
53
+ assert_equal Hash.new, SimpleCov::ResultMerger.resultset
54
+ end
55
+
44
56
  context "and results generated from those" do
45
57
  setup do
46
58
  system "rm #{SimpleCov::ResultMerger.resultset_path}" if File.exist?(SimpleCov::ResultMerger.resultset_path)
@@ -87,6 +99,7 @@ class TestMergeHelpers < Test::Unit::TestCase
87
99
  end
88
100
  end
89
101
  end
102
+
90
103
  end
91
104
  end
92
105
  end
@@ -16,7 +16,7 @@ class TestReturnCodes < Test::Unit::TestCase
16
16
  end
17
17
 
18
18
  should "have return code 0 when running rspec_good.rb" do
19
- `ruby rspec_good.rb`
19
+ `rspec rspec_good.rb`
20
20
  assert_equal 0, $?.exitstatus
21
21
  end
22
22
 
@@ -26,7 +26,7 @@ class TestReturnCodes < Test::Unit::TestCase
26
26
  end
27
27
 
28
28
  should "have return code 1 when running rspec_bad.rb" do
29
- `ruby rspec_bad.rb`
29
+ `rspec rspec_bad.rb`
30
30
  assert_equal 1, $?.exitstatus
31
31
  end
32
32
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 5
9
- version: 0.3.5
8
+ - 6
9
+ version: 0.3.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Christoph Olszowka
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-09-03 00:00:00 +02:00
17
+ date: 2010-09-16 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -64,6 +64,21 @@ dependencies:
64
64
  version: 2.0.0.beta.20
65
65
  type: :development
66
66
  version_requirements: *id003
67
+ - !ruby/object:Gem::Dependency
68
+ name: jeweler
69
+ prerelease: false
70
+ requirement: &id004 !ruby/object:Gem::Requirement
71
+ none: false
72
+ requirements:
73
+ - - "="
74
+ - !ruby/object:Gem::Version
75
+ segments:
76
+ - 1
77
+ - 4
78
+ - 0
79
+ version: 1.4.0
80
+ type: :development
81
+ version_requirements: *id004
67
82
  description: Code coverage for Ruby 1.9 with a powerful configuration library and automatic merging of coverage across test suites
68
83
  email: christoph at olszowka de
69
84
  executables: []