deep-cover 0.5.0 → 0.5.1

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: cd810c9ed86848f16da708afa29617606737f5d5
4
- data.tar.gz: fa5f6561e9b952e24f43fa7b06eed8c2a21bd0d4
3
+ metadata.gz: 024e012ca37ed9e71ea4ddc486bcf410ee68eeba
4
+ data.tar.gz: 4f9720b0dbb3eda048afbf23339c3875269bd41c
5
5
  SHA512:
6
- metadata.gz: 4f26c1f20f3268174c55f2b3bfe17dbf42cecf2e70f1456b395006a8d03545e95388cbe0f3fc18b6b38c5c7413b88327f74c2c921fd55ced04771379a01fb6b0
7
- data.tar.gz: 5b220912488dde079c748c4376c9a94adbfeac5a144f6d27c362eb9ff29fabc28247990354a646aa9f2b6f449d2c4de88f94f8d6dbe86f83181da06bd2389732
6
+ metadata.gz: 07aea48af070f21355740b8821a72ecc78bf7d0bc1ffb8cfd7ec3bbc3994be192a05d4951939e093d66ad22106b5e9125b9e94a17a74399a491e214945567c16
7
+ data.tar.gz: 051e76cd09f21433a9336baf53f34f111a2a3951f68d0aa04fb3fc76be2ed4b11055609d891faa9e042722c6bcede904dd103272e26719e22e71f44f658398b9
data/Gemfile CHANGED
@@ -7,6 +7,6 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
7
7
  # Specify your gem's dependencies in deep_cover.gemspec
8
8
  gemspec
9
9
 
10
- eval_gemfile 'Gemfile.local' if File.exist?('Gemfile.local')
10
+ eval_gemfile File.expand_path('Gemfile.local', __dir__) if File.exist?('Gemfile.local')
11
11
 
12
12
  gem 'ruby-prof', platforms: :mri
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'deep_cover'
3
+ require_relative '../deep_cover'
4
4
  require 'pry'
5
5
 
6
6
  module DeepCover
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeepCover
4
- require 'deep_cover'
4
+ require_relative '../../deep_cover'
5
5
  bootstrap
6
6
 
7
7
  module CLI
@@ -84,6 +84,7 @@ module DeepCover
84
84
  def pry
85
85
  a = covered_code.covered_ast
86
86
  b = a.children.first
87
+ ::DeepCover.load_pry
87
88
  binding.pry
88
89
  end
89
90
 
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeepCover
4
- require 'bundler/setup'
5
4
  require 'slop'
6
5
  require_relative '../basics'
7
6
 
@@ -3,7 +3,7 @@
3
3
  require 'tmpdir'
4
4
 
5
5
  module DeepCover
6
- require 'deep_cover'
6
+ require_relative '../../deep_cover'
7
7
  bootstrap
8
8
 
9
9
  module CLI
@@ -20,7 +20,6 @@ module DeepCover
20
20
  Object.autoload :Term, 'term/ansicolor'
21
21
  Object.autoload :Terminal, 'terminal-table'
22
22
  Object.autoload :YAML, 'yaml'
23
- require 'pry'
24
23
  end
25
24
 
26
25
  def bootstrap
@@ -41,6 +40,20 @@ module DeepCover
41
40
  @parser_loaded
42
41
  end
43
42
 
43
+ def load_pry
44
+ # I don't know why I have to call these to avoid getting an error:
45
+ # "WARN: Unresolved specs during Gem::Specification.reset"
46
+ gem 'binding_of_caller'
47
+ gem 'highline'
48
+ gem 'unicode-display_width'
49
+ gem 'backports'
50
+ gem 'ruby-progressbar'
51
+ gem 'tins'
52
+ gem 'ast'
53
+ #
54
+ require 'pry'
55
+ end
56
+
44
57
  def load_all
45
58
  return if @all_loaded
46
59
  bootstrap
@@ -47,7 +47,6 @@ module DeepCover
47
47
  when ::Regexp
48
48
  each_node.find_all { |n| n.source =~ lookup }
49
49
  else
50
- binding.pry
51
50
  raise ::TypeError, "Expected class or symbol, got #{lookup.class}: #{lookup.inspect}"
52
51
  end
53
52
  end
@@ -59,7 +59,7 @@ module DeepCover
59
59
  # Returns an array of character numbers (in the original buffer) that
60
60
  # pertain exclusively to this node (and thus not to any children).
61
61
  def proper_range
62
- executed_locs.map(&:to_a).inject([], :+).uniq rescue binding.pry
62
+ executed_locs.map(&:to_a).inject([], :+).uniq
63
63
  end
64
64
  end
65
65
  end
@@ -111,13 +111,13 @@ module DeepCover
111
111
  end
112
112
 
113
113
  def replace(range, with)
114
- @rewriter.replace(range, with) rescue binding.pry
114
+ @rewriter.replace(range, with)
115
115
  end
116
116
 
117
117
  def wrap(range, before, after = '</span>')
118
118
  line = @rewriter.source_buffer.line_range(range.first_line)
119
119
  pinned = range.with(end_pos: [range, line].map(&:end_pos).min)
120
- @rewriter.wrap(pinned, before, after) rescue binding.pry
120
+ @rewriter.wrap(pinned, before, after)
121
121
  end
122
122
 
123
123
  def html_escape
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'delegate'
4
+
3
5
  module DeepCover
4
6
  module Tools::Profiling
5
7
  # Simple forwarding to implementation
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeepCover
4
- VERSION = '0.5.0'
4
+ VERSION = '0.5.1'
5
5
  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.5.0
4
+ version: 0.5.1
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: 2018-02-10 00:00:00.000000000 Z
12
+ date: 2018-02-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: parser