lode 1.0.0 → 1.0.1
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/README.adoc +15 -2
- data/lib/lode/client.rb +4 -1
- data/lib/lode/refines/persistent_store.rb +1 -1
- data/lode.gemspec +1 -1
- data.tar.gz.sig +0 -0
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53547ef20d061cc6875625c4a82430c5a7c6b6d1826b41b56f16446ec9202085
|
4
|
+
data.tar.gz: d22865856c792c76dee3e58b8106285683d0fc2e78f752c69bc7603bb3581eb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6cafe0d0ffdec73e06a76994bfdae4b9b4c9f3acb3e29a0415148ef6c00ea0163fef33afeef9224b2d1d468025385bc33fed160bc3b2708afbdab9f2433bd65
|
7
|
+
data.tar.gz: 590792995478977eb6e4abdf626a25e32d0c830154857f1fa6480d059acea8fdae0f6c968d6c655034e68c6ecbb642fed6208107e22c9d2e1595e25976b1702a
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.adoc
CHANGED
@@ -9,9 +9,9 @@
|
|
9
9
|
|
10
10
|
= Lode
|
11
11
|
|
12
|
-
Lode -- as in
|
12
|
+
Lode -- as in geological deposit or a vein of minerals -- is a {pstore_link} of object data that can be mined for valuable information.
|
13
13
|
|
14
|
-
As noted in the {pstore_link} documentation all objects are marshaled which is not without caveats and dangers but, if you only need a simple object store, {pstore_link} is a solution. Lode takes this a step further by allowing you to have a pipeline workflow with a Domain Specific Language (DSL) for creating, updating, finding, and deleting records.
|
14
|
+
As noted in the {pstore_link} documentation all objects are marshaled which is not without caveats and dangers but, if you only need a simple object store, {pstore_link} is a solution. Lode takes this a step further by allowing you to have a pipeline workflow along with a Domain Specific Language (DSL) for creating, updating, finding, and deleting records.
|
15
15
|
|
16
16
|
toc::[]
|
17
17
|
|
@@ -141,6 +141,19 @@ Each key can be configured as follows:
|
|
141
141
|
* `primary_key`: Defines the primary key used when interacting with your table of records (useful when finding or upserting records). Default: `:id`.
|
142
142
|
* `registry`: Used for registering default settings for your tables. _This is not meant to be used directly_ but is documented for transparency.
|
143
143
|
|
144
|
+
=== Paths
|
145
|
+
|
146
|
+
Upon initialization, and when given a file, the file is only created once you start saving records. Although, when given a nested path, the full parent path will be created in anticipation of the file eventually being created. Example:
|
147
|
+
|
148
|
+
[source,ruby]
|
149
|
+
----
|
150
|
+
# The file, "demo.store", is not created until data is saved.
|
151
|
+
Lode.new "demo.store"
|
152
|
+
|
153
|
+
# The path, "a/nested/path", will be created so `demo.store` can eventually be saved.
|
154
|
+
Lode.new "a/nested/path/demo.store"
|
155
|
+
----
|
156
|
+
|
144
157
|
=== Registry
|
145
158
|
|
146
159
|
The registry is part of the configuration and directly accessible via a Lode instance. The registry allows you to customize individual table behavior as desired. For instance, you could have a `Hash` table or value table (i.e. `Data`, `Struct`, etc). Additionally, each table can have different primary keys too. The registry accepts three arguments in this format:
|
data/lib/lode/client.rb
CHANGED
@@ -1,12 +1,15 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "forwardable"
|
4
|
+
require "refinements/pathname"
|
4
5
|
|
5
6
|
module Lode
|
6
7
|
# Provides an enhanced PStore-based client.
|
7
8
|
class Client
|
8
9
|
extend Forwardable
|
9
10
|
|
11
|
+
using Refinements::Pathname
|
12
|
+
|
10
13
|
attr_reader :path, :store
|
11
14
|
|
12
15
|
delegate %i[register registry] => :configuration
|
@@ -14,7 +17,7 @@ module Lode
|
|
14
17
|
def initialize path, configuration: Configuration.new
|
15
18
|
yield configuration if block_given?
|
16
19
|
|
17
|
-
@path = path
|
20
|
+
@path = Pathname(path).make_ancestors
|
18
21
|
@configuration = configuration
|
19
22
|
@store = configuration.store_for path
|
20
23
|
end
|
data/lode.gemspec
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
|
36
36
|
gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2024-01-
|
38
|
+
date: 2024-01-07 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: dry-monads
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
- !ruby/object:Gem::Version
|
126
126
|
version: '0'
|
127
127
|
requirements: []
|
128
|
-
rubygems_version: 3.5.
|
128
|
+
rubygems_version: 3.5.4
|
129
129
|
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: A monadic store of marshaled objects.
|
metadata.gz.sig
CHANGED
Binary file
|