futo-spec 0.4.2 → 0.4.99.1

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,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 48d8df4da9a931c852aae9634f50935faf9ca0cb0b7a2710cd84e1aa2d4324a4
4
- data.tar.gz: b6b77baf4d97717ca952d68b4990a1dbfe6f386788aaad15e3d96676be2d538e
3
+ metadata.gz: '014822bd29f154dddac018ec8d3ec88e5ab3f41946ae5dd18bd5a1913adcde02'
4
+ data.tar.gz: 9845a20cdada8b9d5d438ff8310c1f84ea1bb6527803cbf080101812f3e888cc
5
5
  SHA512:
6
- metadata.gz: f0cf9e38aef828267575780c27d53629ae3f719ba90882f44582594edee317721ef4b6dc516363f2b3a6e1bc0a6b3cc343ff3b87b6f3aa687cfb25e2c267d82f
7
- data.tar.gz: 65ed1cd537b0550fcfd4087e40ff78d3eeed8a276a764ff9275131a4be38e39258015379b7adbf15e8366bdd6ff29fe4070d9af266c1568a87794cf2dfa7b0c6
6
+ metadata.gz: c0dd84772c65f807ea39411c2c88572ba01c601b342aa074d9d7498a3aa118a7aa3c3d6c0baf52c5d9437b7f2f0d3c698acf1d22dd37fb17a5813170720144e7
7
+ data.tar.gz: 8e42690d846e3278b745c31f3da3364f42492d98175906b1ce6d90168833a2ac73bea023b508844cecf11affa9b0c2770b83dc7d09cdb7feb004a023087a327c
data/bin/futo CHANGED
@@ -1,40 +1,58 @@
1
1
  #!/usr/bin/env ruby_executeable_hooks
2
2
  require 'fileutils'
3
3
  require 'futo-spec'
4
+ require 'paint/pa'
4
5
 
5
- output_version_only = false
6
- opts = {}
6
+ opts = Set.new
7
7
 
8
8
  def futo_init_directories
9
- FileUtils.mkdir_p("#{Dir.pwd}/futo/chizus")
10
- FileUtils.mkdir("#{Dir.pwd}/futo/_glue")
9
+ dirs = ['chizus/shared','_glue']
10
+ dirs.each do |dd|
11
+ FileUtils.mkdir_p("#{Dir.pwd}/futo/#{dd}")
12
+ end
13
+ File.new("#{Dir.pwd}/futo/_glue/env.rb", "w")
11
14
  end
12
15
 
16
+ def check_debug_envvar
17
+ if ENV.has_key?('DEBUG') && ENV['DEBUG'] == 'true'
18
+ $debug = true
19
+ end
20
+ end
21
+
22
+ exec_cases = true
23
+
13
24
  ARGV.each do |arg|
14
- if arg == '-d' || arg == '--dry-run'
15
- opts.store(:dry, true)
16
- elsif arg == '-md' || arg == '--markdown'
17
- opts.store(:markdown, true)
25
+ if arg == '--init'
26
+ exec_cases = false
27
+ pa 'setting futo directories ...', :yellow, :bright
28
+ futo_init_directories
29
+ pa 'init complete.', :yellow
18
30
  elsif arg == '-v' || arg == '--version'
19
- output_version_only = true
31
+ exec_cases = false
20
32
  puts Gem.loaded_specs['futo-spec'].version
21
- elsif arg == '--init'
22
- futo_init_directories
33
+ elsif arg == '-D' || arg == '--debug'
34
+ $debug = true
35
+ elsif arg == '-d' || arg == '--dry-run'
36
+ opts << :dry_run
37
+ elsif arg == '-md' || arg == '--markdown'
38
+ opts << :markdown
23
39
  elsif arg == '-h' || arg == '--headless'
24
- opts.store(:headless, true)
25
- elsif arg == '-v' || arg == '--version'
26
- output_version_only = true
40
+ opts << :headless
27
41
  elsif arg.end_with? '.futo'
28
- opts.store(:specified_file, arg)
42
+ opts << :specified_file
43
+ $specified_file = arg
29
44
  elsif arg.include? ':'
