yamlscript 0.1.95 → 0.1.96
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/ReadMe.md +11 -12
- data/doc/readme.md +3 -3
- data/lib/yamlscript/version.rb +1 -1
- data/lib/yamlscript.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: 0dea9d6a7c3f6e42f2a9589e165765dc8f2a64d1490ddd3d21ee8cd64665e7be
|
4
|
+
data.tar.gz: 7c813e4624fb1398062890fcddcfbfaef8a28d957136ad35bf4e57a82c1368b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afd76337e102749386bd3db08d5447e726b7589f4b33ffc73ccb4b441416e88bb8b7f15cc0107024b4544c4129abacbf21c7aa6162dc487b7083220ca37cfcc7
|
7
|
+
data.tar.gz: 92f5684b6c5c000f6e7c38b1c05e11b4220e2345aa3f8d5877d3f514e419b8879e6e0ea8bdf7fb03c540a73f7ab4874cd88bafeaf3c4140fab9b0d8d8e9a8888
|
data/ChangeLog.md
CHANGED
data/ReadMe.md
CHANGED
@@ -17,15 +17,14 @@ names-url =:
|
|
17
17
|
"https://raw.githubusercontent.com/dominictarr/\
|
18
18
|
random-name/master/first-names.json"
|
19
19
|
|
20
|
-
name-list =:
|
20
|
+
name-list =: names-url:curl:json/load
|
21
21
|
|
22
22
|
# Data object with literal keys and generated values:
|
23
|
-
name::
|
24
|
-
aka:: name-list
|
23
|
+
name:: iname-list:shuffle:first
|
24
|
+
aka:: name-list:rand-nth
|
25
25
|
age:: &num 2 * 3 * 7
|
26
|
-
color:: &hue
|
27
|
-
|
28
|
-
.first()
|
26
|
+
color:: &hue
|
27
|
+
rand-nth: qw(red green blue yellow)
|
29
28
|
title:: "$(*num) shades of $(*hue)."
|
30
29
|
```
|
31
30
|
|
@@ -74,12 +73,12 @@ CLI binary `ys` to run:
|
|
74
73
|
$ ys --compile file.ys
|
75
74
|
(let
|
76
75
|
[names-url "https://raw.githubusercontent.com/dominictarr/random-name/master/first-names.json"
|
77
|
-
name-list (
|
76
|
+
name-list (json/load (curl names-url))]
|
78
77
|
(%
|
79
|
-
"name" (
|
78
|
+
"name" (first (shuffle name-list))
|
80
79
|
"aka" (rand-nth name-list)
|
81
80
|
"age" (_& 'num (mul+ 2 3 7))
|
82
|
-
"color" (_& 'hue (
|
81
|
+
"color" (_& 'hue (rand-nth (qw red green blue yellow)))
|
83
82
|
"title" (str (_** 'num) " shades of " (_** 'hue) ".")))
|
84
83
|
```
|
85
84
|
|
@@ -126,7 +125,7 @@ $ ruby prog.rb
|
|
126
125
|
You can install this module like any other Ruby module:
|
127
126
|
|
128
127
|
```bash
|
129
|
-
|
128
|
+
gem install yamlscript
|
130
129
|
```
|
131
130
|
|
132
131
|
but you will need to have a system install of `libyamlscript.so`.
|
@@ -134,14 +133,14 @@ but you will need to have a system install of `libyamlscript.so`.
|
|
134
133
|
One simple way to do that is with:
|
135
134
|
|
136
135
|
```bash
|
137
|
-
|
136
|
+
curl https://yamlscript.org/install | bash
|
138
137
|
```
|
139
138
|
|
140
139
|
> Note: The above command will install the latest version of the YAMLScript
|
141
140
|
command line utility, `ys`, and the shared library, `libyamlscript.so`, into
|
142
141
|
`~/local/bin` and `~/.local/lib` respectively.
|
143
142
|
|
144
|
-
See https://
|
143
|
+
See <https://yamlscript.org/doc/install/> for more info.
|
145
144
|
|
146
145
|
## See Also
|
147
146
|
|
data/doc/readme.md
CHANGED
@@ -41,7 +41,7 @@ $ ruby prog.rb
|
|
41
41
|
You can install this module like any other Ruby module:
|
42
42
|
|
43
43
|
```bash
|
44
|
-
|
44
|
+
gem install yamlscript
|
45
45
|
```
|
46
46
|
|
47
47
|
but you will need to have a system install of `libyamlscript.so`.
|
@@ -49,11 +49,11 @@ but you will need to have a system install of `libyamlscript.so`.
|
|
49
49
|
One simple way to do that is with:
|
50
50
|
|
51
51
|
```bash
|
52
|
-
|
52
|
+
curl https://yamlscript.org/install | bash
|
53
53
|
```
|
54
54
|
|
55
55
|
> Note: The above command will install the latest version of the YAMLScript
|
56
56
|
command line utility, `ys`, and the shared library, `libyamlscript.so`, into
|
57
57
|
`~/local/bin` and `~/.local/lib` respectively.
|
58
58
|
|
59
|
-
See https://
|
59
|
+
See <https://yamlscript.org/doc/install/> for more info.
|
data/lib/yamlscript/version.rb
CHANGED
data/lib/yamlscript.rb
CHANGED
@@ -16,7 +16,7 @@ class YAMLScript
|
|
16
16
|
# This value is automatically updated by 'make bump'.
|
17
17
|
# The version number is used to find the correct shared library file.
|
18
18
|
# We currently only support binding to an exact version of libyamlscript.
|
19
|
-
YAMLSCRIPT_VERSION = '0.1.
|
19
|
+
YAMLSCRIPT_VERSION = '0.1.96'
|
20
20
|
|
21
21
|
# A low-level interface to the native library
|
22
22
|
module LibYAMLScript
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yamlscript
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.96
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ingy döt Net
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2025-
|
12
|
+
date: 2025-04-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: minitest
|