1 #!/usr/bin/env ruby |
1 #!/bin/sh |
2 # frozen_string_literal: true |
2 set -eu |
|
3 . ~/.lib/sh/stubexec.sh |
3 |
4 |
4 require 'bundler/inline' |
5 install_it() { |
|
6 [ -w "$(gem env gemdir)" ] || |
|
7 opt="--user-install" |
5 |
8 |
6 gemfile do |
9 gem install -q ${opt:-} \ |
7 source 'https://rubygems.org' |
10 "pry:~>0.13.1" pry-byebug pry-inline |
8 gem 'pry', '~> 0.13.1' |
11 asdf reshim ruby || : |
9 gem 'pry-byebug' |
12 } |
10 gem 'pry-inline' |
|
11 end |
|
12 |
13 |
13 def run |
14 stubexec "$@" |
14 if File.exist?(Bundler.unbundled_env.fetch('BUNDLE_GEMFILE', 'Gemfile')) |
|
15 Bundler.with_unbundled_env do |
|
16 Bundler.reset! |
|
17 yield |
|
18 exit |
|
19 end |
|
20 end |
|
21 yield |
|
22 end |
|
23 |
|
24 run do |
|
25 load Gem.bin_path('pry', 'pry') |
|
26 end |
|