pry-shell 0.5.1 → 0.6.1
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 +4 -4
- data/.gitignore +1 -0
- data/Gemfile.lock +8 -7
- data/exe/pry-shell +0 -1
- data/lib/pry/shell/patches/pry_byebug.rb +21 -11
- data/lib/pry/shell/version.rb +1 -1
- data/pry-shell.gemspec +1 -1
- metadata +8 -8
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: abde3ee8ce030cfb4b4db8350d5bbbbab3c5d27f678e8d72d3bd67811935ada6
         | 
| 4 | 
            +
              data.tar.gz: 55b77914e3f6a464bf459069dadd376ca6b6983d507900997eaea82911d66832
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 49df2ec3118914f2fbdc7b1a961336e3e10f9e955cc6c5c33956cf7e213c565e37a4ee32ef11fdb924f45376df6d238c6ff0059e53523bc7aeb249f1d60f8c17
         | 
| 7 | 
            +
              data.tar.gz: 62392a361636fd1aa5ab69d659cb1d5c033b3593588db1c1cc415084d73b0e8a072d07e2f401069d03582ab9d5423386f0d660887a71d3ac13aa368437fdcdbb
         | 
    
        data/.gitignore
    CHANGED
    
    
    
        data/Gemfile.lock
    CHANGED
    
    | @@ -1,8 +1,8 @@ | |
| 1 1 | 
             
            PATH
         | 
| 2 2 | 
             
              remote: .
         | 
| 3 3 | 
             
              specs:
         | 
