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 +4 -4
- data/lib/pry-inline.rb +11 -1
- data/lib/pry-inline/before_session_hook.rb +1 -4
- data/lib/pry-inline/version.rb +1 -1
- data/lib/pry-inline/when_started_hook.rb +0 -1
- data/pry-inline.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bad0830574abaae8e85b28338c86853dfadf68ec
|
4
|
+
data.tar.gz: 038f400021c0b7085a7dd829f2c31ff19678fcc5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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,
|
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
|
data/lib/pry-inline/version.rb
CHANGED
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', '
|
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.
|
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.
|
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.
|
26
|
+
version: 0.10.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|