30
- opts.store(:specified_line, arg)
45
+ opts << :specified_line
31
46
  elsif not arg.start_with? '-'
32
47
  # support passing a file name without having to type .futo
33
- opts.store(:specified_file, "#{arg}.futo")
48
+ opts << :specified_file
49
+ $specified_file = "#{arg}.futo"
34
50
  end
35
51
  end
36
52
 
37
- unless output_version_only
53
+ if exec_cases
54
+ puts
55
+ check_debug_envvar
38
56
  fs = FutoSpec.new(opts)
39
57
  fs.run
40
58
  end
@@ -0,0 +1,13 @@
1
+ class BreakpointContext
2
+ def initialize(bind)
3
+ @local_vars = bind.local_variable_get(:local_vars)
4
+ end
5
+ def method_missing(symbol, *args)
6
+ if @local_vars.include? symbol.to_s
7
+ @local_vars[symbol.to_s]
8
+ end
9
+ end
10
+ def contextual_breakpoint
11
+ breakpoint
12
+ end
13
+ end
data/lib/futo-spec.rb CHANGED
@@ -1,13 +1,29 @@
1
- require 'byebug'; alias :breakpoint :byebug
1
+ require 'set'
2
2
  require 'find'
3
+ require 'byebug'; alias :breakpoint :byebug
3
4
  require 'paint/pa'
4
5
  require 'rspec/expectations'
5
6
  require 'rspec'
7
+ require 'whirly'
6
8
  require_relative './markdown_generator'
9
+ require_relative './context_breakpoint'
7
10
 
8
11
 
9
12
  BULLET_POINTS_REGEX = /[\->]*/
10
13
 
14
+ COLORS = {
15
+ init: :gray,
16
+ setup: :gray,
17
+ debug: :gray,
18
+ log: :yellow,
19
+ exec: :yellow,
20
+ support: 'cornflower blue',
21
+ out: 'dark khaki',
22
+ warning: 'coral',
23
+ missing: :yellow,
24
+ error: :red,
25
+ }
26
+
11
27
  RSpec.configure do |config|
12
28
  config.expect_with :rspec do |c|
13
29
  c.syntax = :should
@@ -16,11 +32,11 @@ end
16
32
 
17
33
  def logd(msg, *colors)
18
34
  if $debug
19
- unless colors
20
- puts msg
35
+ unless colors.length > 0
36
+ pa msg, COLORS[:debug]
21
37
  else
22
38
  if colors.first == :bb
23
- pa msg, :yellow, :bright
39
+ pa msg, COLORS[:debug], :bright
24
40
  else
25
41
  pa msg, *colors
26
42
  end
@@ -29,6 +45,10 @@ def logd(msg, *colors)
29
45
  end
30
46
  alias :dpa :logd
31
47
 
48
+ def pout(msg)
49
+ pa msg, COLORS[:out]
50
+ end
51
+
32
52
  class FutoBullet
33
53
  attr_accessor :label, :associated_commands
34
54
  def initialize(h)
@@ -72,69 +92,56 @@ class FutoSpec
72
92
  include RSpec::Matchers
73
93
  attr_accessor :cases, :chizu, :unmatched, :included_ins
74
94
 
75
- def check_and_set_debug
76
- if ENV.has_key? 'DEBUG'
77
- if ENV.fetch('DEBUG') == 'true'
78
- $debug = true
79
- end
80
- end
81
- end
82
-
83
95
  def initialize(opts={})
96
+ Whirly.configure spinner: "dots"
97
+ Whirly.configure append_newline: false
98
+ Whirly.configure color: false
99
+
84
100
  @cases = Array.new
85
- @chizu_array = Array.new
86
- @unmatched = Array.new
101
+ @chizu_files = Array.new
102
+ @chizus = Array.new
103
+ @unmatched = Set.new
87
104
  @included_ins = Array.new
88
105
 
89
- check_and_set_debug
90
-
91
- if opts.include? :dry
92
- $dry_run = true if opts[:dry]
93
- pa 'dry run', :gray
106
+ if $debug
107
+ dpa '-- debug mode --'
108
+ puts
94
109
  end