| 4 | 
            -
                pry-shell (0. | 
| 5 | 
            -
                  pry ( | 
| 4 | 
            +
                pry-shell (0.6.1)
         | 
| 5 | 
            +
                  pry (>= 0.13.0)
         | 
| 6 6 | 
             
                  tty-markdown
         | 
| 7 7 | 
             
                  tty-prompt
         | 
| 8 8 |  | 
| @@ -21,17 +21,17 @@ GEM | |
| 21 21 | 
             
                  ast (~> 2.4.1)
         | 
| 22 22 | 
             
                pastel (0.8.0)
         | 
| 23 23 | 
             
                  tty-color (~> 0.5)
         | 
| 24 | 
            -
                pry (0. | 
| 24 | 
            +
                pry (0.14.2)
         | 
| 25 25 | 
             
                  coderay (~> 1.1)
         | 
| 26 26 | 
             
                  method_source (~> 1.0)
         | 
| 27 | 
            -
                pry-byebug (3. | 
| 27 | 
            +
                pry-byebug (3.10.1)
         | 
| 28 28 | 
             
                  byebug (~> 11.0)
         | 
| 29 | 
            -
                  pry ( | 
| 29 | 
            +
                  pry (>= 0.13, < 0.15)
         | 
| 30 30 | 
             
                rainbow (3.0.0)
         | 
| 31 31 | 
             
                rake (13.0.3)
         | 
| 32 32 | 
             
                regexp_parser (2.1.1)
         | 
| 33 33 | 
             
                rexml (3.2.5)
         | 
| 34 | 
            -
                rouge (3. | 
| 34 | 
            +
                rouge (3.30.0)
         | 
| 35 35 | 
             
                rspec (3.10.0)
         | 
| 36 36 | 
             
                  rspec-core (~> 3.10.0)
         | 
| 37 37 | 
             
                  rspec-expectations (~> 3.10.0)
         | 
| @@ -64,7 +64,7 @@ GEM | |
| 64 64 | 
             
                strings-ansi (0.2.0)
         | 
| 65 65 | 
             
                tty-color (0.6.0)
         | 
| 66 66 | 
             
                tty-cursor (0.7.1)
         | 
| 67 | 
            -
                tty-markdown (0.7. | 
| 67 | 
            +
                tty-markdown (0.7.1)
         | 
| 68 68 | 
             
                  kramdown (>= 1.16.2, < 3.0)
         | 
| 69 69 | 
             
                  pastel (~> 0.8)
         | 
| 70 70 | 
             
                  rouge (~> 3.14)
         | 
| @@ -84,6 +84,7 @@ GEM | |
| 84 84 | 
             
                wisper (2.0.1)
         | 
| 85 85 |  | 
| 86 86 | 
             
            PLATFORMS
         | 
| 87 | 
            +
              arm64-darwin-21
         | 
| 87 88 | 
             
              x86_64-darwin-19
         | 
| 88 89 |  | 
| 89 90 | 
             
            DEPENDENCIES
         | 
    
        data/exe/pry-shell
    CHANGED
    
    
| @@ -11,21 +11,29 @@ begin | |
| 11 11 | 
             
                      Byebug.start
         | 
| 12 12 | 
             
                      Setting[:autolist] = false
         | 
| 13 13 | 
             
                      Context.processor = self
         | 
| 14 | 
            -
                      Byebug.current_context.step_out( | 
| 14 | 
            +
                      Byebug.current_context.step_out(8, true)
         | 
| 15 15 | 
             
                      at_exit { teardown! }
         | 
| 16 16 | 
             
                    end
         | 
| 17 17 |  | 
| 18 | 
            -
                    private
         | 
| 19 | 
            -
             | 
| 20 18 | 
             
                    def teardown!
         | 
| 21 19 | 
             
                      Pry::Shell.remove_active_connection!
         | 
| 22 20 | 
             
                      Pry::Shell.clear_shell_options!
         | 
| 23 21 | 
             
                    end
         | 
| 24 22 | 
             
                  end
         | 
| 25 23 |  | 
| 24 | 
            +
                  def initialize(...)
         | 
| 25 | 
            +
                    super
         | 
| 26 | 
            +
             | 
| 27 | 
            +
                    # Set the interface for byebug outputs
         | 
| 28 | 
            +
                    @interface = Byebug::RemoteInterface.new(Pry::Shell.active_shell_options[:output])
         | 
| 29 | 
            +
                  end
         | 
| 30 | 
            +
             | 
| 26 31 | 
             
                  def resume_pry
         | 
| 27 32 | 
             
                    run do
         | 
| 28 33 | 
             
                      pry_started? ? start_new_pry_repl : start_new_pry_session
         | 
| 34 | 
            +
             | 
| 35 | 
            +
                      # Close shell session after repl loop
         | 
| 36 | 
            +
                      self.class.teardown!
         | 
| 29 37 | 
             
                    end
         | 
| 30 38 | 
             
                  rescue DRb::DRbConnError
         | 
| 31 39 | 
             
                    puts "DRb connection failed!"
         | 
| @@ -38,7 +46,9 @@ begin | |
| 38 46 | 
             
                  end
         | 
| 39 47 |  | 
| 40 48 | 
             
                  def start_new_pry_session
         | 
| 41 | 
            -
                     | 
| 49 | 
            +
                    repl_options = Pry::Shell.active_shell_options.merge(target: frame._binding)
         | 
| 50 | 
            +
             | 
| 51 | 
            +
                    @pry = Pry::Shell::Repl.start_without_pry_byebug(repl_options)
         | 
| 42 52 | 
             
                  end
         | 
| 43 53 |  | 
| 44 54 | 
             
                  def start_new_pry_repl
         | 
| @@ -51,17 +61,17 @@ begin | |
| 51 61 | 
             
                class Shell
         | 
| 52 62 | 
             
                  module Patches
         | 
| 53 63 | 
             
                    module PryByebug
         | 
| 54 | 
            -
                      def start_with_pry_byebug( | 
| 55 | 
            -
                        return start_with_pry_shell( | 
| 64 | 
            +
                      def start_with_pry_byebug(options = {})
         | 
| 65 | 
            +
                        return start_with_pry_shell(options) if Shell.active_shell_options
         | 
| 56 66 |  | 
| 57 67 | 
             
                        super
         | 
| 58 68 | 
             
                      end
         | 
| 59 69 |  | 
| 60 | 
            -
                      def start_with_pry_shell( | 
| 70 | 
            +
                      def start_with_pry_shell(options)
         | 
| 61 71 | 
             
                        if Shell.active_shell_options[:enable_byebug?]
         | 
| 62 72 | 
             
                          ::Byebug::PryShellProcessor.start
         | 
| 63 73 | 
             
                        else
         | 
| 64 | 
            -
                          start_without_pry_byebug( | 
| 74 | 
            +
                          start_without_pry_byebug(options)
         | 
| 65 75 | 
             
                        end
         | 
| 66 76 | 
             
                      end
         | 
| 67 77 | 
             
                    end
         | 
| @@ -72,15 +82,15 @@ begin | |
| 72 82 |  | 
| 73 83 | 
             
                        # We should step out one more frame as we are
         | 
| 74 84 | 
             
                        # prepending another module to the hierarchy
         | 
| 75 | 
            -
                        ::Byebug.current_context.step_out( | 
| 85 | 
            +
                        ::Byebug.current_context.step_out(6, true)
         | 
| 76 86 | 
             
                      end
         | 
| 77 87 | 
             
                    end
         | 
| 78 88 | 
             
                  end
         | 
| 79 89 | 
             
                end
         | 
| 80 90 | 
             
              end
         | 
| 81 91 |  | 
| 82 | 
            -
              Pry.singleton_class.prepend(Pry::Shell::Patches::PryByebug)
         | 
| 83 | 
            -
              Pry.singleton_class.alias_method(:start, :start_with_pry_byebug)
         | 
| 92 | 
            +
              Pry::REPL.singleton_class.prepend(Pry::Shell::Patches::PryByebug)
         | 
| 93 | 
            +
              Pry::REPL.singleton_class.alias_method(:start, :start_with_pry_byebug)
         | 
| 84 94 |  | 
| 85 95 | 
             
              Byebug::PryProcessor.singleton_class.prepend(Pry::Shell::Patches::PryProcessor)
         | 
| 86 96 | 
             
            rescue LoadError # rubocop:disable Lint/SuppressedException
         | 
    
        data/lib/pry/shell/version.rb
    CHANGED
    
    
    
        data/pry-shell.gemspec
    CHANGED
    
    | @@ -26,7 +26,7 @@ Gem::Specification.new do |spec| | |
| 26 26 | 
             
              spec.executables   = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
         | 
| 27 27 | 
             
              spec.require_paths = ["lib"]
         | 
| 28 28 |  | 
| 29 | 
            -
              spec.add_dependency "pry", " | 
| 29 | 
            +
              spec.add_dependency "pry", ">= 0.13.0"
         | 
| 30 30 | 
             
              spec.add_dependency "tty-markdown"
         | 
| 31 31 | 
             
              spec.add_dependency "tty-prompt"
         | 
| 32 32 | 
             
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,27 +1,27 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: pry-shell
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0. | 
| 4 | 
            +
              version: 0.6.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Mehmet Emin INAC
         | 
| 8 | 
            -
            autorequire:
         | 
| 8 | 
            +
            autorequire: 
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2023-02-03 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: pry
         | 
| 15 15 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 16 16 | 
             
                requirements:
         | 
| 17 | 
            -
                - - " | 
| 17 | 
            +
                - - ">="
         | 
| 18 18 | 
             
                  - !ruby/object:Gem::Version
         | 
| 19 19 | 
             
                    version: 0.13.0
         | 
| 20 20 | 
             
              type: :runtime
         | 
| 21 21 | 
             
              prerelease: false
         | 
| 22 22 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 23 23 | 
             
                requirements:
         | 
| 24 | 
            -
                - - " | 
| 24 | 
            +
                - - ">="
         | 
| 25 25 | 
             
                  - !ruby/object:Gem::Version
         | 
| 26 26 | 
             
                    version: 0.13.0
         | 
| 27 27 | 
             
            - !ruby/object:Gem::Dependency
         | 
| @@ -107,7 +107,7 @@ licenses: | |
| 107 107 | 
             
            metadata:
         | 
| 108 108 | 
             
              homepage_uri: https://github.com/meinac/pry-shell
         | 
| 109 109 | 
             
              source_code_uri: https://github.com/meinac/pry-shell
         | 
| 110 | 
            -
            post_install_message:
         | 
| 110 | 
            +
            post_install_message: 
         | 
| 111 111 | 
             
            rdoc_options: []
         | 
| 112 112 | 
             
            require_paths:
         | 
| 113 113 | 
             
            - lib
         | 
| @@ -122,8 +122,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 122 122 | 
             
                - !ruby/object:Gem::Version
         | 
| 123 123 | 
             
                  version: '0'
         | 
| 124 124 | 
             
            requirements: []
         | 
| 125 | 
            -
            rubygems_version: 3. | 
| 126 | 
            -
            signing_key:
         | 
| 125 | 
            +
            rubygems_version: 3.3.26
         | 
| 126 | 
            +
            signing_key: 
         | 
| 127 127 | 
             
            specification_version: 4
         | 
| 128 128 | 
             
            summary: Provides remote pry sessions.
         | 
| 129 129 | 
             
            test_files: []
         |