Skip to content

Commit

Permalink
Tighten pry dependency
Browse files Browse the repository at this point in the history
So that future minor breaking relases of pry don't affect pry-byebug
users.

As a side effect, drop support for pry's older than 0.13.0.
  • Loading branch information
deivid-rodriguez committed Mar 21, 2020
1 parent cff4f0e commit 1516f17
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 163 deletions.
10 changes: 0 additions & 10 deletions .dependabot/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,3 @@ update_configs:
- match:
dependency_type: development
update_type: all

- package_manager: ruby:bundler
directory: /gemfiles/pry_master
update_schedule: live
version_requirement_updates: increase_versions_if_necessary

automerged_updates:
- match:
dependency_type: development
update_type: all
14 changes: 4 additions & 10 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@ jobs:
strategy:
matrix:
ruby: [2.4.9, 2.5.7, 2.6.5, 2.7.0]
gemfile: [Gemfile, gemfiles/pry_master/Gemfile]

env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
BUNDLE_LOCKFILE: ${{ matrix.gemfile }}.lock
BUNDLE_PATH: .bundle

steps:
Expand All @@ -35,7 +32,7 @@ jobs:
- uses: actions/cache@v1
with:
path: ${{ env.BUNDLE_PATH }}
key: dependencies-${{ hashFiles(env.BUNDLE_LOCKFILE) }}
key: dependencies-${{ hashFiles('Gemfile.lock') }}
restore-keys: dependencies-

- name: Install dependencies
Expand Down Expand Up @@ -65,16 +62,13 @@ jobs:
- name: Give test coverage reporter executable permissions
run: chmod +x cc-test-reporter

- name: Set test report output file
run: echo "::set-env name=BUNDLE_GEMFILE_BASENAME::$(echo $BUNDLE_GEMFILE | cut -d/ -f2)"

- name: Save coverage
run: ./cc-test-reporter format-coverage --output coverage/codeclimate.${{ matrix.ruby }}-${{ env.BUNDLE_GEMFILE_BASENAME }}.json
run: ./cc-test-reporter format-coverage --output coverage/codeclimate.${{ matrix.ruby }}.json

- uses: actions/upload-artifact@v1
with:
name: coverage-${{ matrix.ruby }}-${{ env.BUNDLE_GEMFILE_BASENAME }}
path: coverage/codeclimate.${{ matrix.ruby }}-${{ env.BUNDLE_GEMFILE_BASENAME }}.json
name: coverage-${{ matrix.ruby }}
path: coverage/codeclimate.${{ matrix.ruby }}.json

upload_coverage:
runs-on: ubuntu-18.04
Expand Down
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@

## Master (Unreleased)

### Fixed

* Dependency on pry being too loose. Now breaking minor releases of pry won't affect pry-byebug users (#288).

### Added

* Support for pry master as of [pry/pry@62c8951374aeed5a7423609a108848b0bcf81685](https://github.com/pry/pry/commit/62c8951374aeed5a7423609a108848b0bcf81685) (#266).
* Support for pry 0.13.0 (#266).

### Removed

* Support for pry older than 0.13.0 (#288).

## 3.8.0 (2020-01-22)

Expand Down
10 changes: 5 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PATH
specs:
pry-byebug (3.8.0)
byebug (~> 11.0)
pry (~> 0.10)
pry (~> 0.13.0)

GEM
remote: https://rubygems.org/
Expand All @@ -29,7 +29,7 @@ GEM
kramdown-parser-gfm (~> 1.0)
mixlib-cli (~> 2.1, >= 2.1.1)
mixlib-config (>= 2.2.1, < 4)
method_source (0.9.2)
method_source (1.0.0)
minitest (5.14.0)
minitest-bisect (1.5.1)
minitest-server (~> 1.0)
Expand All @@ -48,9 +48,9 @@ GEM
parser (2.7.0.3)
ast (~> 2.4.0)
path_expander (1.1.0)
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
pry (0.13.0)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (4.0.3)
rainbow (3.0.0)
rake (13.0.1)
Expand Down
17 changes: 0 additions & 17 deletions gemfiles/pry_master/Gemfile

This file was deleted.

98 changes: 0 additions & 98 deletions gemfiles/pry_master/Gemfile.lock

This file was deleted.

17 changes: 4 additions & 13 deletions lib/pry-byebug/control_d_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,8 @@

original_handler = Pry.config.control_d_handler

Pry.config.control_d_handler =
if original_handler.arity == 2
proc do |eval_string, pry_instance|
Byebug.stop if Byebug.stoppable?
Pry.config.control_d_handler = proc do |pry_instance|
Byebug.stop if Byebug.stoppable?

original_handler.call(eval_string, pry_instance)
end
else
proc do |pry_instance|
Byebug.stop if Byebug.stoppable?

original_handler.call(pry_instance)
end
end
original_handler.call(pry_instance)
end
10 changes: 2 additions & 8 deletions lib/pry-byebug/helpers/navigation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,9 @@ module Navigation
# Breaks out of the REPL loop and signals tracer
#
def breakout_navigation(action, options = {})
preferred_pry_instance = if respond_to?(:pry_instance)
pry_instance
else
_pry_
end
pry_instance.binding_stack.clear

preferred_pry_instance.binding_stack.clear

throw :breakout_nav, action: action, options: options, pry: preferred_pry_instance
throw :breakout_nav, action: action, options: options, pry: pry_instance
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion pry-byebug.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ Gem::Specification.new do |gem|
gem.required_ruby_version = ">= 2.4.0"

gem.add_runtime_dependency "byebug", "~> 11.0"
gem.add_runtime_dependency "pry", "~> 0.10"
gem.add_runtime_dependency "pry", "~> 0.13.0"
end

0 comments on commit 1516f17

Please sign in to comment.