95
110
 
96
- if opts.include? :markdown
97
- $markdown = true if opts[:markdown]
98
- pa 'markdown mode', :gray, :bright
111
+ if opts.include? :dry_run
112
+ $dry_run = true
113
+ pa 'dry run', COLORS[:init], :bright
99
114
  end
100
115
 
101
- if opts.include? :headless
102
- $headless = true if opts[:headless]
116
+ if opts.include? :specified_file
117
+ dpa "specified file: #{$specified_file}"
103
118
  end
104
119
 
105
- if opts.include? :specified_line
106
- puts "line specified: #{opts.fetch(:specified_line)}"
107
- specified_line = opts.fetch(:specified_line)
108
- elsif opts.include? :specified_file
109
- puts "specific file requested: #{opts.fetch(:specified_file)}"
110
- specified_file = opts.fetch(:specified_file)
120
+ if opts.include? :headless
121
+ $headless = true
122
+ dpa 'headless mode'
111
123
  end
112
124
 
113
- if $markdown
114
- unless specified_file
115
- raise ArgumentError, "please specify a file when using --markdown option."
116
- else
117
- test_case_lines = process_specific_file(specified_file)
118
- generate_markdown_and_print(test_case_lines)
119
- pa 'finished markdown.', :gray, :bright
120
- end
125
+ if opts.include? :markdown
126
+ markdown_only
121
127
  else
122
128
  look_for_envrb_and_parse
123
- find_and_load_chizu_files
124
-
125
- if specified_line
126
- test_case_lines = process_specific_line(specified_line)
127
- dpa "line specified: #{specified_line} test case lines: #{test_case_lines}", :red
128
- elsif specified_file
129
- test_case_lines = process_specific_file(specified_file)
130
- else
131
- test_case_lines = discover_and_process_spec_files
132
- end
133
-
129
+ test_case_lines = process_specified_file
134
130
  create_test_cases(test_case_lines)
135
- dpa "test cases loaded: #{@cases.length}", :bb
131
+ find_matching_chizu_files
132
+ process_chizu_files
133
+ match_cases_to_chizus
134
+ end
135
+ end
136
136
 
137
- match_chizus_to_test_cases
137
+ def markdown_only
138
+ pa 'markdown mode', COLORS[:init], :bright
139
+ unless $specified_file
140
+ raise ArgumentError, "please specify a file when using --markdown option."
141
+ else
142
+ test_case_lines = process_specified_file
143
+ generate_markdown_and_print(test_case_lines)
144
+ pa 'finished markdown.', COLORS[:init]
138
145
  end
139
146
  end
140
147
 
@@ -142,7 +149,7 @@ class FutoSpec
142
149
  if Dir.children(Dir.pwd).include? 'futo'
143
150
  if Dir.children("#{Dir.pwd}/futo").include? '_glue'
144
151
  if Dir.children("#{Dir.pwd}/futo/_glue").include? 'env.rb'
145
- dpa 'found futo/_glue/env.rb', :gray
152
+ dpa 'found futo/_glue/env.rb', COLORS[:init]
146
153
  load 'futo/_glue/env.rb'
147
154
  end
148
155
  end
@@ -150,7 +157,7 @@ class FutoSpec
150
157
  end
151
158
 
152
159
  def discover_and_process_spec_files
153
- dpa "no file specified, discovering all .futo or .spec files ...", :yellow, :bright
160
+ dpa "no file specified, discovering all .futo or .spec files ...", COLORS[:init], :bright
154
161
  futo_files = []
155
162
  test_case_lines = []
156
163
 
@@ -165,11 +172,13 @@ class FutoSpec
165
172
  return test_case_lines
166
173
  end
167
174
 
168
- def process_specific_file(fn)
169
- dpa "process_specific_file: #{fn}", :yellow
170
- path = "futo/#{fn}"
175
+ def process_specified_file
176
+ dpa "process_specified_file: #{$specified_file}"
177
+ path = "futo/#{$specified_file}"
171
178
  File.open(path) do |file|
172
179
  file_lines = file.readlines(chomp:true)
