jruby-rcov 0.8.2.2-java → 0.8.2.3-java

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.
data/lib/rcov/version.rb CHANGED
@@ -3,9 +3,11 @@
3
3
  # See LEGAL and LICENSE for licensing information.
4
4
 
5
5
  module Rcov
6
- VERSION = "0.8.2.1"
7
- RELEASE_DATE = "2009-03-17"
8
- RCOVRT_ABI = [2,0,0]
9
- UPSTREAM_URL = "http://github.com/spicycode/rcov"
6
+
7
+ VERSION = "0.8.2.3"
8
+ RELEASE_DATE = "2009-06-03"
9
+ RCOVRT_ABI = [2,0,0]
10
+ UPSTREAM_URL = "http://github.com/jruby/rcov"
10
11
 
11
12
  end
13
+ # vi: set sw=2:
data/lib/rcov/xx.rb CHANGED
@@ -35,7 +35,7 @@ require "rexml/document"
35
35
 
36
36
 
37
37
  module XX
38
-
38
+ #--{{{
39
39
  VERSION = "0.1.0"
40
40
 
41
41
  %w(
@@ -46,48 +46,55 @@ module XX
46
46
  ).each{|c| const_set c, c}
47
47
 
48
48
  class Document
49
-
49
+ #--{{{
50
50
  attr "doc"
51
51
  attr "stack"
52
52
  attr "size"
53
53
 
54
- def initialize(*a, &b)
54
+ def initialize *a, &b
55
+ #--{{{
55
56
  @doc = ::REXML::Document::new(*a, &b)
56
57
  @stack = [@doc]
57
58
  @size = 0
59
+ #--}}}
58
60
  end
59
-
60
61
  def top
62
+ #--{{{
61
63
  @stack.last
64
+ #--}}}
62
65
  end
63
-
64
- def push(element)
66
+ def push element
67
+ #--{{{
65
68
  @stack.push element
69
+ #--}}}
66
70
  end
67
-
68
71
  def pop
72
+ #--{{{
69
73
  @stack.pop unless @stack.size == 1
74
+ #--}}}
70
75
  end
71
-
72
76
  def tracking_additions
77
+ #--{{{
73
78
  n = @size
74
79
  yield
75
80
  return @size - n
81
+ #--}}}
76
82
  end
77
-
78
- def to_str(port = "")
83
+ def to_str port = ""
84
+ #--{{{
79
85
  @doc.write port, indent=-1, transitive=false, ie_hack=true
80
86
  port
87
+ #--}}}
81
88
  end
82
-
83
89
  alias_method "to_s", "to_str"
84
-
85
- def pretty(port = '')
90
+ def pretty port = ''
91
+ #--{{{
86
92
  @doc.write port, indent=2, transitive=false, ie_hack=true
87
93
  port
94
+ #--}}}
88
95
  end
89
-
90
- def create(element)
96
+ def create element
97
+ #--{{{
91
98
  push element
92
99
  begin
93
100
  object = nil
@@ -103,10 +110,10 @@ module XX
103
110
  end
104
111
  self << element
105
112
  element
106
-
113
+ #--}}}
107
114
  end
108
115
  def << object
109
-
116
+ #--{{{
110
117
  t, x = top, object
111
118
 
112
119
  if x
@@ -186,19 +193,19 @@ module XX
186
193
 
187
194
  @size += 1
188
195
  self
189
-
196
+ #--}}}
190
197
  end
191
-
198
+ #--}}}
192
199
  end
193
200
 
194
201
  module Markup
195
-
202
+ #--{{{
196
203
  class Error < ::StandardError; end
197
204
 
198
205
  module InstanceMethods
199
-
206
+ #--{{{
200
207
  def method_missing m, *a, &b
201
-
208
+ #--{{{
202
209
  m = m.to_s
203
210
 
204
211
  tag_method, tag_name = xx_class::xx_tag_method_name m
@@ -236,10 +243,10 @@ module XX
236
243
  end
237
244
 
238
245
  ret
239
-
246
+ #--}}}
240
247
  end
241
248
  def xx_tag_ tag_name, *a, &b
242
-
249
+ #--{{{
243
250
  tag_method, tag_name = xx_class::xx_tag_method_name tag_name
244
251
 
245
252
  ret, defined = nil
@@ -254,11 +261,11 @@ module XX
254
261
  end
255
262
 
256
263
  ret
257
-
264
+ #--}}}
258
265
  end
