ruby-debug-ide 0.4.27 → 0.4.28

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 1bfebc1c9feda079b7667fc5a4a320029070a843
4
- data.tar.gz: 9dac677b66d0fc7dda61f50372497b706f6457dd
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ OGJiMGFhZTk3MjYxZmRmZTc5MGVhYzVjYjZhOWViODgwNGVmZWNkMw==
5
+ data.tar.gz: !binary |-
6
+ MzAyMGYyNzliMmI2YTI4Y2I0ZDZjNGVjNDE4MGYwMTc3MzgyYmU4MA==
5
7
  SHA512:
6
- metadata.gz: 7f4636d1915f6194871fc13f4b050c33b79e0133cc657107386e95af44b3725d8cc8dbf76ce857886dd46e1268d2bf9e4fbf8923487be0d0436ee00bc7a94983
7
- data.tar.gz: d0ee97a70fe48f602f04d8e5a6fa7e72b4f2aed631fb1bd95f528a497b1d64b098cfe8a7e856446c4221648fbfa5e3af7df3461d8c79270ed1f3d4bc163701a2
8
+ metadata.gz: !binary |-
9
+ ZDhiYWVmZmI0MGM0NjdmYzM0ZTE4Mjc5MjhhOGFmM2I2MmY4YWM5ZmZkMjhj
10
+ NDEyYzVlZDM1ZjEzZmYyMDA4Yjk1ZmRlYzY3YjdhN2RiNGEyODRjMzRkMjhh
11
+ NjRlMjlkNDIwODc4YjI4MDBiYzNmYzI2MTFlZjU1YmY5ODY5Yjg=
12
+ data.tar.gz: !binary |-
13
+ YjVmNWM0MjAxZjA5NGRhZDdjNzQ2ZGExYzI3Yjk5MTc3ODQ1M2ZkNjA4ZThj
14
+ NWZmNmFlOTJiNDRiZWVlMTU1NmQwODM1MmQ4NTVhYjY5ODMzMTQyY2QyYTA2
15
+ YzJhZDlkMzExZTk0YjUyNjZiN2Q5OGYxOTgxZTA5NWZkZWRkZjU=
@@ -1,3 +1,7 @@
1
+ ## [0.4.28](https://github.com/ruby-debug/ruby-debug-ide/compare/v0.4.27...v0.4.28)
2
+
3
+ * [better handling for escaped chars and slashes](https://github.com/ruby-debug/ruby-debug-ide/pull/68)
4
+
1
5
  ## [0.4.27](https://github.com/ruby-debug/ruby-debug-ide/compare/v0.4.26...v0.4.27)
2
6
 
3
7
  * Redundant quotes dropped from string variable representation
@@ -64,6 +64,11 @@ module Debugger
64
64
  def options
65
65
  @options ||= {}
66
66
  end
67
+
68
+ def unescape_incoming(str)
69
+ str.gsub(/((?:^|[^\\])(?:\\\\)*)\\n/, "\\1\n").
70
+ gsub(/\\\\/, '\\')
71
+ end
67
72
  end
68
73
 
69
74
  def initialize(state, printer)
@@ -104,12 +109,12 @@ module Debugger
104
109
  y.kill if y and y.alive?
105
110
  end
106
111
  end
107
-
112
+
108
113
  def debug_eval(str, b = get_binding)
109
114
  begin
110
115
  str = str.to_s
116
+ to_inspect = Command.unescape_incoming(str)
111
117
  max_time = Debugger.evaluation_timeout
112
- to_inspect = str.gsub(/\\n/, "\n")
113
118
  @printer.print_debug("Evaluating #{str} with timeout after %i sec", max_time)
114
119
  timeout(max_time) do
115
120
  eval(to_inspect, b)
@@ -9,20 +9,11 @@ module Debugger
9
9
  end
10
10
 
11
11
  def execute
12
- string_to_parse = @match.post_match.gsub("\\n", "\n") + "\n\n\n"
12
+ string_to_parse = Command.unescape_incoming(@match.post_match) + "\n\n\n"
13
13
  total_lines = string_to_parse.count("\n") + 1
14
14
 
15
15
  lexer = RubyLex.new
16
- io = StringIO.new(string_to_parse)
17
- # for passing to the lexer
18
- io.instance_exec(string_to_parse.encoding) do |string_encoding|
19
- @my_encoding = string_encoding
20
- def self.encoding
21
- @my_encoding
22
- end
23
- end
24
-
25
- lexer.set_input(io)
16
+ lexer.set_input(create_io_reader(string_to_parse))
26
17
 
27
18
  last_statement = ''
28
19
  last_prompt = ''
@@ -39,13 +30,28 @@ module Debugger
39
30
  end
40
31
 
41
32
  incomplete = true
42
- if /\A\s*\Z/m =~ last_statement[0]
33
+ if /\A\s*\Z/m =~ last_statement
43
34
  incomplete = false
44
35
  end
45
36
 
46
37
  @printer.print_expression_info(incomplete, last_prompt, last_indent)
47
38
  end
48
39
 
40
+ def create_io_reader(string_to_parse)
41
+ io = StringIO.new(string_to_parse)
42
+
43
+ if string_to_parse.respond_to?(:encoding)
44
+ io.instance_exec(string_to_parse.encoding) do |string_encoding|
45
+ @my_encoding = string_encoding
46
+ def self.encoding
47
+ @my_encoding
48
+ end
49
+ end
50
+ end
51
+
52
+ io
53
+ end
54
+
49
55
  class << self
50
56
  def help_command
51
57
  "expression_info"
@@ -1,3 +1,3 @@
1
1
  module Debugger
2
- IDE_VERSION='0.4.27'
2
+ IDE_VERSION='0.4.28'
3
3
  end
metadata CHANGED
@@ -1,31 +1,33 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-debug-ide
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.27
4
+ version: 0.4.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Markus Barchfeld, Martin Krauskopf, Mark Moseley, JetBrains RubyMine Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-16 00:00:00.000000000 Z
11
+ date: 2015-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.8.1
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.8.1
27
- description: |
28
- An interface which glues ruby-debug to IDEs like Eclipse (RDT), NetBeans and RubyMine.
27
+ description: ! 'An interface which glues ruby-debug to IDEs like Eclipse (RDT), NetBeans
28
+ and RubyMine.
29
+
30
+ '
29
31
  email: rubymine-feedback@jetbrains.com
30
32
  executables:
31
33
  - rdebug-ide
@@ -79,17 +81,17 @@ require_paths:
79
81
  - lib
80
82
  required_ruby_version: !ruby/object:Gem::Requirement
81
83
  requirements:
82
- - - ">="
84
+ - - ! '>='
83
85
  - !ruby/object:Gem::Version
84
86
  version: 1.8.2
85
87
  required_rubygems_version: !ruby/object:Gem::Requirement
86
88
  requirements:
87
- - - ">="
89
+ - - ! '>='
88
90
  - !ruby/object:Gem::Version
89
91
  version: '0'
90
92
  requirements: []
91
93
  rubyforge_project: debug-commons
92
- rubygems_version: 2.4.4
94
+ rubygems_version: 2.4.5
93
95
  signing_key:
94
96
  specification_version: 4
95
97
  summary: IDE interface for ruby-debug.