ruby-debug-ide 0.4.25 → 0.4.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- OGQ3YTczMTAwZTAxZGFlM2I5NDgyNjlhMzQ0ZjgxMzliMjVmNGM2Yg==
5
- data.tar.gz: !binary |-
6
- MTY0ZWQzNmZjMjE5MmUxZjdhZjA3N2M4ZWFjYTE5ZDZmMjQ5Njc4Mw==
2
+ SHA1:
3
+ metadata.gz: 15ce02f886289fa12955ed1a25a9676b9bcf1387
4
+ data.tar.gz: ceea8a4034b4e559920d3125909cb76ba6299cde
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- OTlmZTU5ODNhZDUwZTJhYzA0MjM1ZTZkMDRiYzAxMzlkOTQ4ZjIzODhiODRm
10
- ZDMyODJkYTNmZTg3NmRjZmQ0MWMxY2RlYjU2OWY3ZDY2NDRlZjc2ZGQyMmFm
11
- YjJlNWRhOWFmODY0MjMyNjE3NDc5MzNjNGUzZGRjZjU3MGNmZGI=
12
- data.tar.gz: !binary |-
13
- YmU5MzZlMTIzNGM1YTg5OTM0YTU4ZmFhMGU3MzAxMGUxMzk4NWI4YzJlOTZk
14
- YmE1YTk5ODIzYzNmODZhZGNhYzllYjFlNjQ3MjU5MWIzYTg0OWVjMWJjZmZi
15
- MmU0ZjdlYzRmMTQ4NTJlZmYxYzAzNGNlN2YxNDNlMWExMTBmMjk=
6
+ metadata.gz: 8bbfb12c08c3f689437d0be25a5d40855329a60e8d98ab663937717529df2c5720f40b3707c161db431319bfb869e63333433199536bf6cfe71fbc8519d04882
7
+ data.tar.gz: 2aff18043524fd37206b7ff2cfbbbda7566dbe21296260f881f6e62c13c61044a8a21813bf21d357d7d3e1a298d8959dea9ab4ee6059892e4794c53fa3e24d04
@@ -1,3 +1,8 @@
1
+ ## [0.4.26](https://github.com/ruby-debug/ruby-debug-ide/compare/v0.4.25...v0.4.26)
2
+
3
+ * Compact value for inline debugger should be really compact
4
+ [RUBY-15932](https://youtrack.jetbrains.com/issue/RUBY-15932)
5
+
1
6
  ## [0.4.25](https://github.com/ruby-debug/ruby-debug-ide/compare/v0.4.24...v0.4.25)
2
7
 
3
8
  * Let's use String#inspect in print variable for String variables
@@ -1,3 +1,3 @@
1
1
  module Debugger
2
- IDE_VERSION='0.4.25'
2
+ IDE_VERSION='0.4.26'
3
3
  end
@@ -79,7 +79,7 @@ module Debugger
79
79
  # idx + 1: one-based numbering as classic-debugger
80
80
  file = context.frame_file(frame_id)
81
81
  print "<frame no=\"%s\" file=\"%s\" line=\"%s\" #{"current='true' " if frame_id == current_frame_id}/>",
82
- frame_id + 1, File.expand_path(file), context.frame_line(frame_id)
82
+ frame_id + 1, CGI.escapeHTML(File.expand_path(file)), context.frame_line(frame_id)
83
83
  end
84
84
 
85
85
  def print_contexts(contexts)
@@ -173,7 +173,8 @@ module Debugger
173
173
  value_str = handle_binary_data(value_str)
174
174
  escaped_value_str = CGI.escapeHTML(value_str)
175
175
  print("<variable name=\"%s\" %s kind=\"%s\" %s type=\"%s\" hasChildren=\"%s\" objectId=\"%#+x\">",
176
- CGI.escapeHTML(name), build_compact_value_attr(value), kind, build_value_attr(escaped_value_str), value.class,
176
+ CGI.escapeHTML(name), build_compact_value_attr(value, value_str), kind,
177
+ build_value_attr(escaped_value_str), value.class,
177
178
  has_children, value.respond_to?(:object_id) ? value.object_id : value.id)
178
179
  print("<value><![CDATA[%s]]></value>", escaped_value_str) if Debugger.rm_protocol_extensions
179
180
  print('</variable>')
@@ -282,7 +283,7 @@ module Debugger
282
283
 
283
284
  def print_at_line(context, file, line)
284
285
  print "<suspended file=\"%s\" line=\"%s\" threadId=\"%d\" frames=\"%d\"/>",
285
- File.expand_path(file), line, context.thnum, context.stack_size
286
+ CGI.escapeHTML(File.expand_path(file)), line, context.thnum, context.stack_size
286
287
  end
287
288
 
288
289
  def print_exception(exception, _)
@@ -341,15 +342,21 @@ module Debugger
341
342
  end
342
343
  end
343
344
 
344
- def build_compact_name(value)
345
+ def build_compact_name(value, value_str)
345
346
  return compact_array_str(value) if value.is_a?(Array)
346
347
  return compact_hash_str(value) if value.is_a?(Hash)
348
+ return value_str[0..max_compact_name_size - 3] + '...' if value_str.size > max_compact_name_size
347
349
  nil
348
350
  rescue ::Exception => e
349
351
  print_debug(e)
350
352
  nil
351
353
  end
352
354
 
355
+ def max_compact_name_size
356
+ # todo: do we want to configure it?
357
+ 50
358
+ end
359
+
353
360
  def compact_array_str(value)
354
361
  slice = value[0..10]
355
362
  compact = slice.inspect
@@ -365,8 +372,8 @@ module Debugger
365
372
  "{" + compact + (slice.size != value.size ? ", ..." : "") + "}"
366
373
  end
367
374
 
368
- def build_compact_value_attr(value)
369
- compact_value_str = build_compact_name(value)
375
+ def build_compact_value_attr(value, value_str)
376
+ compact_value_str = build_compact_name(value, value_str)
370
377
  compact_value_str.nil? ? '' : "compactValue=\"#{CGI.escapeHTML(compact_value_str)}\""
371
378
  end
372
379
 
metadata CHANGED
@@ -1,33 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-debug-ide
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.25
4
+ version: 0.4.26
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-01-20 00:00:00.000000000 Z
11
+ date: 2015-02-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: ! 'An interface which glues ruby-debug to IDEs like Eclipse (RDT), NetBeans
28
- and RubyMine.
29
-
30
- '
27
+ description: |
28
+ An interface which glues ruby-debug to IDEs like Eclipse (RDT), NetBeans and RubyMine.
31
29
  email: rubymine-feedback@jetbrains.com
32
30
  executables:
33
31
  - rdebug-ide
@@ -81,17 +79,17 @@ require_paths:
81
79
  - lib
82
80
  required_ruby_version: !ruby/object:Gem::Requirement
83
81
  requirements:
84
- - - ! '>='
82
+ - - ">="
85
83
  - !ruby/object:Gem::Version
86
84
  version: 1.8.2
87
85
  required_rubygems_version: !ruby/object:Gem::Requirement
88
86
  requirements:
89
- - - ! '>='
87
+ - - ">="
90
88
  - !ruby/object:Gem::Version
91
89
  version: '0'
92
90
  requirements: []
93
91
  rubyforge_project: debug-commons
94
- rubygems_version: 2.4.5
92
+ rubygems_version: 2.4.4
95
93
  signing_key:
96
94
  specification_version: 4
97
95
  summary: IDE interface for ruby-debug.