180
+ # add one blank line to facilitate saving the last test case
181
+ file_lines << ''
173
182
  return file_lines
174
183
  end
175
184
  end
@@ -214,7 +223,11 @@ class FutoSpec
214
223
  end
215
224
 
216
225
  def add_case_to_spec
217
- @cases << FutoCase.new(@new_case_label, @new_case_bullets)
226
+ # don't add the last test case
227
+ unless @new_case_label == ''
228
+ dpa "adding new test case: #{@new_case_label}"
229
+ @cases << FutoCase.new(@new_case_label, @new_case_bullets)
230
+ end
218
231
  end
219
232
 
220
233
  def begin_new_case
@@ -271,7 +284,7 @@ class FutoSpec
271
284
  if File.exist?(fn)
272
285
  load(fn)
273
286
  else
274
- pa "failed to find setup file #{fn} for line: #{line}", :red
287
+ pa "failed to find setup file #{fn} for line: #{line}", COLORS[:red]
275
288
  end
276
289
  puts
277
290
  end
@@ -283,29 +296,29 @@ class FutoSpec
283
296
  l0 = line.gsub('(DONE)','').gsub('(done)','')
284
297
  ll = l0.lstrip.rstrip
285
298
  if is_newline? ll
286
- dpa "found newline: #{ll}", :yellow
299
+ dpa "found newline: #{ll}, saving existing case and starting a new one"
287
300
  add_case_to_spec
288
301
  begin_new_case
289
302
  else
290
303
  if is_mock_data? ll
291
- dpa "found mock data: #{ll}", :yellow
304
+ dpa "found mock data: #{ll}", COLORS[:setup]
292
305
  load_mock_data(ll)
293
306
  elsif is_bullet? ll
294
- dpa "found bullet: #{ll}", :yellow
307
+ dpa "found bullet: #{ll}", COLORS[:setup]
295
308
  new_bullet(ll)
296
309
  elsif is_asterisk? ll
297
- dpa "found asterisk, treating as description: #{ll}", :yellow
310
+ dpa "found asterisk, treating as description: #{ll}", COLORS[:setup]
298
311
  label = ll.gsub('*', '').lstrip
299
312
  new_label(label)
300
313
  elsif is_description? ll
301
- dpa "found new description: #{ll}", :yellow
314
+ dpa "found new description: #{ll}", COLORS[:setup]
302
315
  new_label(ll)
303
316
  else
304
- raise RuntimeError, "could not find entry type for string #{ll}"
317
+ raise RuntimeError, "could not find matching chizu entry type for: #{ll}"
305
318
  end
306
319
  end
320
+ dpa "test cases loaded: #{@cases.length}"
307
321
  end
308
-
309
322
  # catch anything left over
310
323
  add_case_to_spec
311
324
  end
@@ -324,28 +337,37 @@ class FutoSpec
324
337
  return single
325
338
  end
326
339
 
327
- def find_and_load_chizu_files
328
- chizu_files = []
329
- search_dir = "#{Dir.pwd}/futo/chizus"
330
- Find.find(search_dir) do |ff|
331
- chizu_files << ff if ff.end_with? '.chizu'
332
- chizu_files << ff if ff.end_with? '.rb'
340
+ def find_matching_chizu_files
341
+ without_suffix = $specified_file.chomp('.futo')
342
+ base = "#{Dir.pwd}/futo/chizus"
343
+ path = "#{base}/#{without_suffix}.chizu"
344
+ unless File.exist? path
345
+ pa "#{$specified_file}: couldn't find matching .chizu file", COLORS[:warning]
346
+ else
347
+ dpa "loading matching #{$specified_file}.chizu ...", COLORS[:setup]
348
+ @chizu_files << path
333
349
  end
334
350
 
335
- dpa "loading chizu ...", :yellow, :bright
336
- chizu_files.each {|ff| load_chizu_commands ff}
337
- dpa "chizu load complete, files below:", :yellow
338
- @chizu_array.each do |cc|
339
- dpa "- #{cc} -", :yellow
340
- dpa "commands: #{cc.associated_commands}", :yellow
351
+ search_dir = "#{base}/shared"
352
+ dpa "loading shared chizus ...", COLORS[:setup]
353
+ Find.find(search_dir) do |ff|
354
+ if ff.end_with? 'chizu'
355
+ dpa "loading #{ff}"
356
+ @chizu_files << ff
357
+ end
341
358
  end
