pry-moves 0.1.3 → 0.1.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 04ba1beaaf401be56645547544daea4941edc585
4
- data.tar.gz: 1bff65fb6e1b10d266520ea24f76216e6b8a5e6c
3
+ metadata.gz: 23288b1d287b42591da2676415691400c9d6120b
4
+ data.tar.gz: ad7ba33a0ec981169e22684620d0f0f9bc01442e
5
5
  SHA512:
6
- metadata.gz: 6591993e2fc1844fcd348400d3dbd8f3e3d9e9607d6f9b34383fb52d5b01e8255529063caee1b59bf07fea9f585aa61ab319705578fd02999bdf4b8386da0fd9
7
- data.tar.gz: fcaa693583e32e0f173d8df3ae48f0e8af1250c3f07fdfbc421991eebbab28a4364bf17d9ef2e01dd5d0777829f9031ffa1fb9ceeee884b292f0f3e5ab0b5ae7
6
+ metadata.gz: 840e5a61835382777aa7635ab4ef786f5546d2f1efa735d2f744991380e7efea1d08276825850cbbf016083e7c373f92ac3f686e9538f2509cc3c86fb7a39ae0
7
+ data.tar.gz: d0278d40a279fbcb7b18efa1f53fed7cf9509166159feac899ef4b457a8022e1eda6863d80f25c761c56f8fbbc03553afde1348293fc2fdf7207ad444b4dbab2
@@ -35,10 +35,13 @@ module PryMoves
35
35
  PryMoves::Backtrace.new(target, _pry_).run_command param
36
36
  end
37
37
 
38
- block_command 'debug', '' do |*command_parts|
39
- check_file_context
40
- cmd = command_parts.join ' '
41
- breakout_navigation :debug, cmd
38
+ block_command 'debug', '' do
39
+ debug
40
+ end
41
+
42
+ block_command '!', 'exit' do
43
+ Pry.config.exit_requested = true
44
+ run '!!!'
42
45
  end
43
46
 
44
47
  # Hit Enter to repeat last command
@@ -56,6 +59,12 @@ module PryMoves
56
59
  }
57
60
  end
58
61
 
62
+ def debug
63
+ check_file_context
64
+ cmd = arg_string.gsub(/^debug/, '').strip
65
+ breakout_navigation :debug, cmd
66
+ end
67
+
59
68
  # Ensures that a command is executed in a local file context.
60
69
  def check_file_context
61
70
  unless PryMoves.check_file_context(target)
@@ -67,5 +76,3 @@ module PryMoves
67
76
  end
68
77
 
69
78
  Pry.commands.import PryMoves::Commands
70
-
71
- Pry.commands.alias_command '!', '!!!'
@@ -132,8 +132,13 @@ class Tracer
132
132
  end
133
133
 
134
134
  def trace_debug(event, file, line, binding_)
135
- event == 'line' and file == 'sand.rb' and
136
- not [47, 48, 49, 50].include?(line)
135
+ return unless event == 'line'
136
+ if @first_line_skipped
137
+ true
138
+ else
139
+ @first_line_skipped = true
140
+ false
141
+ end
137
142
  end
138
143
 
139
144
  def debug_info(file, line, id)
@@ -1,3 +1,3 @@
1
1
  module PryMoves
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
data/playground/sand.rb CHANGED
@@ -7,6 +7,11 @@ def debucher?
7
7
  true
8
8
  end
9
9
 
10
+ def fi(param)
11
+ a = 2 + 1
12
+ puts param
13
+ end
14
+
10
15
  class A
11
16
 
12
17
  def initialize
@@ -14,18 +19,18 @@ class A
14
19
  end
15
20
 
16
21
  def aa
17
- self
22
+ bb
18
23
  end
19
24
 
20
25
  def bb
21
26
  #binding.pry
27
+ k = A.new
22
28
  a = 1
23
- a = 1
24
- self
29
+ cc
25
30
  end
26
31
 
27
32
  def cc
28
- self
33
+ binding.pry
29
34
  end
30
35
 
31
36
  end
@@ -37,7 +42,7 @@ b = binding
37
42
 
38
43
  puts :prepare
39
44
 
40
- binding.pry
45
+ #binding.pry
41
46
 
42
47
  a = A.new.aa.bb.cc
43
48
 
data/pry-moves.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |gem|
10
10
  gem.license = 'MIT'
11
11
  gem.homepage = 'https://github.com/garmoshka-mo/pry-moves'
12
12
  gem.summary = 'Debugger for ruby'
13
- gem.description = "Debugger for ruby with natural `next` flow (over blocks), debug of dynamic calls, stepping into function by name, etc.."
13
+ gem.description = "Advanced debugger for ruby with natural `next` across blocks, debug of dynamic calls, stepping into function by name, etc.."
14
14
 
15
15
  gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
16
16
  gem.files = `git ls-files`.split("\n")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pry-moves
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - garmoshka-mo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-11 00:00:00.000000000 Z
11
+ date: 2017-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -58,8 +58,8 @@ dependencies:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
60
  version: 0.1.6
61
- description: Debugger for ruby with natural `next` flow (over blocks), debug of dynamic
62
- calls, stepping into function by name, etc..
61
+ description: Advanced debugger for ruby with natural `next` across blocks, debug of
62
+ dynamic calls, stepping into function by name, etc..
63
63
  email: dan@coav.ru
64
64
  executables: []
65
65
  extensions: []