palletjack 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/README.md +11 -6
- data/lib/palletjack.rb +6 -2
- data/lib/palletjack/pallet.rb +1 -2
- data/lib/palletjack/version.rb +1 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa38de4b29c6cceadd2fecc3e88e74f041eccfef
|
4
|
+
data.tar.gz: 1532f5e70753e10d7cd08497426ca23d5384de21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3b79c7b5762b97e7ab13c1149f087e7e0267fa5af90fcd19a6511948cafa2651f237989da3c9f1a16c50a32d78c5b91c564239bb94e7c26f5981ad66fd1ddc5
|
7
|
+
data.tar.gz: 0d74674d2e2394365658cb8ac8a005ab52e877c651cf6ed5f34b38d8f5db5c989ce1c3f6a73088a1e397177131a5f146ac76f1d027bb95c432509179d4b68562
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/README.md
CHANGED
@@ -4,8 +4,10 @@ the power of a Posix file system to store yaml serialized key-value trees.
|
|
4
4
|
|
5
5
|
A database is created from a warehouse (directory) of different kinds
|
6
6
|
(directory) of pallets (directory), each containing boxes (yaml files)
|
7
|
-
with keys. Pallets can
|
8
|
-
|
7
|
+
with keys. Pallets can contain other pallets, recursively, to form
|
8
|
+
hierarchical inheritance. Pallets can also contain references to other
|
9
|
+
pallets (symlinks) out of hierarchy, to build a Directed Acyclic Graph
|
10
|
+
of key-value search nodes.
|
9
11
|
|
10
12
|
The entire structure is indended to live beside configuration management
|
11
13
|
code and data in a version control system repository, to enable tagged
|
@@ -82,10 +84,13 @@ warehouse
|
|
82
84
|
│ ├── identity.yaml
|
83
85
|
│ └── location.yaml
|
84
86
|
├── service
|
85
|
-
│ ├── dhcp-server
|
86
|
-
│ │
|
87
|
-
│ └──
|
88
|
-
│ └──
|
87
|
+
│ ├── dhcp-server
|
88
|
+
│ │ ├── kea.yaml
|
89
|
+
│ │ └── example-com
|
90
|
+
│ │ └── kea.yaml
|
91
|
+
│ └── dns-resolver
|
92
|
+
│ └── example-com
|
93
|
+
│ └── unbound.yaml
|
89
94
|
├── system
|
90
95
|
│ ├── testvm
|
91
96
|
│ │ ├── architecture.yaml
|
data/lib/palletjack.rb
CHANGED
@@ -7,8 +7,6 @@ require 'palletjack/pallet'
|
|
7
7
|
|
8
8
|
class PalletJack < KVDAG
|
9
9
|
attr_reader :warehouse
|
10
|
-
attr_reader :keytrans_reader
|
11
|
-
attr_reader :keytrans_writer
|
12
10
|
|
13
11
|
# Create and load a PalletJack warehouse, and all its pallets
|
14
12
|
|
@@ -39,6 +37,12 @@ class PalletJack < KVDAG
|
|
39
37
|
pallet(kind, pallet)
|
40
38
|
end
|
41
39
|
end
|
40
|
+
|
41
|
+
# Apply transforms in reverse DAG order, parents before children
|
42
|
+
sort.reverse.each do |pallet|
|
43
|
+
@keytrans_writer.transform! pallet
|
44
|
+
end
|
45
|
+
|
42
46
|
self
|
43
47
|
end
|
44
48
|
|
data/lib/palletjack/pallet.rb
CHANGED
@@ -48,11 +48,10 @@ class PalletJack < KVDAG
|
|
48
48
|
edge(pallet, pallet:{references:{file => link_id.full_name}})
|
49
49
|
when filestat.directory?
|
50
50
|
child = jack.pallet(kind, File.join(name, file))
|
51
|
-
child.edge(self, pallet:{references:{_parent:
|
51
|
+
child.edge(self, pallet:{references:{_parent: full_name}})
|
52
52
|
end
|
53
53
|
end
|
54
54
|
merge!(pallet:{kind => name, boxes: boxes})
|
55
|
-
jack.keytrans_writer.transform!(self)
|
56
55
|
|
57
56
|
self
|
58
57
|
end
|
data/lib/palletjack/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: palletjack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Calle Englund
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
f8wtQllq82VF0AXUYeLtTh1f+DW3WW5BO1e2OCu5eOV7dbyaVPaNK/+rHjCN8kM/
|
32
32
|
DGZSwUoNADmVkQ==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2016-11-
|
34
|
+
date: 2016-11-18 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: activesupport
|
metadata.gz.sig
CHANGED
Binary file
|