342
359
  end
343
360
 
361
+ def process_chizu_files
362
+ @chizu_files.each {|ff| load_chizu_commands ff}
363
+ end
364
+
344
365
  def add_new_chizu(kkey, commands)
345
- @chizu_array << ChizuEntry.new(kkey, commands)
366
+ @chizus << ChizuEntry.new(kkey, commands)
346
367
  end
347
368
 
348
369
  def load_chizu_commands(ff)
370
+ dpa "loading chizu commands from file: #{ff}"
349
371
  File.open(ff) do |file|
350
372
  lines = file.readlines(chomp:true)
351
373
  kkey = ''
@@ -393,8 +415,7 @@ class FutoSpec
393
415
  elsif ll == "\n" || ll == ''
394
416
  next
395
417
  else
396
- breakpoint
397
- puts
418
+ pa "encountered unexpected line: #{ll}", :red, :bright
398
419
  end
399
420
  end
400
421
  end
@@ -415,16 +436,15 @@ class FutoSpec
415
436
  end
416
437
  end
417
438
 
418
- #def load_commands_into_test_cases_from_chizu
419
- def match_chizus_to_test_cases
420
- if @chizu_array.length == 0
439
+ def match_cases_to_chizus
440
+ if @chizus.length == 0
421
441
  set_all_unmatched
422
442
  else
423
443
  @cases.each_with_index do |test_case, tc_index|
424
444
  test_case.bullet_points.each do |bullet|
425
445
  dpa "matching bullet: #{bullet}", :bb
426
446
  matched = false
427
- @chizu_array.each do |chizu|
447
+ @chizus.each do |chizu|
428
448
  if process_bullet_chizu_match(bullet, chizu)
429
449
  bullet.associated_commands = chizu.associated_commands
430
450
  matched = true
@@ -434,7 +454,7 @@ class FutoSpec
434
454
  dpa "matched? #{bullet.label} : #{matched}", :bb
435
455
  if ! matched
436
456
  unless @unmatched.include? bullet.label
437
- dpa "couldn't find a match for #{bullet.label}", :red
457
+ dpa "couldn't find a match for #{bullet.label}", COLORS[:error]
438
458
  @unmatched << bullet.label
439
459
  end
440
460
  end
@@ -445,57 +465,85 @@ class FutoSpec
445
465
 
446
466
  def process_bullet_chizu_match(bullet, chizu)
447
467
  matched = false
448
- dpa "chizu: #{chizu.kkey}", :yellow
468
+ dpa "chizu: #{chizu.kkey}", COLORS[:init]
449
469
  if is_todo? chizu
450
- #logd "found todo: #{chizu}", :yellow
470
+ logd "found todo: #{chizu}", COLORS[:init]
451
471
  # todos aren't considered completed so they are unmatched
452
472
  elsif is_included_in? chizu
453
- #logd "found included_in: #{chizu}", :yellow
473
+ #logd "found included_in: #{chizu}", COLORS[:init]
454
474
  @included_ins << chizu
455
475
  else
456
476
  if bullet.label == chizu.kkey
457
- logd "matched: #{bullet.label} #{chizu.kkey}", :blue
458
477
  matched = true
459
478
  end
460
479
  end
461
480
  return matched
462
481
  end
463
482
 
464
- def output_unmatched_commands
465
- puts
466
- pa "Missing chizu entries:", :yellow
467
- puts
468
- @unmatched.each do |label|
469
- pa "On '#{label}' do", :yellow
470
- pa ' # TODO', :yellow
471
- pa 'end', :yellow
472
- puts
473
- end
474
- end
475
-
476
483
  def run
477
484
  exec_cases unless $dry_run
478
485
  output_unmatched_commands if @unmatched.length > 0
479
486
  end
480
487
 
