pry-byebug 3.5.1 → 3.6.0

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
  SHA256:
3
- metadata.gz: baaed7ad050205921d3aab1eaf69ffae1759a8448e7308c1b90fe4485b17e5c3
4
- data.tar.gz: c1691a3a74b6242dca0d97caa7a3bab2a450320ee6ae7afe48430c8d7ba1f0b1
3
+ metadata.gz: de411ccdb95cec93b9878ef090fe3febbe16976441a214811b669eabdf7f5e1e
4
+ data.tar.gz: a582767d71b7de5af71cdfbe7709de2ab4a06f577eda5648ecda5522829ea120
5
5
  SHA512:
6
- metadata.gz: 8b63de4b0d291eb142e97f3d22ce78f9579b53b313893c812cbb248851e24d0458ed390751579c476afd9fee23583484289874f656d02b840082c7fad7bd397e
7
- data.tar.gz: bccbd46b4c72f15f8f6b5023a2d09c07cb1f9c2d71e4da941b241337aa5b0b1715039e402e7f492c9250203e841535fee3e7e5616316c749457daaf11e3e7849
6
+ metadata.gz: 49e9fc633e175d2752e1453e79b3b2ec987604375528fd606b8a8c681e7264689a229072e498607e33d1bf1348c5f2daffcfa25233692c9d28b75e5a1339ef87
7
+ data.tar.gz: db5efdc17be1e2b6c0e62a15e5935e9dbf156724859b3542104ddecaa9af96c99ba02caf730c68194d97479e313be434528c65ca005148da59555f6f365849c5
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## Master (Unreleased)
4
4
 
5
+ ## 3.6.0 (2018-02-07)
6
+
7
+ ### Added
8
+
9
+ * Byebug 10 compatibility, with ruby 2.5 support.
10
+
5
11
  ## 3.5.1 (2017-11-27)
6
12
 
7
13
  ### Fixed
data/README.md CHANGED
@@ -3,7 +3,6 @@
3
3
  [![Version][VersionBadge]][VersionURL]
4
4
  [![Build][TravisBadge]][TravisURL]
5
5
  [![Inline docs][InchCIBadge]][InchCIURL]
6
- [![Gratipay][GratipayBadge]][GratipayURL]
7
6
  [![Coverage][CoverageBadge]][CoverageURL]
8
7
 
9
8
  Adds step-by-step debugging and stack navigation capabilities to [pry] using
@@ -24,12 +23,9 @@ puts 'Goodbye World' # Run 'next' in the console to move here.
24
23
 
25
24
  ## Requirements
26
25
 
27
- * Required: MRI 2.0.0 or higher.
26
+ * Required: MRI 2.2.0 or higher.
28
27
 
29
- * Recommended:
30
- * MRI 2.1.8 or higher.
31
- * MRI 2.2.4 or higher.
32
- * MRI 2.3.0 or higher.
28
+ * Recommended: MRI 2.3.0 or higher.
33
29
 
34
30
  ## Installation
35
31
 
@@ -149,6 +145,19 @@ mentioned here if they are present in your Gemfile.
149
145
 
150
146
  * [pry-nav]: Provides step-by-step debugging for JRuby.
151
147
 
148
+ ## Contribute
149
+
150
+ See [Getting Started with Development](CONTRIBUTING.md).
151
+
152
+ You can also help `pry-byebug` by leaving a small (or big) tip through
153
+ [Liberapay][liberapay.com].
154
+
155
+ [![Support via Liberapay][liberapay-button]][liberapay-donate]
156
+
157
+ [liberapay.com]: https://liberapay.com
158
+ [liberapay-button]: https://liberapay.com/assets/widgets/donate.svg
159
+ [liberapay-donate]: https://liberapay.com/pry-byebug/donate
160
+
152
161
  ## Credits
153
162
 
154
163
  * Gopal Patel (@nixme), creator of [pry-debugger], and everybody who contributed
