seeing_is_believing 3.1.1 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/Rakefile +43 -16
- data/Readme.md +27 -242
- data/appveyor.yml +29 -0
- data/bin/seeing_is_believing +2 -1
- data/features/deprecated-flags.feature +19 -0
- data/features/errors.feature +57 -0
- data/features/examples.feature +4 -2
- data/features/flags.feature +35 -2
- data/features/regression.feature +107 -10
- data/features/support/env.rb +61 -2
- data/features/xmpfilter-style.feature +3 -2
- data/lib/seeing_is_believing/binary/annotate_end_of_file.rb +11 -9
- data/lib/seeing_is_believing/binary/annotate_every_line.rb +9 -8
- data/lib/seeing_is_believing/binary/annotate_marked_lines.rb +9 -8
- data/lib/seeing_is_believing/binary/config.rb +19 -3
- data/lib/seeing_is_believing/binary/engine.rb +5 -10
- data/lib/seeing_is_believing/evaluate_by_moving_files.rb +60 -45
- data/lib/seeing_is_believing/event_stream/consumer.rb +6 -1
- data/lib/seeing_is_believing/event_stream/handlers/debug.rb +5 -1
- data/lib/seeing_is_believing/event_stream/producer.rb +1 -1
- data/lib/seeing_is_believing/hard_core_ensure.rb +6 -0
- data/lib/seeing_is_believing/result.rb +26 -14
- data/lib/seeing_is_believing/safe.rb +6 -1
- data/lib/seeing_is_believing/the_matrix.rb +16 -4
- data/lib/seeing_is_believing/version.rb +1 -1
- data/lib/seeing_is_believing/wrap_expressions.rb +1 -1
- data/lib/seeing_is_believing.rb +7 -10
- data/seeing_is_believing.gemspec +9 -8
- data/spec/binary/config_spec.rb +65 -4
- data/spec/binary/engine_spec.rb +1 -1
- data/spec/evaluate_by_moving_files_spec.rb +31 -5
- data/spec/event_stream_spec.rb +14 -6
- data/spec/hard_core_ensure_spec.rb +70 -44
- data/spec/seeing_is_believing_spec.rb +136 -42
- data/spec/spec_helper.rb +8 -0
- data/spec/wrap_expressions_spec.rb +15 -0
- metadata +21 -6
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
-
require 'ichannel'
|
3
2
|
require 'seeing_is_believing/hard_core_ensure'
|
4
3
|
|
5
4
|
RSpec.describe SeeingIsBelieving::HardCoreEnsure do
|
@@ -41,54 +40,81 @@ RSpec.describe SeeingIsBelieving::HardCoreEnsure do
|
|
41
40
|
expect(ensure_invoked).to eq true
|
42
41
|
end
|
43
42
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
raise
|
62
|
-
else
|
63
|
-
test.call
|
64
|
-
end
|
43
|
+
def ruby(program)
|
44
|
+
child = ChildProcess.build RbConfig.ruby,
|
45
|
+
'-I', File.expand_path('../lib', __dir__),
|
46
|
+
'-r', 'seeing_is_believing/hard_core_ensure',
|
47
|
+
'-e', program
|
48
|
+
child.duplex = true
|
49
|
+
outread, outwrite = IO.pipe
|
50
|
+
errread, errwrite = IO.pipe
|
51
|
+
child.io.stdout = outwrite
|
52
|
+
child.io.stderr = errwrite
|
53
|
+
child.start
|
54
|
+
outwrite.close
|
55
|
+
errwrite.close
|
56
|
+
yield child, outread
|
57
|
+
ensure
|
58
|
+
errread && !errread.closed? && expect(errread.read).to(be_empty)
|
59
|
+
outread.close unless outread.closed?
|
65
60
|
end
|
66
61
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
trap 'INT', old_handler
|
62
|
+
|
63
|
+
# for fuck sake, I can't get Windows to let me trap the interrupt
|
64
|
+
it 'invokes the code even if an interrupt is sent and there is a default handler', windows: false do
|
65
|
+
program = <<-RUBY
|
66
|
+
trap("INT") do
|
67
|
+
puts %(CUSTOM-HANDLER)
|
68
|
+
exit
|
75
69
|
end
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
70
|
+
SeeingIsBelieving::HardCoreEnsure.new(
|
71
|
+
code: -> { puts %(CODE); $stdout.flush; sleep },
|
72
|
+
ensure: -> { puts %(ENSURE) },
|
73
|
+
).call
|
74
|
+
RUBY
|
75
|
+
ruby program do |ps, psout|
|
76
|
+
expect(psout.gets.chomp).to eq "CODE"
|
77
|
+
# is_alive = ChildProcess::Windows::Lib.alive?(ps.pid)
|
78
|
+
Process.kill 'INT', ps.pid
|
79
|
+
|
80
|
+
expect(psout.gets.chomp).to eq "ENSURE"
|
81
|
+
expect(psout.gets.chomp).to eq "CUSTOM-HANDLER"
|
82
82
|
end
|
83
|
+
end
|
84
|
+
|
85
|
+
it 'invokes the code even if an interrupt is sent and interrupts are set to ignore', windows: false do
|
86
|
+
# empty string isn't documented, but it causes ignore too
|
87
|
+
# https://github.com/ruby/ruby/blob/256d8c9ecffbcd8f4fe7562b866fcd55f1d445e7/signal.c#L1128-L1129
|
88
|
+
ignore_handlers = ['IGNORE', 'SIG_IGN', '']
|
89
|
+
|
90
|
+
ignore_handlers.each do |handler|
|
91
|
+
program = <<-RUBY
|
92
|
+
trap %(INT), #{handler.inspect}
|
93
|
+
SeeingIsBelieving::HardCoreEnsure.new(
|
94
|
+
code: -> {
|
95
|
+
puts %(CODE1)
|
96
|
+
$stdout.flush
|
97
|
+
gets
|
98
|
+
puts %(CODE2)
|
99
|
+
},
|
100
|
+
ensure: -> { puts %(ENSURE) },
|
101
|
+
).call
|
102
|
+
RUBY
|
103
|
+
ruby program do |ps, psout|
|
104
|
+
expect(psout.gets).to eq "CODE1\n" # we're in the code block
|
105
|
+
Process.kill 'INT', ps.pid # should be ignored
|
83
106
|
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
107
|
+
# note that if we don't check this, the pipe on the next line may beat the signal
|
108
|
+
# to the process leading to nondeterministic printing
|
109
|
+
expect(ps).to be_alive
|
110
|
+
|
111
|
+
ps.io.stdin.puts "wake up!"
|
112
|
+
ps.wait
|
113
|
+
expect(ps.exit_code).to eq 0
|
114
|
+
expect(psout.gets).to eq "CODE2\n"
|
115
|
+
expect(psout.gets).to eq "ENSURE\n"
|
116
|
+
expect(psout.gets).to eq nil
|
117
|
+
end
|
92
118
|
end
|
93
119
|
end
|
94
120
|
end
|
@@ -1,10 +1,10 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
|
3
|
-
|
4
3
|
require 'spec_helper'
|
5
4
|
require 'stringio'
|
6
5
|
require 'seeing_is_believing'
|
7
|
-
require '
|
6
|
+
require 'childprocess'
|
7
|
+
require 'json'
|
8
8
|
|
9
9
|
RSpec.describe SeeingIsBelieving do
|
10
10
|
def method_result(name)
|
@@ -30,12 +30,10 @@ RSpec.describe SeeingIsBelieving do
|
|
30
30
|
invoke(input, options).to_a
|
31
31
|
end
|
32
32
|
|
33
|
-
root_path
|
34
|
-
|
35
|
-
before(:all) { Dir.mkdir
|
36
|
-
around { |spec| Dir.chdir
|
37
|
-
|
38
|
-
let(:proving_grounds_dir) { File.expand_path '../../proving_grounds', __FILE__ }
|
33
|
+
root_path = File.realpath("..", __dir__)
|
34
|
+
proving_grounds_path = File.realdirpath('proving_grounds', root_path)
|
35
|
+
before(:all) { Dir.mkdir proving_grounds_path unless Dir.exist? proving_grounds_path }
|
36
|
+
around { |spec| Dir.chdir proving_grounds_path, &spec }
|
39
37
|
|
40
38
|
it 'takes a string and returns a result of the line numbers (counting from 1) and each inspected result from that line' do
|
41
39
|
input = "10+10\n'2'+'2'"
|
@@ -48,8 +46,8 @@ RSpec.describe SeeingIsBelieving do
|
|
48
46
|
end
|
49
47
|
|
50
48
|
it 'only invokes inspect once' do
|
51
|
-
input = "class
|
52
|
-
expect(invoke(input)[1]).to eq ['"
|
49
|
+
input = "class Array; def inspect; 'INSPECTED'\nend\nend\n[]"
|
50
|
+
expect(invoke(input)[1]).to eq ['"INSPECTED"']
|
53
51
|
end
|
54
52
|
|
55
53
|
it 'makes the SiB version info available' do
|
@@ -167,6 +165,28 @@ RSpec.describe SeeingIsBelieving do
|
|
167
165
|
expect(result.exception.backtrace).to be_a_kind_of Array
|
168
166
|
end
|
169
167
|
|
168
|
+
it 'allows multiple exceptions (eg because of a fork)', needs_fork: true do
|
169
|
+
errors = [
|
170
|
+
{ class_name: 'TypeError', message: 'a', line_number: 2},
|
171
|
+
{ class_name: 'ArgumentError', message: 'b', line_number: 4},
|
172
|
+
]
|
173
|
+
|
174
|
+
result = invoke(<<-RUBY)
|
175
|
+
if fork
|
176
|
+
raise #{errors[0].fetch(:class_name)}, #{errors[0].fetch(:message).inspect}
|
177
|
+
else
|
178
|
+
raise #{errors[1].fetch(:class_name)}, #{errors[1].fetch(:message).inspect}
|
179
|
+
end
|
180
|
+
RUBY
|
181
|
+
|
182
|
+
expect(result.exceptions.length).to eq errors.length
|
183
|
+
result.exceptions.sort_by(&:line_number).zip(errors).each do |actual, expected|
|
184
|
+
expected.each do |key, value|
|
185
|
+
expect(actual[key]).to eq value
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
170
190
|
context 'exceptions in exit blocks' do
|
171
191
|
# I'm punting on this because there is just no good way to stop that from happening without changing actual behaviour
|
172
192
|
# see https://github.com/JoshCheek/seeing_is_believing/issues/24
|
@@ -301,21 +321,21 @@ RSpec.describe SeeingIsBelieving do
|
|
301
321
|
end
|
302
322
|
|
303
323
|
it 'defaults the filename to temp_dir/program.rb' do
|
304
|
-
result = invoke('print File.
|
324
|
+
result = invoke('print File.realpath __FILE__')
|
305
325
|
expect(File.basename(result.stdout)).to eq 'program.rb'
|
306
326
|
end
|
307
327
|
|
308
328
|
it 'can be told to run as a given file (in a given dir/with a given filename)' do
|
309
|
-
filename = File.join
|
329
|
+
filename = File.join proving_grounds_path, 'mah_file.rb'
|
310
330
|
FileUtils.rm_f filename
|
311
|
-
result = invoke 'print File.
|
331
|
+
result = invoke 'print File.realpath __FILE__', filename: filename
|
312
332
|
expect(result.stdout).to eq filename
|
313
333
|
end
|
314
334
|
|
315
335
|
specify 'cwd of the file is the cwd of the evaluating program' do
|
316
|
-
filename = File.join
|
336
|
+
filename = File.join proving_grounds_path, 'mah_file.rb'
|
317
337
|
FileUtils.rm_f filename
|
318
|
-
expect(invoke('print File.
|
338
|
+
expect(invoke('print File.realdirpath(Dir.pwd)', filename: filename).stdout).to eq Dir.pwd
|
319
339
|
end
|
320
340
|
|
321
341
|
it 'does not capture output from __END__ onward' do
|
@@ -511,31 +531,87 @@ RSpec.describe SeeingIsBelieving do
|
|
511
531
|
end
|
512
532
|
|
513
533
|
it 'respects timeout, even when children do semi-ridiculous things, it cleans up children rather than orphaning them' do
|
514
|
-
|
515
|
-
result = invoke <<-
|
516
|
-
read,
|
517
|
-
|
518
|
-
|
519
|
-
|
534
|
+
pre = Time.now
|
535
|
+
result = invoke <<-CHILD, timeout_seconds: 0.5
|
536
|
+
read, _ = IO.pipe
|
537
|
+
|
538
|
+
# bock grandchild
|
539
|
+
pid = spawn 'ruby', '-e', '$stdin.read', in: read
|
540
|
+
|
541
|
+
puts Process.pid # print child pid
|
542
|
+
puts pid # print grandchild id
|
543
|
+
read.read # block child
|
544
|
+
CHILD
|
545
|
+
post = Time.now
|
546
|
+
expect(result.timeout?).to eq true
|
547
|
+
expect(result.timeout_seconds).to eq 0.5
|
548
|
+
expect(post - pre).to be > 0.5
|
549
|
+
child_id, grandchild_id, *rest = result.stdout.lines
|
550
|
+
expect(child_id).to match /^\d+$/
|
551
|
+
expect(grandchild_id).to match /^\d+$/
|
552
|
+
expect(rest).to be_empty
|
553
|
+
expect { Process.wait child_id.to_i } .to raise_error /no.*processes/i
|
554
|
+
expect { Process.wait grandchild_id.to_i } .to raise_error /no.*processes/i
|
555
|
+
end
|
556
|
+
|
557
|
+
|
558
|
+
# see https://github.com/JoshCheek/seeing_is_believing/pull/92
|
559
|
+
# and https://github.com/JoshCheek/seeing_is_believing/pull/94
|
560
|
+
# I can't figure out how to get it working on Windows. Not sure if
|
561
|
+
# this is because there's a problem with it, or because Windows
|
562
|
+
# handles traps differently, or because the feedback cycle is too painful.
|
563
|
+
# (I have to start a VM, clone the shit, setup a mediocre vim,
|
564
|
+
# use powershell which I don't know, just all the little things
|
565
|
+
# are off so someting as simple as dropping a pry into the test
|
566
|
+
# to figure out WTF is going on, it becomes prohibitively difficult)
|
567
|
+
it 'kills the child and all of its children when the main SiB process gets killed, even if they\'re nonsensing it up', windows: false do
|
568
|
+
# start SiB, it will make a child, use --stream so we can
|
569
|
+
# access individual events as they are emitted (to get the pids)
|
570
|
+
bin_path = File.realpath '../bin/seeing_is_believing', __dir__
|
571
|
+
sib = ChildProcess.build bin_path, '--stream', '-e', <<-RUBY
|
572
|
+
# the child makes a grandchild that ignores interrupts and sleeps
|
573
|
+
spawn %(ruby), %(-e), %(trap %(INT), %(IGNORE); sleep)
|
574
|
+
|
575
|
+
# the child ignores interrupts and sleeps
|
576
|
+
trap %(INT), %(IGNORE)
|
577
|
+
Process.pid
|
578
|
+
sleep
|
520
579
|
RUBY
|
521
|
-
|
522
|
-
|
580
|
+
|
581
|
+
# Hook up the io and start the child process
|
582
|
+
read, write = IO.pipe
|
583
|
+
sib.io.stdout = write
|
584
|
+
sib.io.stderr = write
|
585
|
+
sib.duplex = true # otherwise it takes the real process's stdin, which will mess w/ pry
|
586
|
+
sib.start
|
587
|
+
write.close
|
588
|
+
|
589
|
+
# Get the child and grandchild ids. If we read too far, we lock up the test
|
590
|
+
pids = []
|
591
|
+
until pids.length == 2
|
592
|
+
event, data = JSON.parse read.gets
|
593
|
+
next unless event == 'line_result'
|
594
|
+
next unless data.fetch('inspected') =~ /\A\d+\z/
|
595
|
+
pids << data.fetch('inspected').to_i
|
523
596
|
end
|
524
|
-
end
|
525
597
|
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
598
|
+
# Interrupt SiB, it interrupts child and grandchild
|
599
|
+
expect(sib).to be_alive
|
600
|
+
Process.kill 'INT', sib.pid
|
601
|
+
|
602
|
+
# wait for it to finish cleaning up so we don't check pids before it gets around to killing them
|
603
|
+
sib.wait
|
604
|
+
|
605
|
+
# Apparently we can check if processes exist by sending them signal 0
|
606
|
+
# http://stackoverflow.com/questions/9152979/check-if-process-exists-given-its-pid
|
607
|
+
# ESRCH = "no such process", what we expect if SiB cleaned them up
|
608
|
+
# if they do exist, they will return `1` (in my experiments)
|
609
|
+
pids.each do |pid|
|
610
|
+
expect { Process.kill 0, pid }.to raise_error Errno::ESRCH
|
534
611
|
end
|
535
|
-
expect(channel.get).to eq nil # child exited normally
|
536
|
-
expect(channel.get).to eq 0.1 # child timed out
|
537
612
|
end
|
538
613
|
|
614
|
+
|
539
615
|
context 'when given a debugger' do
|
540
616
|
let(:stream) { StringIO.new }
|
541
617
|
let(:debugger) { SeeingIsBelieving::Debugger.new stream: stream }
|
@@ -558,7 +634,7 @@ RSpec.describe SeeingIsBelieving do
|
|
558
634
|
end
|
559
635
|
end
|
560
636
|
|
561
|
-
describe 'fork' do
|
637
|
+
describe 'fork', needs_fork: true do
|
562
638
|
it 'records results from both parent and child, without double reporting items that may have been left in the queue at the time of forking' do
|
563
639
|
n = 100
|
564
640
|
result = invoke <<-RUBY
|
@@ -594,7 +670,7 @@ RSpec.describe SeeingIsBelieving do
|
|
594
670
|
expect(ones).to eq ("1"*(n-1))
|
595
671
|
end
|
596
672
|
|
597
|
-
it 'works for Kernel#fork, Kernel.fork, Process.fork' do
|
673
|
+
it 'works for Kernel#fork, Kernel.fork, Process.fork', needs_fork: true do
|
598
674
|
result = invoke <<-RUBY
|
599
675
|
$$
|
600
676
|
if fork
|
@@ -701,18 +777,36 @@ RSpec.describe SeeingIsBelieving do
|
|
701
777
|
end
|
702
778
|
|
703
779
|
specify 'when Fixnum does not have <, <<, next, ==, inspect, to_s' do
|
704
|
-
|
780
|
+
if defined? Fixnum
|
781
|
+
result = invoke('class Fixnum
|
782
|
+
undef <
|
783
|
+
undef <<
|
784
|
+
undef ==
|
785
|
+
def next
|
786
|
+
"redefining instead of undefing b/c it comes from Integer"
|
787
|
+
end
|
788
|
+
undef to_s
|
789
|
+
undef inspect
|
790
|
+
end
|
791
|
+
"a"')
|
792
|
+
expect(result.stderr).to eq ''
|
793
|
+
expect(result.exitstatus).to eq 0
|
794
|
+
expect(result.to_a.last).to eq ['"a"']
|
795
|
+
end
|
796
|
+
end
|
797
|
+
|
798
|
+
specify 'when Integer does not have <, <<, next, ==, inspect, to_s' do
|
799
|
+
result = invoke('class Integer
|
705
800
|
undef <
|
706
|
-
undef <<
|
801
|
+
undef << if instance_methods.include? :<< # ruby 2.4+
|
707
802
|
undef ==
|
708
|
-
|
709
|
-
"redefining instead of undefing b/c it comes from Integer"
|
710
|
-
end
|
803
|
+
undef next
|
711
804
|
undef to_s
|
712
805
|
undef inspect
|
713
806
|
end
|
714
807
|
"a"')
|
715
808
|
expect(result.stderr).to eq ''
|
809
|
+
expect(result.exitstatus).to eq 0
|
716
810
|
expect(result.to_a.last).to eq ['"a"']
|
717
811
|
end
|
718
812
|
|
@@ -792,7 +886,7 @@ RSpec.describe SeeingIsBelieving do
|
|
792
886
|
expect(result.exception.class_name).to eq 'RuntimeError'
|
793
887
|
end
|
794
888
|
|
795
|
-
specify 'when Thread does not have .new, .current, #join, #abort_on_exception' do
|
889
|
+
specify 'when Thread does not have .new, .current, #join, #abort_on_exception', needs_fork: true do
|
796
890
|
expect(invoke('class << Thread
|
797
891
|
undef new
|
798
892
|
undef current if "2.0.0" != RUBY_VERSION && "1.9.3" != RUBY_VERSION
|
data/spec/spec_helper.rb
CHANGED
@@ -31,4 +31,12 @@ RSpec.configure do |c|
|
|
31
31
|
c.disable_monkey_patching!
|
32
32
|
c.include SibSpecHelpers
|
33
33
|
c.filter_run_excluding :not_implemented
|
34
|
+
|
35
|
+
if RSpec::Support::OS.windows? || RSpec::Support::Ruby.jruby?
|
36
|
+
c.before(needs_fork: true) { skip 'Fork is not available on this system' }
|
37
|
+
end
|
38
|
+
|
39
|
+
if RSpec::Support::OS.windows?
|
40
|
+
c.before(windows: false) { skip "This either doesn't work or I can't figure out how to test it on Windows" }
|
41
|
+
end
|
34
42
|
end
|
@@ -205,6 +205,7 @@ RSpec.describe SeeingIsBelieving::WrapExpressions do
|
|
205
205
|
end
|
206
206
|
|
207
207
|
it 'wraps macros' do
|
208
|
+
expect(wrap("__dir__")).to eq "<__dir__>"
|
208
209
|
expect(wrap("__FILE__")).to eq "<__FILE__>"
|
209
210
|
expect(wrap("__LINE__")).to eq "<__LINE__>"
|
210
211
|
expect(wrap("__ENCODING__")).to eq "<__ENCODING__>"
|
@@ -475,6 +476,20 @@ RSpec.describe SeeingIsBelieving::WrapExpressions do
|
|
475
476
|
expect(wrap("case\nwhen 2, 3 then\n4\n5\nend")).to eq "<case\nwhen 2, 3 then\n<4>\n<5>\nend>"
|
476
477
|
end
|
477
478
|
|
479
|
+
it 'does not wrap flip flops in if-statement conditionals' do
|
480
|
+
# these match
|
481
|
+
expect(wrap("if (a==1)..(zomg.wtf?)\n 1\nend")).to eq "<if (a==1)..(zomg.wtf?)\n <1>\nend>"
|
482
|
+
expect(wrap("if (a==1)...(zomg.wtf?)\n 1\nend")).to eq "<if (a==1)...(zomg.wtf?)\n <1>\nend>"
|
483
|
+
|
484
|
+
# these match $_
|
485
|
+
expect(wrap("if /a/../b/\n 1\nend")).to eq "<if /a/../b/\n <1>\nend>"
|
486
|
+
expect(wrap("if /a/.../b/\n 1\nend")).to eq "<if /a/.../b/\n <1>\nend>"
|
487
|
+
|
488
|
+
# these are match $.
|
489
|
+
expect(wrap("if 1..2\n 1\nend")).to eq "<if 1..2\n <1>\nend>"
|
490
|
+
expect(wrap("if 1...2\n 1\nend")).to eq "<if 1...2\n <1>\nend>"
|
491
|
+
end
|
492
|
+
|
478
493
|
it 'does not wrap if the last value in any portion is a void value expression' do
|
479
494
|
expect(wrap("def a\nif true\nreturn 1\nend\nend")).to eq "<def a\nif <true>\nreturn <1>\nend\nend>"
|
480
495
|
expect(wrap("def a\nif true\n1\nelse\nreturn 2\nend\nend")).to eq "<def a\nif <true>\n<1>\nelse\nreturn <2>\nend\nend>"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: seeing_is_believing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Cheek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parser
|
@@ -30,6 +30,20 @@ dependencies:
|
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '3.0'
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: childprocess
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: 0.5.9
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 0.5.9
|
33
47
|
- !ruby/object:Gem::Dependency
|
34
48
|
name: haiti
|
35
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -107,19 +121,19 @@ dependencies:
|
|
107
121
|
- !ruby/object:Gem::Version
|
108
122
|
version: '2.4'
|
109
123
|
- !ruby/object:Gem::Dependency
|
110
|
-
name:
|
124
|
+
name: ripper-tags
|
111
125
|
requirement: !ruby/object:Gem::Requirement
|
112
126
|
requirements:
|
113
127
|
- - "~>"
|
114
128
|
- !ruby/object:Gem::Version
|
115
|
-
version: '
|
129
|
+
version: '0.3'
|
116
130
|
type: :development
|
117
131
|
prerelease: false
|
118
132
|
version_requirements: !ruby/object:Gem::Requirement
|
119
133
|
requirements:
|
120
134
|
- - "~>"
|
121
135
|
- !ruby/object:Gem::Version
|
122
|
-
version: '
|
136
|
+
version: '0.3'
|
123
137
|
description: Records the results of every line of code in your file (intended to be
|
124
138
|
like xmpfilter), inspired by Bret Victor's JavaScript example in his talk "Inventing
|
125
139
|
on Principle"
|
@@ -136,6 +150,7 @@ files:
|
|
136
150
|
- Gemfile
|
137
151
|
- Rakefile
|
138
152
|
- Readme.md
|
153
|
+
- appveyor.yml
|
139
154
|
- bin/seeing_is_believing
|
140
155
|
- docs/example.gif
|
141
156
|
- docs/frog-brown.png
|
@@ -264,7 +279,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
264
279
|
version: '0'
|
265
280
|
requirements: []
|
266
281
|
rubyforge_project: seeing_is_believing
|
267
|
-
rubygems_version: 2.
|
282
|
+
rubygems_version: 2.6.8
|
268
283
|
signing_key:
|
269
284
|
specification_version: 4
|
270
285
|
summary: Records results of every line of code in your file
|