pry-byebug 3.6.0 → 3.7.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: de411ccdb95cec93b9878ef090fe3febbe16976441a214811b669eabdf7f5e1e
4
- data.tar.gz: a582767d71b7de5af71cdfbe7709de2ab4a06f577eda5648ecda5522829ea120
3
+ metadata.gz: a4cd2bc1326c6edbd61bd8625d299e0e1511e2e6532b3846b863d241ea5fc5f6
4
+ data.tar.gz: 12cc7a42a8132a9f4f9c07360f3b9f323459c6d4950cb945802ed2499f76ddd5
5
5
  SHA512:
6
- metadata.gz: 49e9fc633e175d2752e1453e79b3b2ec987604375528fd606b8a8c681e7264689a229072e498607e33d1bf1348c5f2daffcfa25233692c9d28b75e5a1339ef87
7
- data.tar.gz: db5efdc17be1e2b6c0e62a15e5935e9dbf156724859b3542104ddecaa9af96c99ba02caf730c68194d97479e313be434528c65ca005148da59555f6f365849c5
6
+ metadata.gz: a84505cfef66d8e5ef228a914c5a7cfa0be6847e4aeb9cf2c12680b1fdc3810c3d80f585d6329cae904633b37cf46e337a68cfa02e91651d70bda9f1f6b57fd9
7
+ data.tar.gz: 8b7fe6eb239aec73c80c87787927b279d27c509bd3579be321cfa8d9c9c81698897c64405d8532949be6d24183fec89c5f564b6f4e07790e1ac26b22e8afe20d
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Master (Unreleased)
4
4
 
5
+ ## 3.7.0 (2019-02-21)
6
+
7
+ * Byebug 11 compatibility, with ruby 2.6 support.
8
+
5
9
  ## 3.6.0 (2018-02-07)
6
10
 
7
11
  ### Added
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
- MIT/Expat License
1
+ MIT License
2
2
 
3
- Copyright (c) David Rodríguez <deivid.rodriguez@gmail.com>
3
+ Copyright (c) 2018 David Rodríguez <deivid.rodriguez@riseup.net>
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of
6
6
  this software and associated documentation files (the "Software"), to deal in
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # pry-byebug
2
2
 
3
3
  [![Version][VersionBadge]][VersionURL]
4
- [![Build][TravisBadge]][TravisURL]
4
+ [![Build][CircleCIBadge]][CircleCIURL]
5
5
  [![Inline docs][InchCIBadge]][InchCIURL]
6
6
  [![Coverage][CoverageBadge]][CoverageURL]
7
7
 
@@ -23,9 +23,7 @@ puts 'Goodbye World' # Run 'next' in the console to move here.
23
23
 
24
24
  ## Requirements
25
25
 
26
- * Required: MRI 2.2.0 or higher.
27
-
28
- * Recommended: MRI 2.3.0 or higher.
26
+ MRI 2.3.0 or higher.
29
27
 
30
28
  ## Installation
31
29
 
@@ -37,7 +35,9 @@ gem 'pry-byebug'
37
35
 
38
36
  to your Gemfile and run
39
37
 
40
- bundle install
38
+ ```console
39
+ bundle install
40
+ ```
41
41
 
42
42
  Make sure you include the gem globally or inside the `:test` group if you plan
43
43
  to use it to debug your tests!
@@ -175,8 +175,8 @@ Patches and bug reports are welcome.
175
175
 
176
176
  [VersionBadge]: https://badge.fury.io/rb/pry-byebug.svg
177
177
  [VersionURL]: http://badge.fury.io/rb/pry-byebug
178
- [TravisBadge]: https://secure.travis-ci.org/deivid-rodriguez/pry-byebug.svg
179
- [TravisURL]: http://travis-ci.org/deivid-rodriguez/pry-byebug
178
+ [CircleCIBadge]: https://circleci.com/gh/deivid-rodriguez/pry-byebug/tree/master.svg?style=shield
179
+ [CircleCIURL]: https://circleci.com/gh/deivid-rodriguez/pry-byebug/tree/master
180
180
  [InchCIBadge]: http://inch-ci.org/github/deivid-rodriguez/pry-byebug.svg?branch=master