@@ -170,7 +179,5 @@ Patches and bug reports are welcome.
170
179
  [TravisURL]: http://travis-ci.org/deivid-rodriguez/pry-byebug
171
180
  [InchCIBadge]: http://inch-ci.org/github/deivid-rodriguez/pry-byebug.svg?branch=master
172
181
  [InchCIURL]: http://inch-ci.org/github/deivid-rodriguez/pry-byebug
173
- [GratipayBadge]: http://img.shields.io/gratipay/pry-byebug.svg
174
- [GratipayURL]: https://www.gratipay.com/pry-byebug
175
182
  [CoverageBadge]: https://img.shields.io/codeclimate/coverage/github/deivid-rodriguez/pry-byebug.svg
176
183
  [CoverageURL]: https://codeclimate.com/github/deivid-rodriguez/pry-byebug
@@ -1,4 +1,4 @@
1
- require 'byebug/core'
1
+ require "byebug/core"
2
2
 
3
3
  module Byebug
4
4
  #
@@ -91,7 +91,7 @@ module Byebug
91
91
  expr = breakpoint.expr
92
92
  return unless expr
93
93
 
94
- output.puts bold('Condition: ') + expr
94
+ output.puts bold("Condition: ") + expr
95
95
  end
96
96
 
97
97
  private
@@ -99,7 +99,7 @@ module Byebug
99
99
  def n_hits(breakpoint)
100
100
  n_hits = breakpoint.hit_count
101
101
 
102
- n_hits == 1 ? 'First hit' : "Hit #{n_hits} times."
102
+ n_hits == 1 ? "First hit" : "Hit #{n_hits} times."
103
103
  end
104
104
 
105
105
  #
@@ -118,7 +118,7 @@ module Byebug
118
118
  end
119
119
 
120
120
  def perform_backtrace(_options)
121
- Byebug::WhereCommand.new(self, 'backtrace').execute
121
+ Byebug::WhereCommand.new(self, "backtrace").execute
122
122
 
123
123
  resume_pry
124
124
  end
@@ -154,7 +154,7 @@ module Byebug
154
154
  end
155
155
 
156
156
  def perform_frame(options)
157
- index = options[:index] ? options[:index].to_i : ''
157
+ index = options[:index] ? options[:index].to_i : ""
158
158
 
159
159
  Byebug::FrameCommand.new(self, "frame #{index}").execute
160
160
 
@@ -1,2 +1,2 @@
1
- require 'pry'
2
- require 'pry-byebug/cli'
1
+ require "pry"
2
+ require "pry-byebug/cli"
@@ -6,7 +6,7 @@ module PryByebug
6
6
  # Checks that a target binding is in a local file context.
7
7
  #
8
8
  def file_context?(target)
9
- file = target.eval('__FILE__')
9
+ file = target.eval("__FILE__")
10
10
  file == Pry.eval_path || !Pry::Helpers::BaseHelpers.not_a_real_file?(file)
11
11
  end
12
12
  module_function :file_context?
@@ -15,7 +15,7 @@ module PryByebug
15
15
  # Ensures that a command is executed in a local file context.
16
16
  #
17
17
  def check_file_context(target, e = nil)
18
- e ||= 'Cannot find local context. Did you use `binding.pry`?'
18
+ e ||= "Cannot find local context. Did you use `binding.pry`?"
19
19
  raise(Pry::CommandError, e) unless file_context?(target)
20
20
  end
21
21
  module_function :check_file_context
