markdown_exec 3.0.6 → 3.0.7
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/command_result.rb +11 -50
- data/lib/fcb.rb +1 -1
- data/lib/hash_delegator.rb +5 -2
- 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: dbc7513dd9f277050aee99dd0c2eb7d047a43d75ae763510131b150a678648f9
|
4
|
+
data.tar.gz: 1f8805e038d7a355bf3f68b47e066e30b4f1f75a269b907bfe8e55f83a9b9989
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edb200a3b6c6edcb4ab1bb942cfe7f27f3fb5604d7a2ffa449f2b2bb3492f0ee0864226e1202a2269fbc731e09f5fc29da001ab22229edc81e8754d51ae486cd
|
7
|
+
data.tar.gz: 19bb30ed25a401d3ee94826ae82c9f02836f7b51493ab88b3197a6a5c2826d7d5f0580653a0f15a07ac43a97501be8387ec86e37f4aafb87b9d7530a89514a70
|
data/Gemfile.lock
CHANGED
data/lib/command_result.rb
CHANGED
@@ -14,45 +14,6 @@
|
|
14
14
|
# result.new_field = 42
|
15
15
|
# result.new_field # => 42
|
16
16
|
# result.success? # => true
|
17
|
-
|
18
|
-
# require 'ostruct'
|
19
|
-
|
20
|
-
# class CommandResult < OpenStruct
|
21
|
-
# def initialize(**attributes)
|
22
|
-
# # Set defaults
|
23
|
-
# defaults = { exit_status: 0, stdout: '' }
|
24
|
-
# super(defaults.merge(attributes))
|
25
|
-
# end
|
26
|
-
|
27
|
-
# def failure?
|
28
|
-
# !success?
|
29
|
-
# end
|
30
|
-
|
31
|
-
# def success?
|
32
|
-
# exit_status.zero?
|
33
|
-
# end
|
34
|
-
|
35
|
-
# # intercept specific getters and setters
|
36
|
-
# def new_lines
|
37
|
-
# # read current value
|
38
|
-
# # binding.irb
|
39
|
-
# v = self[:new_lines]
|
40
|
-
# ww caller.deref[0..4], v
|
41
|
-
# v
|
42
|
-
# end
|
43
|
-
|
44
|
-
# # Intercept specific setter
|
45
|
-
# def new_lines=(value)
|
46
|
-
# ww caller.deref[0..4], value
|
47
|
-
# # binding.irb
|
48
|
-
# super(value)
|
49
|
-
# end
|
50
|
-
# end
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
17
|
class CommandResult
|
57
18
|
# @param attributes [Hash{Symbol=>Object}] initial named attributes
|
58
19
|
def initialize(**attributes)
|
@@ -71,17 +32,17 @@ class CommandResult
|
|
71
32
|
exit_status.zero?
|
72
33
|
end
|
73
34
|
|
74
|
-
def new_lines
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
end
|
79
|
-
|
80
|
-
# trap assignment to new_lines
|
81
|
-
def new_lines=(value)
|
82
|
-
|
83
|
-
|
84
|
-
end
|
35
|
+
# def new_lines
|
36
|
+
# value = @attributes[:new_lines]
|
37
|
+
# ww caller.deref[0..4], value
|
38
|
+
# value
|
39
|
+
# end
|
40
|
+
|
41
|
+
# # trap assignment to new_lines
|
42
|
+
# def new_lines=(value)
|
43
|
+
# ww caller.deref[0..4], value
|
44
|
+
# @attributes[:new_lines] = value
|
45
|
+
# end
|
85
46
|
|
86
47
|
def method_missing(name, *args)
|
87
48
|
key = name.to_s.chomp('=').to_sym
|
data/lib/fcb.rb
CHANGED
data/lib/hash_delegator.rb
CHANGED
@@ -1187,6 +1187,9 @@ module MarkdownExec
|
|
1187
1187
|
end
|
1188
1188
|
|
1189
1189
|
ret_command_result || CommandResult.new(stdout: required_lines)
|
1190
|
+
rescue StandardError
|
1191
|
+
ww $@, $!
|
1192
|
+
HashDelegator.error_handler('code_from_ux_block_to_set_environment_variables')
|
1190
1193
|
end
|
1191
1194
|
|
1192
1195
|
def env_set(name, value)
|
@@ -2602,7 +2605,7 @@ module MarkdownExec
|
|
2602
2605
|
exportable = true
|
2603
2606
|
command_result = nil
|
2604
2607
|
new_lines = []
|
2605
|
-
export_string = string
|
2608
|
+
export_string = string.nil? ? export.echo : string
|
2606
2609
|
case export_string
|
2607
2610
|
when String, Integer, Float, TrueClass, FalseClass
|
2608
2611
|
command_result, = output_from_adhoc_bash_script_file(
|
@@ -2994,7 +2997,7 @@ module MarkdownExec
|
|
2994
2997
|
# convert single items to arrays
|
2995
2998
|
def join_array_of_arrays(*args)
|
2996
2999
|
args.map do |item|
|
2997
|
-
item.is_a?(Array) ? item : [item]
|
3000
|
+
item.nil? ? nil : (item.is_a?(Array) ? item : [item])
|
2998
3001
|
end.compact.flatten(1)
|
2999
3002
|
end
|
3000
3003
|
|
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.7
|
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-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clipboard
|