181
181
  [InchCIURL]: http://inch-ci.org/github/deivid-rodriguez/pry-byebug
182
182
  [CoverageBadge]: https://img.shields.io/codeclimate/coverage/github/deivid-rodriguez/pry-byebug.svg
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "byebug/core"
2
4
 
3
5
  module Byebug
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "pry"
2
4
  require "pry-byebug/cli"
@@ -1,7 +1,14 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #
2
4
  # Main container module for Pry-Byebug functionality
3
5
  #
4
6
  module PryByebug
7
+ # Reference to currently running pry-remote server. Used by the processor.
8
+ attr_accessor :current_remote_server
9
+
10
+ module_function
11
+
5
12
  #
6
13
  # Checks that a target binding is in a local file context.
7
14
  #
@@ -9,17 +16,12 @@ module PryByebug
9
16
  file = target.eval("__FILE__")
10
17
  file == Pry.eval_path || !Pry::Helpers::BaseHelpers.not_a_real_file?(file)
11
18
  end
12
- module_function :file_context?
13
19
 
14
20
  #
15
21
  # Ensures that a command is executed in a local file context.
16
22
  #
17
- def check_file_context(target, e = nil)
18
- e ||= "Cannot find local context. Did you use `binding.pry`?"
19
- raise(Pry::CommandError, e) unless file_context?(target)
23
+ def check_file_context(target, msg = nil)
24
+ msg ||= "Cannot find local context. Did you use `binding.pry`?"
25
+ raise(Pry::CommandError, msg) unless file_context?(target)
20
26
  end
21
- module_function :check_file_context
22
-
23
- # Reference to currently running pry-remote server. Used by the processor.
24
- attr_accessor :current_remote_server
25
27
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "pry-byebug/base"
2
4
  require "pry-byebug/pry_ext"
3
5
  require "pry-byebug/commands"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "pry-byebug/commands/backtrace"
2
4
  require "pry-byebug/commands/next"
3
5
  require "pry-byebug/commands/step"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "pry-byebug/helpers/navigation"
2
4
 
3
5
  module PryByebug
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "pry/byebug/breakpoints"
2
4
  require "pry-byebug/helpers/breakpoints"
3
5
  require "pry-byebug/helpers/multiline"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "pry-byebug/helpers/navigation"
2
4
  require "pry-byebug/helpers/breakpoints"
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "pry-byebug/helpers/navigation"
2
4
 
3
5
  module PryByebug
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PryByebug
2
4
  #
3
5
  # Exit pry REPL with Byebug.stop
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "pry-byebug/helpers/navigation"
2
4
 
3
5
  module PryByebug
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "pry-byebug/helpers/navigation"
2
4
 
3
5
  module PryByebug
@@ -20,7 +22,7 @@ module PryByebug
20
22
  Examples:
21
23
  frame #=> Show current frame #.
22
24
  frame 5 #=> Move to frame 5.
23
- BANNER
25
+ BANNER
24
26
 
25
27
  def process
26
28
  PryByebug.check_file_context(target)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "pry-byebug/helpers/navigation"
2
4
  require "pry-byebug/helpers/multiline"
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "pry-byebug/helpers/navigation"
2
4
 
3
5
  module PryByebug
@@ -19,7 +21,7 @@ module PryByebug
19
21
  Examples:
20
22
  step #=> Move a single step forward.
21
23
  step 5 #=> Execute the next 5 steps.
22
- BANNER
24
+ BANNER
23
25
 
24
26
  def process
25
27
  PryByebug.check_file_context(target)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "pry-byebug/helpers/navigation"
2
4
 