259
266
  alias_method "g_", "xx_tag_"
260
267
  def xx_which *argv
261
-
268
+ #--{{{
262
269
  @xx_which = nil unless defined? @xx_which
263
270
  if argv.empty?
264
271
  @xx_which
@@ -271,10 +278,10 @@ module XX
271
278
  @xx_which = xx_which
272
279
  end
273
280
  end
274
-
281
+ #--}}}
275
282
  end
276
283
  def xx_with_doc_in_effect *a, &b
277
-
284
+ #--{{{
278
285
  @xx_docs ||= []
279
286
  doc = ::XX::Document::new(*a)
280
287
  ddoc = doc.doc
@@ -304,15 +311,15 @@ module XX
304
311
  ensure
305
312
  @xx_docs.pop
306
313
  end
307
-
314
+ #--}}}
308
315
  end
309
316
  def xx_doc
310
-
317
+ #--{{{
311
318
  @xx_docs.last rescue raise "no xx_doc in effect!"
312
-
319
+ #--}}}
313
320
  end
314
321
  def xx_text_ *objects, &b
315
-
322
+ #--{{{
316
323
  doc = xx_doc
317
324
 
318
325
  text =
@@ -325,12 +332,12 @@ module XX
325
332
  end
326
333
 
327
334
  doc.create text, &b
328
-
335
+ #--}}}
329
336
  end
330
337
  alias_method "text_", "xx_text_"
331
338
  alias_method "t_", "xx_text_"
332
339
  def xx_markup_ *objects, &b
333
-
340
+ #--{{{
334
341
  doc = xx_doc
335
342
 
336
343
  doc2 = ::REXML::Document::new ""
@@ -344,11 +351,11 @@ module XX
344
351
  puts doc2.to_s
345
352
  STDIN.gets
346
353
  ret
347
-
354
+ #--}}}
348
355
  end
349
356
  alias_method "x_", "xx_markup_"
350
357
  def xx_any_ *objects, &b
351
-
358
+ #--{{{
352
359
  doc = xx_doc
353
360
  nothing = %r/.^/m
354
361
 
@@ -362,13 +369,13 @@ module XX
362
369
  end
363
370
 
364
371
  doc.create text, &b
365
-
372
+ #--}}}
366
373
  end
367
374
  alias_method "h_", "xx_any_"
368
375
  remove_method "x_" if instance_methods.include? "x_"
369
376
  alias_method "x_", "xx_any_" # supplant for now
370
377
  def xx_cdata_ *objects, &b
371
-
378
+ #--{{{
372
379
  doc = xx_doc
373
380
 
374
381
  cdata = ::REXML::CData::new ""
@@ -378,20 +385,20 @@ module XX
378
385
  end
379
386
 
380
387
  doc.create cdata, &b
381
-
388
+ #--}}}
382
389
  end
383
390
  alias_method "c_", "xx_cdata_"
384
391
  def xx_parse_attributes string
385
-
392
+ #--{{{
386
393
  string = string.to_s
387
394
  tokens = string.split %r/,/o
388
395
  tokens.map{|t| t.sub!(%r/[^=]+=/){|key_eq| key_eq.chop << " : "}}
389
396
  xx_parse_yaml_attributes(tokens.join(','))
390
-
397
+ #--}}}
391
398
  end
392
399
  alias_method "att_", "xx_parse_attributes"
393
400
  def xx_parse_yaml_attributes string
394
-
401
+ #--{{{
395
402
  require "yaml"
396
403
  string = string.to_s
