yamlscript 0.1.81 → 0.1.83
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +8 -0
- data/ReadMe.md +13 -14
- 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: 7728adc8eb6e10850409159e21f4b73d7d1a3ebeaa628934426e4178be5388cd
|
4
|
+
data.tar.gz: d47fb0e776fc4ff1499c026a5cd2daa14f8076e5093a74f621903d972d1ffe65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5131fd57e911f2e80be81c3cbb7a030c8be8db8f3e8d52546e3d81fc8052ed461a21012bb52a21ce123125e48624b074628781edce8e2ce46bfb12d870273f2
|
7
|
+
data.tar.gz: f7d5779aa7e671bd5b70fe393b3559af9346b965c32223cfc6fe6bc8060998c9d11f182c20abee3c39ad38e3b39f889749e875fb0eb312bb4a614154757adf9e
|
data/ChangeLog.md
CHANGED
data/ReadMe.md
CHANGED
@@ -13,12 +13,11 @@ Load `file.yaml` with YAMLScript:
|
|
13
13
|
!yamlscript/v0/
|
14
14
|
|
15
15
|
# Get data from external sources:
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
"random-name/master/first-names.json"
|
16
|
+
names-url =:
|
17
|
+
"https://raw.githubusercontent.com/dominictarr/\
|
18
|
+
random-name/master/first-names.json"
|
20
19
|
|
21
|
-
|
20
|
+
name-list =: &first-names json/load(curl(names-url))
|
22
21
|
|
23
22
|
# Data object with literal keys and generated values:
|
24
23
|
name:: rand-nth(*first-names)
|
@@ -75,15 +74,15 @@ CLI binary `ys` to run:
|
|
75
74
|
|
76
75
|
```text
|
77
76
|
$ ys --compile file.ys
|
78
|
-
(
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
77
|
+
(let
|
78
|
+
[names-url "https://raw.githubusercontent.com/dominictarr/random-name/master/first-names.json"
|
79
|
+
name-list (_& 'first-names (json/load (curl names-url)))]
|
80
|
+
(%
|
81
|
+
"name" (rand-nth (_** 'first-names))
|
82
|
+
"aka" (rand-nth name-list)
|
83
|
+
"age" (_& 'num (mul+ 2 3 7))
|
84
|
+
"color" (_& 'hue (first (shuffle (qw red green blue yellow))))
|
85
|
+
"title" (str (_** 'num) " shades of " (_** 'hue) ".")))
|
87
86
|
```
|
88
87
|
|
89
88
|
|
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.83'
|
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.83
|
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: 2024-11-
|
12
|
+
date: 2024-11-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: minitest
|