3
5
  module PryByebug
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  original_handler = Pry.config.control_d_handler
2
4
 
3
5
  Pry.config.control_d_handler = proc do |eval_string, pry_instance|
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "byebug"
2
4
 
3
5
  module PryByebug
@@ -33,15 +35,19 @@ module PryByebug
33
35
  #
34
36
  # Includes surrounding code at that point.
35
37
  #
36
- def print_full_breakpoint(br)
37
- header = "Breakpoint #{br.id}:"
38
- status = br.enabled? ? "Enabled" : "Disabled"
39
- code = br.source_code.with_line_numbers.to_s
40
- condition = br.expr ? "#{text.bold('Condition:')} #{br.expr}\n" : ""
38
+ def print_full_breakpoint(breakpoint)
39
+ header = "Breakpoint #{breakpoint.id}:"
40
+ status = breakpoint.enabled? ? "Enabled" : "Disabled"
41
+ code = breakpoint.source_code.with_line_numbers.to_s
42
+ condition = if breakpoint.expr
43
+ "#{text.bold('Condition:')} #{breakpoint.expr}\n"
44
+ else
45
+ ""
46
+ end
41
47
 
42
48
  output.puts <<-BREAKPOINT.gsub(/ {8}/, "")
43
49
 
44
- #{text.bold(header)} #{br} (#{status}) #{condition}
50
+ #{text.bold(header)} #{breakpoint} (#{status}) #{condition}
45
51
 
46
52
  #{code}
47
53
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PryByebug
2
4
  module Helpers
3
5
  #
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PryByebug
2
4
  module Helpers
3
5
  #
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "byebug/processors/pry_processor"
2
4
 
3
5
  class << Pry
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "pry-remote"
2
4
 
3
5
  module PryRemote
@@ -38,5 +40,5 @@ end
38
40
  # 'next' on the last line of a program won't hit Byebug::PryProcessor#run,
39
41
  # which normally handles cleanup.
40
42
  at_exit do
41
- PryByebug.current_remote_server.teardown if PryByebug.current_remote_server
43
+ PryByebug.current_remote_server&.teardown
42
44
  end
@@ -1,6 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  #
2
4
  # Main container module for Pry-Byebug functionality
3
5
  #
4
6
  module PryByebug
5
- VERSION = "3.6.0".freeze
7
+ VERSION = "3.7.0"
6
8
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Pry
2
4
  module Byebug
3
5
  #
@@ -61,6 +63,7 @@ class Pry
61
63
  def add_file(file, line, expression = nil)
62
64
  real_file = (file != Pry.eval_path)
63
65
  raise(ArgumentError, "Invalid file!") if real_file && !File.exist?(file)
66
+
64
67
  validate_expression expression
65
68
 
66
69
  path = (real_file ? File.expand_path(file) : file)
@@ -142,6 +145,7 @@ class Pry
142
145
  def find_by_id(id)
143
146
  breakpoint = find { |b| b.id == id }
144
147
  raise(ArgumentError, "No breakpoint ##{id}!") unless breakpoint
148
+
145
149
  breakpoint
146
150
  end
147
151
 
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.6.0
4
+ version: 3.7.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: 2018-02-07 00:00:00.000000000 Z
12
+ date: 2019-02-21 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: '10.0'
20
+ version: '11.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: '10.0'
27
+ version: '11.0'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: pry
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -87,15 +87,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
87
87
  requirements:
88
88
  - - ">="
89
89
  - !ruby/object:Gem::Version
90
- version: 2.2.0
90
+ version: 2.3.0
91
91
  required_rubygems_version: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - ">="
94
94
  - !ruby/object:Gem::Version
95
95
  version: '0'
96
96
  requirements: []
97
- rubyforge_project:
98
- rubygems_version: 2.7.4
97
+ rubygems_version: 3.0.2
99
98
  signing_key:
100
99
  specification_version: 4
101
100
  summary: Fast debugging with Pry.