@@ -1,4 +1,4 @@
1
- require 'pry-byebug/base'
2
- require 'pry-byebug/pry_ext'
3
- require 'pry-byebug/commands'
4
- require 'pry-byebug/control_d_handler'
1
+ require "pry-byebug/base"
2
+ require "pry-byebug/pry_ext"
3
+ require "pry-byebug/commands"
4
+ require "pry-byebug/control_d_handler"
@@ -1,10 +1,10 @@
1
- require 'pry-byebug/commands/backtrace'
2
- require 'pry-byebug/commands/next'
3
- require 'pry-byebug/commands/step'
4
- require 'pry-byebug/commands/continue'
5
- require 'pry-byebug/commands/finish'
6
- require 'pry-byebug/commands/up'
7
- require 'pry-byebug/commands/down'
8
- require 'pry-byebug/commands/frame'
9
- require 'pry-byebug/commands/breakpoint'
10
- require 'pry-byebug/commands/exit_all'
1
+ require "pry-byebug/commands/backtrace"
2
+ require "pry-byebug/commands/next"
3
+ require "pry-byebug/commands/step"
4
+ require "pry-byebug/commands/continue"
5
+ require "pry-byebug/commands/finish"
6
+ require "pry-byebug/commands/up"
7
+ require "pry-byebug/commands/down"
8
+ require "pry-byebug/commands/frame"
9
+ require "pry-byebug/commands/breakpoint"
10
+ require "pry-byebug/commands/exit_all"
@@ -1,4 +1,4 @@
1
- require 'pry-byebug/helpers/navigation'
1
+ require "pry-byebug/helpers/navigation"
2
2
 
3
3
  module PryByebug
4
4
  #
@@ -7,10 +7,10 @@ module PryByebug
7
7
  class BacktraceCommand < Pry::ClassCommand
8
8
  include Helpers::Navigation
9
9
 
10
- match 'backtrace'
11
- group 'Byebug'
10
+ match "backtrace"
11
+ group "Byebug"
12
12
 
13
- description 'Display the current stack.'
13
+ description "Display the current stack."
14
14
 
15
15
  banner <<-BANNER
16
16
  Usage: backtrace
@@ -1,6 +1,6 @@
1
- require 'pry/byebug/breakpoints'
2
- require 'pry-byebug/helpers/breakpoints'
3
- require 'pry-byebug/helpers/multiline'
1
+ require "pry/byebug/breakpoints"
2
+ require "pry-byebug/helpers/breakpoints"
3
+ require "pry-byebug/helpers/multiline"
4
4
 
5
5
  module PryByebug
6
6
  #
@@ -10,9 +10,9 @@ module PryByebug
10
10
  include Helpers::Breakpoints
11
11
  include Helpers::Multiline
12
12
 
13
- match 'break'
14
- group 'Byebug'
15
- description 'Set or edit a breakpoint.'
13
+ match "break"
14
+ group "Byebug"
15
+ description "Set or edit a breakpoint."
16
16
 
17
17
  banner <<-BANNER
18
18
  Usage: break <METHOD | FILE:LINE | LINE> [if CONDITION]
@@ -46,13 +46,13 @@ module PryByebug
46
46
  def options(opt)
47
47
  defaults = { argument: true, as: Integer }
48
48
 
49
- opt.on :c, :condition, 'Change condition of a breakpoint.', defaults
50
- opt.on :s, :show, 'Show breakpoint details and source.', defaults
51
- opt.on :D, :delete, 'Delete a breakpoint.', defaults
52
- opt.on :d, :disable, 'Disable a breakpoint.', defaults
53
- opt.on :e, :enable, 'Enable a disabled breakpoint.', defaults
54
- opt.on :'disable-all', 'Disable all breakpoints.'
55
- opt.on :'delete-all', 'Delete all breakpoints.'
49
+ opt.on :c, :condition, "Change condition of a breakpoint.", defaults
50
+ opt.on :s, :show, "Show breakpoint details and source.", defaults
51
+ opt.on :D, :delete, "Delete a breakpoint.", defaults
52
+ opt.on :d, :disable, "Disable a breakpoint.", defaults
53
+ opt.on :e, :enable, "Enable a disabled breakpoint.", defaults
54
+ opt.on :'disable-all', "Disable all breakpoints."
55
+ opt.on :'delete-all', "Delete all breakpoints."
56
56
  end
57
57
 
58
58
  def process
@@ -82,13 +82,13 @@ module PryByebug
82
82
  end
83
83
 
84
84
  def process_condition