397
404
  string = "{" << string unless string =~ %r/^\s*[{]/o
@@ -399,75 +406,75 @@ module XX
399
406
  obj = ::YAML::load string
400
407
  raise ArgumentError, "<#{ obj.class }> not Hash!" unless Hash === obj
401
408
  obj
402
-
409
+ #--}}}
403
410
  end
404
411
  alias_method "at_", "xx_parse_yaml_attributes"
405
412
  alias_method "yat_", "xx_parse_yaml_attributes"
406
413
  def xx_class
407
-
414
+ #--{{{
408
415
  @xx_class ||= self.class
409
-
416
+ #--}}}
410
417
  end
411
418
  def xx_tag_method_name *a, &b
412
-
419
+ #--{{{
413
420
  xx_class.xx_tag_method_name(*a, &b)
414
-
421
+ #--}}}
415
422
  end
416
423
  def xx_define_tmp_method *a, &b
417
-
424
+ #--{{{
418
425
  xx_class.xx_define_tmp_methodr(*a, &b)
419
-
426
+ #--}}}
420
427
  end
421
428
  def xx_define_tag_method *a, &b
422
-
429
+ #--{{{
423
430
  xx_class.xx_define_tag_method(*a, &b)
424
-
431
+ #--}}}
425
432
  end
426
433
  def xx_remove_tag_method *a, &b
427
-
434
+ #--{{{
428
435
  xx_class.xx_tag_remove_method(*a, &b)
429
-
436
+ #--}}}
430
437
  end
431
438
  def xx_ancestors
432
-
439
+ #--{{{
433
440
  raise Error, "no xx_which in effect" unless xx_which
434
441
  xx_class.xx_ancestors xx_which
435
-
442
+ #--}}}
436
443
  end
437
444
  def xx_config
438
-
445
+ #--{{{
439
446
  xx_class.xx_config
440
-
447
+ #--}}}
441
448
  end
442
449
  def xx_config_for *a, &b
443
-
450
+ #--{{{
444
451
  xx_class.xx_config_for(*a, &b)
445
-
452
+ #--}}}
446
453
  end
447
454
  def xx_configure *a, &b
448
-
455
+ #--{{{
449
456
  xx_class.xx_configure(*a, &b)
450
-
457
+ #--}}}
451
458
  end
452
-
459
+ #--}}}
453
460
  end
454
461
 
455
462
  module ClassMethods
456
-
463
+ #--{{{
457
464
  def xx_tag_method_name m
458
-
465
+ #--{{{
459
466
  m = m.to_s
460
467
  tag_method, tag_name = m, m.gsub(%r/_+$/, "")
461
468
  [ tag_method, tag_name ]
462
-
469
+ #--}}}
463
470
  end
464
471
  def xx_define_tmp_method m
465
-
472
+ #--{{{
466
473
  define_method(m){ raise NotImplementedError, m.to_s }
467
-
474
+ #--}}}
468
475
  end
469
476
  def xx_define_tag_method tag_method, tag_name = nil
470
-
477
+ #--{{{
471
478
  tag_method = tag_method.to_s
472
479
  tag_name ||= tag_method.gsub %r/_+$/, ""
473
480
 
@@ -486,15 +493,15 @@ module XX
486
493
  end
487
494
  code
488
495
  tag_method
489
-
496
+ #--}}}
490
497
  end
491
498
  def xx_remove_tag_method tag_method
492
-
499
+ #--{{{
493
500
  remove_method tag_method rescue nil
494
-
501
+ #--}}}
495
502
  end
496
503
  def xx_ancestors xx_which = self
497
-
504
+ #--{{{
498
505
  list = []
499
506
  ancestors.each do |a|
500
507
  list << a if a < xx_which
@@ -503,15 +510,15 @@ module XX
503
510
  list << a if a <= Markup
504
511
  end
505
512
  list
506
-
513
+ #--}}}
507
514
  end
508
515
  def xx_config
509
-
516
+ #--{{{
510
517
  @@xx_config ||= Hash::new{|h,k| h[k] = {}}
511
-
518
+ #--}}}
512
519
  end
513
520
  def xx_config_for key, xx_which = nil
514
-
521
+ #--{{{
515
522
  key = key.to_s
516
523
  xx_which ||= self
517
524
  xx_ancestors(xx_which).each do |a|
@@ -520,23 +527,23 @@ module XX
520
527
  end
521
528
  end
522
529
  nil
523
-
530
+ #--}}}
524
531
  end
525
532
  def xx_configure key, value, xx_which = nil
526
-
533
+ #--{{{
527
534
  key = key.to_s
528
535
  xx_which ||= self
529
536
  xx_config[xx_which][key] = value
530
-
537
+ #--}}}
531
538
  end
532
-
539
+ #--}}}
533
540
  end
534
541
 
535
542
  extend ClassMethods
536
543
  include InstanceMethods
537
544
 
538
545
  def self::included other, *a, &b
539
-
546
+ #--{{{
540
547
  ret = super
541
548
  other.module_eval do
542
549
  include Markup::InstanceMethods
@@ -546,7 +553,7 @@ module XX
546
553
  end
547
554
  end
548
555
  ret
549
-
556
+ #--}}}
550
557
  end
551
558
  XX_MARKUP_RECURSIVE_INCLUSION_PROC = method("included").to_proc
552
559
 
@@ -554,16 +561,16 @@ module XX
554
561
  xx_configure "tags", []
555
562
  xx_configure "doctype", nil
556
563
  xx_configure "xmldecl", nil
557
-
564
+ #--}}}
558
565
  end
559
566
 
560
567
  module XHTML
561
-
568
+ #--{{{
562
569
  include Markup
563
570
  xx_configure "doctype", %(html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd")
564
571
 
565
572
  def xhtml_ which = XHTML, *a, &b
566
-
573
+ #--{{{
567
574
  xx_which(which) do
568
575
  doc = xx_with_doc_in_effect(*a, &b)
569
576
  ddoc = doc.doc
@@ -581,11 +588,11 @@ module XX
581
588
  end
582
589
  doc
583
590
  end
584
-
591
+ #--}}}
585
592
  end
586
593
 
587
594
  module Strict
588
-
595
+ #--{{{
589
596
  include XHTML
590
597
  xx_configure "doctype", %(html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd")
591
598
  xx_configure "tags", %w(
@@ -600,40 +607,40 @@ module XX
600
607
  xx_configure "method_missing", ::XX::STRICT
601
608
 
602
609
  def xhtml_ which = XHTML::Strict, *a, &b
603
-
610
+ #--{{{
604
611
  super(which, *a, &b)
605
-
612
+ #--}}}
606
613
  end
607
-
614
+ #--}}}
608
615
  end
609
616
 
610
617
  module Transitional
611
-
618
+ #--{{{
612
619
  include XHTML
613
620
  xx_configure "doctype", %(html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd")
614
621
  def xhtml_ which = XHTML::Transitional, *a, &b
615
-
622
+ #--{{{
616
623
  super(which, *a, &b)
617
-
624
+ #--}}}
618
625
  end
619
-
626
+ #--}}}
620
627
  end
621
-
628
+ #--}}}
622
629
  end
623
630
 
624
631
  module HTML4
625
-
632
+ #--{{{
626
633
  include Markup
627
634
  xx_configure "doctype", %(html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN")
628
635
 
629
636
  def html4_ which = HTML4, *a, &b
630
-
637
+ #--{{{
631
638
  xx_which(which){ xx_with_doc_in_effect(*a, &b) }
632
-
639
+ #--}}}
633
640
  end
634
641
 
635
642
  module Strict
636
-
643
+ #--{{{
637
644
  include HTML4
638
645
  xx_configure "doctype", %(html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN")
639
646
  xx_configure "tags", %w(
@@ -647,41 +654,41 @@ module XX
647
654
  )
648
655
  xx_configure "method_missing", ::XX::STRICT
649
656
  def html4_ which = HTML4::Strict, *a, &b
650
-
657
+ #--{{{
651
658
  super(which, *a, &b)
652
-
659
+ #--}}}
653
660
  end
654
-
661
+ #--}}}
655
662
  end
656
663
 
657
664
  module Transitional
658
-
665
+ #--{{{
659
666
  include HTML4
660
667
  xx_configure "doctype", %(html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN")
661
668
  def html4_ which = HTML4::Transitional, *a, &b
662
-
669
+ #--{{{
663
670
  super(which, *a, &b)
664
-
671
+ #--}}}
665
672
  end
666
-
673
+ #--}}}
667
674
  end
668
-
675
+ #--}}}
669
676
  end
670
677
  HTML = HTML4
671
678
 
672
679
  module XML
673
-
680
+ #--{{{
674
681
  include Markup
675
682
  xx_configure "xmldecl", ::REXML::XMLDecl::new
676
683
 
677
684
  def xml_ *a, &b
678
-
685
+ #--{{{
679
686
  xx_which(XML){ xx_with_doc_in_effect(*a, &b)}
680
-
687
+ #--}}}
681
688
  end
682
-
689
+ #--}}}
683
690
  end
684
-
691
+ #--}}}
685
692
  end
686
693
 
687
694
  $__xx_rb__ = __FILE__
data/lib/rcov.rb CHANGED
@@ -10,7 +10,6 @@
10
10
  # methods is actually executed under rcov's inspection.
11
11
 
12
12
  require 'rcov/version'
13
- require 'rcov/formatters'
14
13
 
15
14
  SCRIPT_LINES__ = {} unless defined? SCRIPT_LINES__
16
15
 
data/lib/rcovrt.jar CHANGED
Binary file
@@ -25,7 +25,7 @@ class TestFunctional < Test::Unit::TestCase
25
25
  @@dir = Pathname(__FILE__).expand_path.dirname
26
26
 
27
27
  def strip_variable_sections(str)
28
- str.sub(/Generated on.+$/, '').sub(/Generated using the.+$/, '').squeeze("\n")
28
+ str.sub(/Generated on.+$/, '').sub(/Generated using the.+$/, '')
29
29
  end
30
30
 
31
31
  def cmp(file)
@@ -56,34 +56,39 @@ class TestFunctional < Test::Unit::TestCase
56
56
 
57
57
  @@selection = "--include-file=sample --exclude=rcov"
58
58
  def test_text_gcc
59
- run_rcov("--gcc #{@@selection}", "assets/sample_04.rb", "> actual_coverage/gcc-text.out") do
59
+ run_rcov("--gcc #{@@selection}",
60
+ "assets/sample_04.rb",
61
+ "> actual_coverage/gcc-text.out") do
60
62
  cmp "gcc-text.out"
61
63
  end
62
64
  end
63
65
 
64
66
  def test_diff
65
67
  with_testdir { FileUtils.cp "assets/sample_05-old.rb", "assets/sample_05.rb" }
66
-
67
- run_rcov("--no-html --gcc #{@@selection} --save=coverage.info", "assets/sample_05.rb", "> actual_coverage/diff-gcc-original.out") do
68
+ run_rcov("--no-html --gcc #{@@selection} --save=coverage.info", "assets/sample_05.rb",
69
+ "> actual_coverage/diff-gcc-original.out") do
68
70
  cmp "diff-gcc-original.out"
69
71
  end
70
72
 
71
73
  with_testdir { FileUtils.cp "assets/sample_05-new.rb", "assets/sample_05.rb" }
72
- run_rcov("--no-html -D --gcc #{@@selection}", "assets/sample_05.rb", "> actual_coverage/diff-gcc-diff.out") do
74
+ run_rcov("--no-html -D --gcc #{@@selection}", "assets/sample_05.rb",
75
+ "> actual_coverage/diff-gcc-diff.out") do
73
76
  cmp "diff-gcc-diff.out"
74
77
  end
75
78
 
76
- run_rcov("--no-html -D #{@@selection}", "assets/sample_05.rb", "> actual_coverage/diff.out") do
79
+ run_rcov("--no-html -D #{@@selection}", "assets/sample_05.rb",
80
+ "> actual_coverage/diff.out") do
77
81
  cmp "diff.out"
78
82
  end
79
83
 
80
- run_rcov("--no-html --no-color -D #{@@selection}", "assets/sample_05.rb", "> actual_coverage/diff-no-color.out") do
84
+ run_rcov("--no-html --no-color -D #{@@selection}", "assets/sample_05.rb",
85
+ "> actual_coverage/diff-no-color.out") do
81
86
  cmp "diff-no-color.out"
82
87
  end
83
88
 
84
- run_rcov("--no-html --gcc #{@@selection}", "assets/sample_05.rb", "> actual_coverage/diff-gcc-all.out") do
89
+ run_rcov("--no-html --gcc #{@@selection}", "assets/sample_05.rb",
90
+ "> actual_coverage/diff-gcc-all.out") do
85
91
  cmp "diff-gcc-all.out"
86
- end
92
+ end
87
93
  end
88
-
89
94
  end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jruby-rcov
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2.2
4
+ version: 0.8.2.3
5
5
  platform: java
6
6
  authors:
7
7
  - Mauricio Fernandez
8
8
  - Chad Humphries
9
9
  - Aaron Bedra
10
+ - Jay McGaffigan
10
11
  autorequire:
11
12
  bindir: bin
12
13
  cert_chain:
@@ -51,13 +52,6 @@ files:
51
52
  - setup.rb
52
53
  - BLURB
53
54
  - CHANGES
54
- - lib/rcov/formatters/base_formatter.rb
55
- - lib/rcov/formatters/full_text_report.rb
56
- - lib/rcov/formatters/html_coverage.rb
57
- - lib/rcov/formatters/text_coverage_diff.rb
58
- - lib/rcov/formatters/text_report.rb
59
- - lib/rcov/formatters/text_summary.rb
60
- - lib/rcov/formatters.rb
61
55
  - lib/rcov/lowlevel.rb
62
56
  - lib/rcov/rcovtask.rb
63
57
  - lib/rcov/report.rb