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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 90b17cf9bb9eb0a447283a2ad34d1e581ed045c9
4
- data.tar.gz: 12fc419a7d493a318bd4797facab7f715a7c4091
3
+ metadata.gz: 65d5a2e932b97956239bec83d262e340a2156dbc
4
+ data.tar.gz: 42149b4b0550377fab5d9620b99c992df2c54f44
5
5
  SHA512:
6
- metadata.gz: 942e74b75b54f63f4849d3f986159281ca1d79cc1bcb3cb5116966705e37920c519bec4d1be97bf2fc01c24940d6e391079a3349ce3527d35ddfddac5f35d91d
7
- data.tar.gz: 46e61a948e6ba68a844d85034f7f304d1a0aab067d2c88e7959a4898d0dcc6ff0c8c0469303792c64899cd18deea4c6316872dad7f83c85e55847c754906288c
6
+ metadata.gz: 3132b6615379d376930431d8c8decc33f1637c3061ac0c7b4697c0fea2ff10fce77e4397ab782bb7fd6909104c139dfb6681c712e2dab9aaed5b448f02307888
7
+ data.tar.gz: 2ab44e0292d18762ddd1dad0a2f495a4a6e54e87728622554e38e43e7e4f8819382c079c6057db3de9bbf9dce5d7e1fdc8e6cbf68e601928c2d72c1a09affb7e
@@ -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
@@ -1,3 +1,3 @@
1
1
  module PryInline
2
- VERSION = '1.0.0'
2
+ VERSION = '1.0.1'
3
3
  end
@@ -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.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: 2015-09-19 00:00:00.000000000 Z
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: