markdown_exec 3.0.7 → 3.0.8
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/evaluate_shell_expressions.rb +5 -0
- data/lib/hash_delegator.rb +29 -7
- data/lib/markdown_exec/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd2355b28f935804fb135a650cc4260276be2bed20a8ed33cf9d188e01734466
|
4
|
+
data.tar.gz: 9e001b6252ebc4f012408e8a43373ab49b474d72982fc9bbc653c93e6d39c497
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a17c1e662569ae1b0f34ecbb63571120c3d56bc2efdde29651240ec6d6d07e0f24e361ae9c95d34725f5c9f6a1c2d6f18fc9aad9971bdba3e2b2f850f14418d5
|
7
|
+
data.tar.gz: 95184776dfde2e6579aa18e0893a9f54180c2b641d65263f0d47f5533512611f3b92c9012959bb18c0c263ca3f50dccc42e4f69651f46a4af878d02784ce40ba
|
data/Gemfile.lock
CHANGED
@@ -45,6 +45,11 @@ def evaluate_shell_expressions(initial_code, expressions, shell: '/bin/bash',
|
|
45
45
|
end
|
46
46
|
|
47
47
|
result_hash
|
48
|
+
|
49
|
+
rescue StandardError
|
50
|
+
ww $@, $!, caller.deref
|
51
|
+
ww initial_code, expressions
|
52
|
+
raise StandardError, $!
|
48
53
|
end
|
49
54
|
|
50
55
|
return if $PROGRAM_NAME != __FILE__
|
data/lib/hash_delegator.rb
CHANGED
@@ -994,6 +994,9 @@ module MarkdownExec
|
|
994
994
|
initial_code_required: false,
|
995
995
|
occurrence_expressions: nil
|
996
996
|
)
|
997
|
+
ww commands
|
998
|
+
ww link_state
|
999
|
+
# binding.irb####
|
997
1000
|
evaluate_shell_expressions(
|
998
1001
|
(link_state&.inherited_lines_block || ''),
|
999
1002
|
commands,
|
@@ -1110,9 +1113,11 @@ module MarkdownExec
|
|
1110
1113
|
selected, mdoc, inherited_code: nil, force: true, only_default: false,
|
1111
1114
|
silent:
|
1112
1115
|
)
|
1116
|
+
ww selected
|
1113
1117
|
ret_command_result = nil
|
1114
1118
|
exit_prompt = @delegate_object[:prompt_filespec_back]
|
1115
1119
|
|
1120
|
+
ww \
|
1116
1121
|
required = mdoc.collect_recursively_required_code(
|
1117
1122
|
anyname: selected.pub_name,
|
1118
1123
|
label_format_above: @delegate_object[:shell_code_label_format_above],
|
@@ -2535,6 +2540,7 @@ module MarkdownExec
|
|
2535
2540
|
end
|
2536
2541
|
|
2537
2542
|
def expand_references!(fcb, link_state)
|
2543
|
+
ww fcb, link_state, caller.deref
|
2538
2544
|
expand_variable_references!(
|
2539
2545
|
blocks: [fcb],
|
2540
2546
|
echo_formatter: method(:format_echo_command),
|
@@ -2577,15 +2583,22 @@ module MarkdownExec
|
|
2577
2583
|
link_state:,
|
2578
2584
|
pattern:
|
2579
2585
|
)
|
2586
|
+
ww blocks####
|
2587
|
+
ww link_state
|
2588
|
+
# binding.irb
|
2580
2589
|
variable_counts, occurrence_expressions = count_named_group_occurrences(
|
2581
2590
|
blocks, pattern, group_name: group_name
|
2582
2591
|
)
|
2583
2592
|
return if variable_counts.nil? || variable_counts == {}
|
2593
|
+
ww [variable_counts, occurrence_expressions]
|
2584
2594
|
|
2595
|
+
ww \
|
2585
2596
|
echo_commands = generate_echo_commands(
|
2586
2597
|
variable_counts, formatter: echo_formatter
|
2587
2598
|
)
|
2588
2599
|
|
2600
|
+
ww link_state
|
2601
|
+
ww \
|
2589
2602
|
replacements = build_replacement_dictionary(
|
2590
2603
|
echo_commands, link_state,
|
2591
2604
|
initial_code_required: initial_code_required,
|
@@ -2593,8 +2606,13 @@ module MarkdownExec
|
|
2593
2606
|
)
|
2594
2607
|
|
2595
2608
|
return if replacements.nil?
|
2596
|
-
|
2609
|
+
if replacements == EvaluateShellExpression::StatusFail
|
2610
|
+
# happens on first processing of blocks before requirements are met
|
2611
|
+
ww "EvaluateShellExpression::StatusFail", echo_commands, link_state
|
2612
|
+
return
|
2613
|
+
end
|
2597
2614
|
|
2615
|
+
ww \
|
2598
2616
|
expand_blocks_with_replacements(blocks, replacements)
|
2599
2617
|
# no return
|
2600
2618
|
end
|
@@ -2608,7 +2626,7 @@ module MarkdownExec
|
|
2608
2626
|
export_string = string.nil? ? export.echo : string
|
2609
2627
|
case export_string
|
2610
2628
|
when String, Integer, Float, TrueClass, FalseClass
|
2611
|
-
command_result, = output_from_adhoc_bash_script_file(
|
2629
|
+
command_result, exportable, new_lines = output_from_adhoc_bash_script_file(
|
2612
2630
|
join_array_of_arrays(
|
2613
2631
|
bash_script_lines,
|
2614
2632
|
%(printf '%s' "#{export_string}")
|
@@ -4749,8 +4767,9 @@ module MarkdownExec
|
|
4749
4767
|
command_result = CommandResult.new(stdout: output)
|
4750
4768
|
|
4751
4769
|
when :exec, UxActSource::EXEC
|
4752
|
-
command_result, = output_from_adhoc_bash_script_file(
|
4753
|
-
join_array_of_arrays(bash_script_lines, export.exec)
|
4770
|
+
command_result, exportable, new_lines = output_from_adhoc_bash_script_file(
|
4771
|
+
join_array_of_arrays(bash_script_lines, export.exec),
|
4772
|
+
export
|
4754
4773
|
)
|
4755
4774
|
|
4756
4775
|
else
|
@@ -4795,7 +4814,8 @@ module MarkdownExec
|
|
4795
4814
|
join_array_of_arrays(
|
4796
4815
|
bash_script_lines,
|
4797
4816
|
%(printf '%s' "#{export.echo}")
|
4798
|
-
)
|
4817
|
+
),
|
4818
|
+
export
|
4799
4819
|
)
|
4800
4820
|
export_init = cr_echo.stdout.split("\n").first
|
4801
4821
|
command_result, exportable, new_lines = export_echo_with_code(
|
@@ -4808,8 +4828,9 @@ module MarkdownExec
|
|
4808
4828
|
|
4809
4829
|
when :exec, ExportValueSource::EXEC
|
4810
4830
|
# extract first line from 'exec' output
|
4811
|
-
command_result, = output_from_adhoc_bash_script_file(
|
4812
|
-
join_array_of_arrays(bash_script_lines, export.exec)
|
4831
|
+
command_result, exportable, new_lines = output_from_adhoc_bash_script_file(
|
4832
|
+
join_array_of_arrays(bash_script_lines, export.exec),
|
4833
|
+
export
|
4813
4834
|
)
|
4814
4835
|
unless command_result.failure?
|
4815
4836
|
export_init = command_result.stdout.split("\n").first
|
@@ -5316,6 +5337,7 @@ module MarkdownExec
|
|
5316
5337
|
mdoc_menu_and_blocks_from_nested_files(
|
5317
5338
|
@dml_link_state, source_id: source_id
|
5318
5339
|
)
|
5340
|
+
ww @dml_link_state####
|
5319
5341
|
dump_delobj(@dml_blocks_in_file, @dml_menu_blocks, @dml_link_state)
|
5320
5342
|
end
|
5321
5343
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: markdown_exec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fareed Stevenson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-06-
|
11
|
+
date: 2025-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clipboard
|