markdown-run 0.1.2 → 0.1.3
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/CHANGELOG.md +4 -0
- data/exe/markdown-run +3 -5
- data/lib/markdown/run/version.rb +1 -1
- data/markdown-run-sample.md +49 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d88163df8a4b5204c0cdd4f4d4b236d6bf67ab1515df8ba799ec760ee49838a
|
4
|
+
data.tar.gz: e1cf3aa3edd95f6d3d0f818bd58645859043954a9a5eeffda46f453e5beed351
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8de05f11aaf161c9ba30c6de2d28d4ce1a3e2a917e452ce485380523b6c34be4c4d337e764c5bbf9ee160d6559395a6930827615b0c5be4c94707df8b6f4540
|
7
|
+
data.tar.gz: 37c23d79f0ea057781bba56b1740b11dad46a95515cafa05aa3222082d0449ae77e7e4d80301c3e1c53e8b90fdb93a4534484656250a7755dcb92fbb9d26082a
|
data/CHANGELOG.md
CHANGED
data/exe/markdown-run
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
require "tempfile"
|
4
4
|
require "open3"
|
5
5
|
require "fileutils"
|
6
|
+
require "minitest/spec"
|
6
7
|
|
7
8
|
# --- Language Execution Configuration ---
|
8
9
|
JS_CONFIG = {
|
@@ -30,8 +31,7 @@ SUPPORTED_LANGUAGES = {
|
|
30
31
|
command: ->(code_content, _temp_file_path) {
|
31
32
|
psql_exists = system("command -v psql > /dev/null 2>&1")
|
32
33
|
unless psql_exists
|
33
|
-
|
34
|
-
exit 1 # Abort the script
|
34
|
+
abort "Error: psql command not found. Please install PostgreSQL or ensure psql is in your PATH."
|
35
35
|
end
|
36
36
|
[ "psql -A -t -X", { stdin_data: code_content } ]
|
37
37
|
}
|
@@ -40,8 +40,7 @@ SUPPORTED_LANGUAGES = {
|
|
40
40
|
command: ->(_code_content, temp_file_path) {
|
41
41
|
xmpfilter_exists = system("command -v xmpfilter > /dev/null 2>&1")
|
42
42
|
unless xmpfilter_exists
|
43
|
-
|
44
|
-
exit 1 # Abort the script
|
43
|
+
abort "Error: xmpfilter command not found. Please install xmpfilter or ensure it is in your PATH."
|
45
44
|
end
|
46
45
|
[ "xmpfilter #{temp_file_path}", {} ]
|
47
46
|
},
|
@@ -67,7 +66,6 @@ if ARGV.empty?
|
|
67
66
|
end
|
68
67
|
|
69
68
|
puts "Running tests..."
|
70
|
-
require "minitest/spec"
|
71
69
|
require "minitest/autorun"
|
72
70
|
end
|
73
71
|
|
data/lib/markdown/run/version.rb
CHANGED
@@ -0,0 +1,49 @@
|
|
1
|
+
This is an example markdown file
|
2
|
+
|
3
|
+
The following psql code block should be executed
|
4
|
+
And the result should be shown in a following codeblock
|
5
|
+
|
6
|
+
```ruby
|
7
|
+
p "foo"
|
8
|
+
```
|
9
|
+
|
10
|
+
```js
|
11
|
+
1 + 2;
|
12
|
+
console.log(3);
|
13
|
+
```
|
14
|
+
|
15
|
+
```RESULT
|
16
|
+
3
|
17
|
+
```
|
18
|
+
|
19
|
+
```psql
|
20
|
+
\d
|
21
|
+
```
|
22
|
+
|
23
|
+
```RESULT
|
24
|
+
public|ar_internal_metadata|table|aurelienbottazini
|
25
|
+
public|schema_migrations|table|aurelienbottazini
|
26
|
+
```
|
27
|
+
|
28
|
+
```sqlite3
|
29
|
+
.stats
|
30
|
+
```
|
31
|
+
|
32
|
+
```RESULT
|
33
|
+
Memory Used: 147824 (max 147888) bytes
|
34
|
+
Number of Outstanding Allocations: 169 (max 170)
|
35
|
+
Number of Pcache Overflow Bytes: 4608 (max 4608) bytes
|
36
|
+
Largest Allocation: 122400 bytes
|
37
|
+
Largest Pcache Allocation: 4104 bytes
|
38
|
+
Lookaside Slots Used: 34 (max 34)
|
39
|
+
Successful lookaside attempts: 34
|
40
|
+
Lookaside failures due to size: 0
|
41
|
+
Lookaside failures due to OOM: 0
|
42
|
+
Pager Heap Usage: 5632 bytes
|
43
|
+
Page cache hits: 0
|
44
|
+
Page cache misses: 0
|
45
|
+
Page cache writes: 0
|
46
|
+
Page cache spills: 0
|
47
|
+
Schema Heap Usage: 0 bytes
|
48
|
+
Statement Heap/Lookaside Usage: 0 bytes
|
49
|
+
```
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: markdown-run
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aurélien Bottazini
|
@@ -40,6 +40,7 @@ files:
|
|
40
40
|
- README.md
|
41
41
|
- exe/markdown-run
|
42
42
|
- lib/markdown/run/version.rb
|
43
|
+
- markdown-run-sample.md
|
43
44
|
homepage: https://rubygems.org/gems/markdown-run
|
44
45
|
licenses:
|
45
46
|
- MIT
|