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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ad0c8785d6c2e0df5f352e67ea82abad9ee6803b
4
- data.tar.gz: ce7296d715491c9a78e139b7578552b505e21c1d
3
+ metadata.gz: aa38de4b29c6cceadd2fecc3e88e74f041eccfef
4
+ data.tar.gz: 1532f5e70753e10d7cd08497426ca23d5384de21
5
5
  SHA512:
6
- metadata.gz: ca68935c9d97734d28b139629873774eeaca5d8f06bb468047c0a16a09c5c51f4983b04cfbabce97517c9fb259739830782acea3e93b6334cc4400392b19274f
7
- data.tar.gz: 6963849234c18071bdece0e5f5fd37fcf9edf8984775f69ec71084e994bbdf297959d2a1511e6c12dcc3e80a4a84c06c77efc4b5a52c3c2519d84d5fed5945ab
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 also contain references to other pallets (symlinks)
8
- to build a Directed Acyclic Graph of key-value search nodes.
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-example-net
86
- │ │ └── kea.yaml
87
- │ └── dns-resolver-example-com
88
- │ └── unbound.yaml
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
 
@@ -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: name}})
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
@@ -1,5 +1,5 @@
1
1
  require 'kvdag'
2
2
 
3
3
  class PalletJack < KVDAG
4
- VERSION = "0.2.0"
4
+ VERSION = "0.3.0"
5
5
  end
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.2.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-11 00:00:00.000000000 Z
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