pry-inline 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.coveralls.yml +1 -0
- data/README.md +4 -0
- data/lib/pry-inline/code_extension.rb +6 -3
- data/lib/pry-inline/version.rb +1 -1
- data/pry-inline.gemspec +1 -0
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65d5a2e932b97956239bec83d262e340a2156dbc
|
4
|
+
data.tar.gz: 42149b4b0550377fab5d9620b99c992df2c54f44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3132b6615379d376930431d8c8decc33f1637c3061ac0c7b4697c0fea2ff10fce77e4397ab782bb7fd6909104c139dfb6681c712e2dab9aaed5b448f02307888
|
7
|
+
data.tar.gz: 2ab44e0292d18762ddd1dad0a2f495a4a6e54e87728622554e38e43e7e4f8819382c079c6057db3de9bbf9dce5d7e1fdc8e6cbf68e601928c2d72c1a09affb7e
|
data/.coveralls.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
repo_token: pc57ISqa5jq41XAnqkx38R9Gl6UKoKxde
|
data/README.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Pry Inline
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/pry-inline.svg)](http://badge.fury.io/rb/pry-inline)
|
4
|
+
[![Build Status](https://travis-ci.org/seikichi/pry-inline.svg?branch=master)](https://travis-ci.org/seikichi/pry-inline)
|
5
|
+
[![Coverage Status](https://coveralls.io/repos/seikichi/pry-inline/badge.svg?branch=master&service=github)](https://coveralls.io/github/seikichi/pry-inline?branch=master)
|
6
|
+
|
3
7
|
Pry Inline is a plugin for [pry](https://github.com/pry/pry/),
|
4
8
|
which enables the inline variables view like [RubyMine](https://www.jetbrains.com/ruby/help/inline-debugging.html).
|
5
9
|
|
@@ -17,19 +17,22 @@ module PryInline
|
|
17
17
|
@lineno_to_variables = Hash.new { |h, k| h[k] = Set.new }
|
18
18
|
traverse_sexp(Parser.sexp(@lines.map(&:line).join("\n")))
|
19
19
|
|
20
|
+
current_line = CodeExtension.current_binding.eval('__LINE__') - @lines[0].lineno + 1
|
20
21
|
@lineno_to_variables.each do |lineno, variables|
|
22
|
+
if lineno >= current_line
|
23
|
+
variables.clear
|
24
|
+
next
|
25
|
+
end
|
21
26
|
variables.each do |v|
|
22
27
|
next unless @lineno_to_variables.any? do |l, vs|
|
23
|
-
l > lineno && vs.include?(v)
|
28
|
+
l < current_line && l > lineno && vs.include?(v)
|
24
29
|
end
|
25
30
|
variables.delete(v)
|
26
31
|
end
|
27
32
|
end
|
28
33
|
|
29
|
-
current_line = CodeExtension.current_binding.eval('__LINE__')
|
30
34
|
@lineno_to_variables.each do |lineno, variables|
|
31
35
|
next if lineno == 0 || @lines.length <= lineno
|
32
|
-
next if lineno > (current_line - @lines[0].lineno)
|
33
36
|
|
34
37
|
original_width = Unicode.width(not_colorized_output_lines[lineno - 1], true)
|
35
38
|
debug_info_width = terminal_width - original_width % terminal_width + 1
|
data/lib/pry-inline/version.rb
CHANGED
data/pry-inline.gemspec
CHANGED
@@ -24,6 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_development_dependency 'rake', '~> 10.0'
|
25
25
|
spec.add_development_dependency 'simplecov', '~> 0.10.0'
|
26
26
|
spec.add_development_dependency 'test-unit', '>= 3.0.0'
|
27
|
+
spec.add_development_dependency 'coveralls'
|
27
28
|
|
28
29
|
spec.add_development_dependency 'rubocop'
|
29
30
|
spec.add_development_dependency 'pry-theme'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pry-inline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seiichi KONDO
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 3.0.0
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: coveralls
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: rubocop
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -129,6 +143,7 @@ executables: []
|
|
129
143
|
extensions: []
|
130
144
|
extra_rdoc_files: []
|
131
145
|
files:
|
146
|
+
- ".coveralls.yml"
|
132
147
|
- ".gitignore"
|
133
148
|
- ".rubocop.yml"
|
134
149
|
- ".travis.yml"
|
@@ -168,4 +183,3 @@ signing_key:
|
|
168
183
|
specification_version: 4
|
169
184
|
summary: Inline variables view like RubyMine
|
170
185
|
test_files: []
|
171
|
-
has_rdoc:
|