pry-inline 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c870a5bd3848d3ef04db13ca0ff68f747e1009e5
4
- data.tar.gz: a4d161cc5bf205da19dc287db45803fdad8f05bc
3
+ metadata.gz: bad0830574abaae8e85b28338c86853dfadf68ec
4
+ data.tar.gz: 038f400021c0b7085a7dd829f2c31ff19678fcc5
5
5
  SHA512:
6
- metadata.gz: 64da43309081163b75ef508da4a683af4e5a914a244af749de63581475b8ed13d2d0df8428a0aa665abb4008e9611ceb9d0075867ebe08dc02f56992a0074008
7
- data.tar.gz: 0a8e00a2b8f9c1ab09b779ab3408135a377866d4de1ecf56c1c6653aa8065c2f9c90e4ce84437f4665b1ddb588567b99a9d50b967de550caf50ac3eb340ab1ba
6
+ metadata.gz: e63bb2968aca4882bf6489a9a81235a92aa0b8029d02f14ea81ef1314a286a346656999e8d5b90bd587c12434fe4d0afa15ee58f25b119f6771251bed2fd1300
7
+ data.tar.gz: 07d738a52bb58f932cb5b3ccaae3a63576c6625b8573522b0686935bd84b7a48b477ebb5b92b88ac3b4d4a29a5391d1858f582190a74ba80bfbe60f4a66d648a
data/lib/pry-inline.rb CHANGED
@@ -7,7 +7,17 @@ require 'pry-inline/before_session_hook'
7
7
 
8
8
  Pry.config.hooks
9
9
  .add_hook(:when_started, :pry_inline, PryInline::WhenStartedHook.new)
10
- .add_hook(:before_session, :pry_inline, PryInline::BeforeSessionHook.new)
10
+
11
+ before_session_hooks = Pry.config.hooks.get_hooks(:before_session)
12
+ Pry.config.hooks.delete_hooks(:before_session)
13
+
14
+ begin
15
+ Pry.config.hooks.add_hook(:before_session, :pry_inline, PryInline::BeforeSessionHook.new)
16
+ ensure
17
+ before_session_hooks.each do |name, callable|
18
+ Pry.config.hooks.add_hook(:before_session, name, callable)
19
+ end
20
+ end
11
21
 
12
22
  module PryInline
13
23
  end
@@ -2,11 +2,8 @@ require 'pry-inline/inline_debuggable_loc'
2
2
 
3
3
  module PryInline
4
4
  class BeforeSessionHook
5
- def call(_, target, pry)
6
- return if target.eval('self') == Pry.main
5
+ def call(_, target, _)
7
6
  PryInline::InlineDebuggableLOC.binding = target
8
- pry.run_command('whereami')
9
- PryInline::InlineDebuggableLOC.binding = nil
10
7
  end
11
8
  end
12
9
  end
@@ -1,3 +1,3 @@
1
1
  module PryInline
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -4,7 +4,6 @@ require 'pry-inline/inline_debuggable_loc'
4
4
  module PryInline
5
5
  class WhenStartedHook
6
6
  def call(_, _, _)
7
- Pry.config.quiet = true
8
7
  Pry::Code.send(:prepend, PryInline::InlineDebuggableCode)
9
8
  Pry::Code::LOC.send(:prepend, PryInline::InlineDebuggableLOC)
10
9
  end
data/pry-inline.gemspec CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
19
  spec.require_paths = ['lib']
20
20
 
21
- spec.add_dependency 'pry', '>= 0.10.1'
21
+ spec.add_dependency 'pry', '~> 0.10.0'
22
22
  spec.add_development_dependency 'bundler', '~> 1.10'
23
23
  spec.add_development_dependency 'rake', '~> 10.0'
24
24
  spec.add_development_dependency 'test-unit', '>= 3.0.0'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pry-inline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seiichi KONDO
@@ -14,16 +14,16 @@ dependencies:
14
14
  name: pry
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.10.1
19
+ version: 0.10.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
- version: 0.10.1
26
+ version: 0.10.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement