deep-cover 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cbe670bee3fca431efa3a04244d724b26deb7ede
4
- data.tar.gz: a8f57f090a6fb004bb0b328901885b84f00548ca
3
+ metadata.gz: bc7ee6a28acd10fed49e4f57e343ecc15f957f5e
4
+ data.tar.gz: 1e2b3d39a186a8fc8905c6677585abdfe7ac0caa
5
5
  SHA512:
6
- metadata.gz: d7d097733ac9da1e9e482f9c56ad96533f18da22f90c60ed3c009fcc7f2f8c4db1a099d5fb0051682157cd9a0d322c546e060f6b17438609ab839901b19a9aa2
7
- data.tar.gz: 6e0f37c3293bed959adba222707bc77b31c233cf02e62f65ecef70bdfb24b8acc600b9b1ceccaf818b7f094dcb450e35d2ef9ff4bc6dc96b58582a14e0389dfb
6
+ metadata.gz: 565e8713d76bf42c6f6d56f5b301764f8fb7863c9ca97393dc29cdf405275e6871427a610bc289bbf8820de04895182e504b6d2a27fc669e73328b3a21357fec
7
+ data.tar.gz: dd1b5209227146dfd3b8982ef725fc5be89c41dd02eaee74439f4e108b57ec18641b0c1401637f63acdc8999820aabe74caaf435a5c0fc01ee289e6cdccc56d2
@@ -46,6 +46,7 @@ module DeepCover
46
46
  end
47
47
 
48
48
  def self.run!(covered_path)
49
+ @already_setup ||= false # Avoid ruby warning
49
50
  Runner.new(covered_path).run! unless @already_setup
50
51
  @already_setup = true
51
52
  end
@@ -1,2 +1,2 @@
1
- require_relative 'deep_cover'
2
- require_relative 'deep_cover/core_ext/coverage_replacement'
1
+ require 'deep_cover'
2
+ require 'deep_cover/core_ext/coverage_replacement'
@@ -45,7 +45,7 @@ module DeepCover
45
45
  def patch_main_ruby_files
46
46
  each_gem_path do |dest_path|
47
47
  main = dest_path.join('lib/*.rb')
48
- Dir.glob(main).each do |main|
48
+ Dir.glob(main).select{|p| File.file?(p) }.each do |main|
49
49
  puts "Patching #{main}"
50
50
  patch_ruby_file(main)
51
51
  end
@@ -161,7 +161,7 @@ module DeepCover
161
161
 
162
162
  def load_coverage
163
163
  Marshal.load(dir_path.join(BASENAME).binread).tap do |version: raise, coverage: raise|
164
- raise "dump version mismatch: #{deep_cover}, currently #{DeepCover::VERSION}" unless version == DeepCover::VERSION
164
+ raise "dump version mismatch: #{version}, currently #{DeepCover::VERSION}" unless version == DeepCover::VERSION
165
165
  return coverage
166
166
  end
167
167
  end
@@ -169,7 +169,7 @@ module DeepCover
169
169
  def load_trackers
170
170
  tracker_files.each do |full_path|
171
171
  Marshal.load(full_path.binread).tap do |version: raise, global: raise, trackers: raise|
172
- raise "dump version mismatch: #{deep_cover}, currently #{DeepCover::VERSION}" unless version == DeepCover::VERSION
172
+ raise "dump version mismatch: #{version}, currently #{DeepCover::VERSION}" unless version == DeepCover::VERSION
173
173
  merge_trackers(eval("#{global} ||= {}"), trackers)
174
174
  end
175
175
  end
@@ -14,7 +14,9 @@ module DeepCover
14
14
  dest_path = File.join(File.expand_path(dest_path), '')
15
15
  root_path = Pathname.new(root_path)
16
16
  skipped = []
17
- Dir.glob("#{source_path}**/*.rb").each.with_progress(title: 'Rewriting') do |path|
17
+ file_paths = Dir.glob("#{source_path}**/*.rb").select{|p| File.file?(p) }
18
+ file_paths.each.with_progress(title: 'Rewriting') do |path|
19
+
18
20
  new_path = Pathname(path.gsub(source_path, dest_path))
19
21
  begin
20
22
  covered_code = coverage.covered_code(path, name: new_path.relative_path_from(root_path))
@@ -1,3 +1,3 @@
1
1
  module DeepCover
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deep-cover
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marc-André Lafortune
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2017-11-02 00:00:00.000000000 Z
12
+ date: 2017-11-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: parser