85
- expr = args.empty? ? nil : args.join(' ')
85
+ expr = args.empty? ? nil : args.join(" ")
86
86
  breakpoints.change(opts[:condition], expr)
87
87
  end
88
88
 
89
89
  def new_breakpoint
90
90
  place = args.shift
91
- condition = args.join(' ') if args.shift == 'if'
91
+ condition = args.join(" ") if args.shift == "if"
92
92
 
93
93
  bp = add_breakpoint(place, condition)
94
94
 
@@ -107,7 +107,7 @@ module PryByebug
107
107
  def add_breakpoint(place, condition)
108
108
  case place
109
109
  when /^(\d+)$/
110
- errmsg = 'Line number declaration valid only in a file context.'
110
+ errmsg = "Line number declaration valid only in a file context."
111
111
  PryByebug.check_file_context(target, errmsg)
112
112
 
113
113
  lineno = Regexp.last_match[1].to_i
@@ -118,13 +118,13 @@ module PryByebug
118
118
  breakpoints.add_file(file, lineno, condition)
119
119
  when /^(.*)[.#].+$/ # Method or class name
120
120
  if Regexp.last_match[1].strip.empty?
121
- errmsg = 'Method name declaration valid only in a file context.'
121
+ errmsg = "Method name declaration valid only in a file context."
122
122
  PryByebug.check_file_context(target, errmsg)
123
- place = target.eval('self.class.to_s') + place
123
+ place = target.eval("self.class.to_s") + place
124
124
  end
125
125
  breakpoints.add_method(place, condition)
126
126
  else
127
- raise(ArgumentError, 'Cannot identify arguments as breakpoint')
127
+ raise(ArgumentError, "Cannot identify arguments as breakpoint")
128
128
  end
129
129
  end
130
130
  end
@@ -1,5 +1,5 @@
1
- require 'pry-byebug/helpers/navigation'
2
- require 'pry-byebug/helpers/breakpoints'
1
+ require "pry-byebug/helpers/navigation"
2
+ require "pry-byebug/helpers/breakpoints"
3
3
 
4
4
  module PryByebug
5
5
  #
@@ -9,9 +9,9 @@ module PryByebug
9
9
  include Helpers::Navigation
10
10
  include Helpers::Breakpoints
11
11
 
12
- match 'continue'
13
- group 'Byebug'
14
- description 'Continue program execution and end the Pry session.'
12
+ match "continue"
13
+ group "Byebug"
14
+ description "Continue program execution and end the Pry session."
15
15
 
16
16
  banner <<-BANNER
17
17
  Usage: continue [LINE]
@@ -1,4 +1,4 @@
1
- require 'pry-byebug/helpers/navigation'
1
+ require "pry-byebug/helpers/navigation"
2
2
 
3
3
  module PryByebug
4
4
  #
@@ -7,10 +7,10 @@ module PryByebug
7
7
  class DownCommand < Pry::ClassCommand
8
8
  include Helpers::Navigation
9
9
 
10
- match 'down'
11
- group 'Byebug'
10
+ match "down"
11
+ group "Byebug"
12
12
 
13
- description 'Move current frame down.'
13
+ description "Move current frame down."
14
14
 
15
15
  banner <<-BANNER
16
16
  Usage: down [TIMES]
@@ -1,4 +1,4 @@
1
- require 'pry-byebug/helpers/navigation'
1
+ require "pry-byebug/helpers/navigation"
2
2
 
3
3
  module PryByebug
4
4
  #
@@ -7,9 +7,9 @@ module PryByebug
7
7
  class FinishCommand < Pry::ClassCommand
8
8
  include PryByebug::Helpers::Navigation
9
9
 
10
- match 'finish'
11
- group 'Byebug'
12
- description 'Execute until current stack frame returns.'
10
+ match "finish"
11
+ group "Byebug"
12
+ description "Execute until current stack frame returns."
13
13
 
14
14
  banner <<-BANNER
15
15
  Usage: finish
@@ -1,4 +1,4 @@
1
- require 'pry-byebug/helpers/navigation'
1
+ require "pry-byebug/helpers/navigation"
2
2
 
3
3
  module PryByebug
4
4
  #
@@ -7,10 +7,10 @@ module PryByebug
7
7
  class FrameCommand < Pry::ClassCommand
8
8
  include Helpers::Navigation
9
9
 
10
- match 'frame'
11
- group 'Byebug'
10
+ match "frame"
11
+ group "Byebug"
12
12
 
13
- description 'Move to specified frame #.'
13
+ description "Move to specified frame #."
14
14
 
15
15
  banner <<-BANNER
16
16
  Usage: frame [TIMES]
@@ -1,5 +1,5 @@
1
- require 'pry-byebug/helpers/navigation'
2
- require 'pry-byebug/helpers/multiline'
1
+ require "pry-byebug/helpers/navigation"
2
+ require "pry-byebug/helpers/multiline"
3
3
 
4
4
  module PryByebug
5
5
  #
@@ -9,9 +9,9 @@ module PryByebug
9
9
  include Helpers::Navigation
10
10
  include Helpers::Multiline
11
11
 
12
- match 'next'
13
- group 'Byebug'
14
- description 'Execute the next line within the current stack frame.'
12
+ match "next"
13
+ group "Byebug"
14
+ description "Execute the next line within the current stack frame."
15
15
 
16
16
  banner <<-BANNER
17
17
  Usage: next [LINES]
@@ -1,4 +1,4 @@
1
- require 'pry-byebug/helpers/navigation'
1
+ require "pry-byebug/helpers/navigation"
2
2
 
3
3
  module PryByebug
4
4
  #
@@ -7,9 +7,9 @@ module PryByebug
7
7
  class StepCommand < Pry::ClassCommand
8
8
  include Helpers::Navigation
9
9
 
10
- match 'step'
11
- group 'Byebug'
12
- description 'Step execution into the next line or method.'
10
+ match "step"
11
+ group "Byebug"
12
+ description "Step execution into the next line or method."
13
13
 
14
14
  banner <<-BANNER
15
15
  Usage: step [TIMES]
@@ -1,4 +1,4 @@
1
- require 'pry-byebug/helpers/navigation'
1
+ require "pry-byebug/helpers/navigation"
2
2
 
3
3
  module PryByebug
4
4
  #
@@ -7,10 +7,10 @@ module PryByebug
7
7
  class UpCommand < Pry::ClassCommand
8
8
  include Helpers::Navigation
9
9
 
10
- match 'up'
11
- group 'Byebug'
10
+ match "up"
11
+ group "Byebug"
12
12
 
13
- description 'Move current frame up.'
13
+ description "Move current frame up."
14
14
 
15
15
  banner <<-BANNER
16
16
  Usage: up [TIMES]
@@ -1,4 +1,4 @@
1
- require 'byebug'
1
+ require "byebug"
2
2
 
3
3
  module PryByebug
4
4
  module Helpers
@@ -18,7 +18,7 @@ module PryByebug
18
18
  # location.
19
19
  #
20
20
  def current_file
21
- target.eval('__FILE__')
21
+ target.eval("__FILE__")
22
22
  end
23
23
 
24
24
  #
@@ -35,11 +35,11 @@ module PryByebug
35
35
  #
36
36
  def print_full_breakpoint(br)
37
37
  header = "Breakpoint #{br.id}:"
38
- status = br.enabled? ? 'Enabled' : 'Disabled'
38
+ status = br.enabled? ? "Enabled" : "Disabled"
39
39
  code = br.source_code.with_line_numbers.to_s
40
- condition = br.expr ? "#{text.bold('Condition:')} #{br.expr}\n" : ''
40
+ condition = br.expr ? "#{text.bold('Condition:')} #{br.expr}\n" : ""
41
41
 
42
- output.puts <<-BREAKPOINT.gsub(/ {8}/, '')
42
+ output.puts <<-BREAKPOINT.gsub(/ {8}/, "")
43
43
 
44
44
  #{text.bold(header)} #{br} (#{status}) #{condition}
45
45
 
@@ -52,9 +52,9 @@ module PryByebug
52
52
  # Print out concise information about a breakpoint.
53
53
  #
54
54
  def print_short_breakpoint(breakpoint)
55
- id = format('%*d', max_width, breakpoint.id)
56
- status = breakpoint.enabled? ? 'Yes' : 'No '
57
- expr = breakpoint.expr ? " #{breakpoint.expr} " : ''
55
+ id = format("%*d", max_width, breakpoint.id)
56
+ status = breakpoint.enabled? ? "Yes" : "No "
57
+ expr = breakpoint.expr ? " #{breakpoint.expr} " : ""
58
58
 
59
59
  output.puts(" #{id} #{status} #{breakpoint}#{expr}")
60
60
  end
@@ -65,7 +65,7 @@ module PryByebug
65
65
  def print_breakpoints_header
66
66
  header = "#{' ' * (max_width - 1)}# Enabled At "
67
67
 
68
- output.puts <<-BREAKPOINTS.gsub(/ {8}/, '')
68
+ output.puts <<-BREAKPOINTS.gsub(/ {8}/, "")
69
69
 
70
70
  #{text.bold(header)}
71
71
  #{text.bold('-' * header.size)}
@@ -1,11 +1,11 @@
1
- require 'byebug/processors/pry_processor'
1
+ require "byebug/processors/pry_processor"
2
2
 
3
3
  class << Pry
4
4
  alias start_without_pry_byebug start
5
5
 
6
6
  def start_with_pry_byebug(target = TOPLEVEL_BINDING, options = {})
7
7
  if target.is_a?(Binding) && PryByebug.file_context?(target)
8
- Byebug::PryProcessor.start unless ENV['DISABLE_PRY']
8
+ Byebug::PryProcessor.start unless ENV["DISABLE_PRY"]
9
9
  else
10
10
  # No need for the tracer unless we have a file context to step through
11
11
  start_without_pry_byebug(target, options)
@@ -1,4 +1,4 @@
1
- require 'pry-remote'
1
+ require "pry-remote"
2
2
 
3
3
  module PryRemote
4
4
  #
@@ -10,7 +10,7 @@ module PryRemote
10
10
  # teardown the server right after Pry.start finishes.
11
11
  #
12
12
  def run
13
- raise('Already running a pry-remote session!') if
13
+ raise("Already running a pry-remote session!") if
14
14
  PryByebug.current_remote_server
15
15
 
16
16
  PryByebug.current_remote_server = self
@@ -2,5 +2,5 @@
2
2
  # Main container module for Pry-Byebug functionality
3
3
  #
4
4
  module PryByebug
5
- VERSION = '3.5.1'.freeze
5
+ VERSION = "3.6.0".freeze
6
6
  end
@@ -60,7 +60,7 @@ class Pry
60
60
  #
61
61
  def add_file(file, line, expression = nil)
62
62
  real_file = (file != Pry.eval_path)
63
- raise(ArgumentError, 'Invalid file!') if real_file && !File.exist?(file)
63
+ raise(ArgumentError, "Invalid file!") if real_file && !File.exist?(file)
64
64
  validate_expression expression
65
65
 
66
66
  path = (real_file ? File.expand_path(file) : file)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pry-byebug
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.5.1
4
+ version: 3.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Rodríguez
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-11-27 00:00:00.000000000 Z
12
+ date: 2018-02-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: byebug
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '9.1'
20
+ version: '10.0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - "~>"
26
26
  - !ruby/object:Gem::Version
27
- version: '9.1'
27
+ version: '10.0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: pry
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
95
  version: '0'
96
96
  requirements: []
97
97
  rubyforge_project:
98
- rubygems_version: 2.7.2
98
+ rubygems_version: 2.7.4
99
99
  signing_key:
100
100
  specification_version: 4
101
101
  summary: Fast debugging with Pry.