yamlscript 0.1.62 → 0.1.65
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +12 -0
- data/Makefile +5 -0
- data/ReadMe.md +8 -5
- data/doc/authors.md +2 -0
- data/doc/readme.md +60 -0
- data/lib/yamlscript/version.rb +1 -1
- data/lib/yamlscript.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d7bf29855335f3bcf402174261766965ed5fe973d8ae146f61309e67b122a62
|
4
|
+
data.tar.gz: d1823f514603647e7572ba71d7ad43f4f4828a7d9af158ba85fe350a6d85ddbf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2e6f2ef909d2d2041d1f2e82815d1cb7225ae2c81c92bbbf36df2c74229197dcfc83c8fa94903b5d5c6a2724391f3efb4e4c9571b2db837944d1d8c10ca711d
|
7
|
+
data.tar.gz: 8e581fa11f646d6f56dbac7cab3f2556e660796318e863226ef880925ad1f56648d3f6d12214d7836a11ff37ca8d86cb082ef3f4af92dfa44c9777076b6690ba
|
data/ChangeLog.md
CHANGED
data/Makefile
CHANGED
data/ReadMe.md
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
<!-- DO NOT EDIT — THIS FILE WAS GENERATED -->
|
2
|
+
|
1
3
|
YAMLScript
|
2
4
|
==========
|
3
5
|
|
@@ -20,13 +22,13 @@ YAMLScript is a functional programming language with a stylized YAML syntax.
|
|
20
22
|
|
21
23
|
YAMLScript can be used for:
|
22
24
|
|
25
|
+
* Enhancing ordinary YAML files with functional operations
|
26
|
+
* Import parts of other YAML files to any node
|
27
|
+
* String interpolation including function calls
|
28
|
+
* Data transforms including ones defined by you
|
23
29
|
* Writing new programs and applications
|
24
30
|
* Run with `ys file.ys`
|
25
31
|
* Or compile to binary executable with `ys -C file.ys`
|
26
|
-
* Enhancing ordinary YAML files with new functional magics
|
27
|
-
* Import parts of other YAML files to any node
|
28
|
-
* String interpolation including function calls
|
29
|
-
* Any other functionality you can dream up!
|
30
32
|
* Writing reusable shared libraries
|
31
33
|
* High level code instead of C
|
32
34
|
* Bindable to almost any programming language
|
@@ -47,7 +49,7 @@ YAMLScript is compiled to a native shared library (`libyamlscript.so`) that can
|
|
47
49
|
be used by any programming language that can load shared libraries.
|
48
50
|
|
49
51
|
To see the Clojure code that YAMLScript compiles to, you can use the YAMLScript
|
50
|
-
|
52
|
+
CLI binary, `ys`, to run:
|
51
53
|
|
52
54
|
```text
|
53
55
|
$ ys --compile file.ys
|
@@ -127,6 +129,7 @@ See https://github.com/yaml/yamlscript?#installing-yamlscript for more info.
|
|
127
129
|
|
128
130
|
## Authors
|
129
131
|
|
132
|
+
|
130
133
|
* [Ingy döt Net](https://github.com/ingydotnet)
|
131
134
|
* [Delon R.Newman](https://github.com/delonnewman)
|
132
135
|
|
data/doc/authors.md
ADDED
data/doc/readme.md
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
## Ruby Usage
|
2
|
+
|
3
|
+
File `prog.rb`:
|
4
|
+
|
5
|
+
```ruby
|
6
|
+
require 'yamlscript'
|
7
|
+
input = IO.read('file.ys')
|
8
|
+
ys = YAMLScript.new
|
9
|
+
data = ys.load(input)
|
10
|
+
puts data
|
11
|
+
```
|
12
|
+
|
13
|
+
File `file.ys`:
|
14
|
+
|
15
|
+
```yaml
|
16
|
+
!yamlscript/v0
|
17
|
+
|
18
|
+
name =: "World"
|
19
|
+
|
20
|
+
=>::
|
21
|
+
foo: [1, 2, ! inc(41)]
|
22
|
+
bar:: load("other.yaml")
|
23
|
+
baz:: "Hello, $name!"
|
24
|
+
```
|
25
|
+
|
26
|
+
File `other.yaml`:
|
27
|
+
|
28
|
+
```yaml
|
29
|
+
oh: Hello
|
30
|
+
```
|
31
|
+
|
32
|
+
Run:
|
33
|
+
|
34
|
+
```text
|
35
|
+
$ ruby prog.rb
|
36
|
+
{"foo"=>[1, 2, 42], "bar"=>{"oh"=>"Hello"}, "baz"=>"Hello, World!"}
|
37
|
+
```
|
38
|
+
|
39
|
+
|
40
|
+
## Installation
|
41
|
+
|
42
|
+
You can install this module like any other Ruby module:
|
43
|
+
|
44
|
+
```bash
|
45
|
+
$ gem install yamlscript
|
46
|
+
```
|
47
|
+
|
48
|
+
but you will need to have a system install of `libyamlscript.so`.
|
49
|
+
|
50
|
+
One simple way to do that is with:
|
51
|
+
|
52
|
+
```bash
|
53
|
+
$ curl https://yamlscript.org/install | bash
|
54
|
+
```
|
55
|
+
|
56
|
+
> Note: The above command will install the latest version of the YAMLScript
|
57
|
+
command line utility, `ys`, and the shared library, `libyamlscript.so`, into
|
58
|
+
`~/local/bin` and `~/.local/lib` respectively.
|
59
|
+
|
60
|
+
See https://github.com/yaml/yamlscript?#installing-yamlscript 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.65'
|
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.65
|
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-06
|
12
|
+
date: 2024-07-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: minitest
|
@@ -39,6 +39,8 @@ files:
|
|
39
39
|
- Makefile
|
40
40
|
- Rakefile
|
41
41
|
- ReadMe.md
|
42
|
+
- doc/authors.md
|
43
|
+
- doc/readme.md
|
42
44
|
- lib/yamlscript.rb
|
43
45
|
- lib/yamlscript/version.rb
|
44
46
|
- yamlscript.gemspec
|