488
+ def breakpoint_with_local_vars(local_vars)
489
+ bind = binding
490
+ bind.local_variable_set(:ish, '555')
491
+ eval('breakpoint; puts "ishly: #{ish}"', bind).binding
492
+ puts
493
+ end
494
+
495
+
481
496
  def run_commands_in_block_context(bullet)
497
+ local_vars = {}
482
498
  bullet.associated_commands.each do |cmd|
483
- pa cmd, :cyan if cmd != 'breakpoint'
484
499
  begin
485
- binding = eval(cmd, binding)
500
+ pa " #{cmd}", COLORS[:support] if cmd != 'breakpoint' # agb ignore
501
+ bind = binding
502
+ local_vars.each_pair do |kk, vv|
503
+ bind.local_variable_set(kk, vv)
504
+ end
505
+ unless cmd == 'breakpoint'
506
+ result = bind.eval(cmd)
507
+ else
508
+ c = BreakpointContext.new(bind)
509
+ c.contextual_breakpoint
510
+ end
511
+ dpa "result: #{result}"
512
+ if cmd.include? '='
513
+ new_var = cmd.split('=').first.rstrip
514
+ local_vars.store(new_var, result)
515
+ end
486
516
  rescue RSpec::Expectations::ExpectationNotMetError => e
487
- pa e, :red
517
+ pa e, COLORS[:error], :bright
518
+ raise e
488
519
  end
489
520
  end
490
521
  end
491
522
 
492
523
  def exec_cases
493
- puts
524
+ puts; puts
494
525
  @cases.each do |test_case|
495
- pa "case: #{test_case.description}", :gray
526
+ title = "case: #{test_case.description}"
527
+ pa "\u22EF" * ( title.length + 5 ), COLORS[:exec]
528
+ pa " case: #{test_case.description}", COLORS[:exec], :bright
529
+ puts
496
530
  test_case.bullet_points.each do |bullet|
531
+ pa "\u229A #{bullet}", COLORS[:exec]
497
532
  run_commands_in_block_context(bullet)
498
533
  end
499
534
  end
535
+ puts; puts; puts
536
+ end
537
+
538
+ def output_unmatched_commands
539
+ puts
540
+ pa "Missing chizu entries:", COLORS[:missing], :bright
541
+ puts
542
+ @unmatched.each do |label|
543
+ pa "On '#{label}' do", COLORS[:missing]
544
+ pa ' # TODO', COLORS[:missing]
545
+ pa 'end', COLORS[:missing]
546
+ puts
547
+ end
500
548
  end
501
549
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: futo-spec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.99.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Felipe Wolfe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-21 00:00:00.000000000 Z
11
+ date: 2021-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: paint
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: whirly
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 0.3.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 0.3.0
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rspec
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -59,7 +73,7 @@ dependencies:
59
73
  - - "~>"
60
74
  - !ruby/object:Gem::Version
61
75
  version: '11.1'
62
- type: :development
76
+ type: :runtime
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
@@ -75,10 +89,8 @@ extensions: []
75
89
  extra_rdoc_files: []
76
90
  files:
77
91
  - bin/futo
78
- - lib/exec_block_context.rb
92
+ - lib/context_breakpoint.rb
79
93
  - lib/futo-spec.rb
80
- - lib/futo-spec/futo_logger.rb
81
- - lib/futo-spec/self-test/futo/_glue/mocks/basics.setup.rb
82
94
  - lib/markdown_generator.rb
83
95
  homepage: https://rubygems.org/gems/futo-spec
84
96
  licenses:
@@ -1,6 +0,0 @@
1
- class BlockContext
2
- attr_accessor :vars
3
- def initialize
4
- @vars = []
5
- end
6
- end
@@ -1,13 +0,0 @@
1
- require 'paint/pa'
2
-
3
- def logd(msg, color=nil)
4
- if ENV.has_key? 'DEBUG'
5
- if ENV.fetch('DEBUG') == 'true'
6
- unless color
7
- puts msg
8
- else
9
- pa msg, color
10
- end
11
- end
12
- end
13
- end
@@ -1,2 +0,0 @@
1
- $foo = 'bar'
2
- BAZ = 'ish'