lode 0.1.1 → 1.0.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/lib/lode/client.rb +4 -2
- data/lib/lode/configuration.rb +1 -1
- data/lib/lode/refines/persistent_store.rb +2 -2
- data/lib/lode/setting.rb +1 -0
- data/lib/lode/tables/abstract.rb +2 -2
- data/lode.gemspec +3 -3
- data.tar.gz.sig +0 -0
- metadata +6 -9
- 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: 18f3728eb2391285467b9dbdf6cda694bdf8ee167b9f84b8d9f60e4869938d67
|
4
|
+
data.tar.gz: cd5e03ccd6554d48c09e67514cd82c427cc636be527f351311089a6cbcdcfd93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0da905f28b4ac347b4bebe53a0bb58c87f185fe2f948bbf3e3e13af8f6a3461fe768848f69351f4767f50a10e34914ae71290125ab6e4af03affd7fcc0f851b0
|
7
|
+
data.tar.gz: 63b9f264fd388402cfd00a5cfab3062c7bed11f49738ec3cae760b579d26a26d6a49b635482b8181b0a3b462b2f24dd693f7d764595a660c063eaadb585867e9
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/lode/client.rb
CHANGED
@@ -27,10 +27,12 @@ module Lode
|
|
27
27
|
|
28
28
|
attr_reader :configuration
|
29
29
|
|
30
|
-
|
30
|
+
# rubocop:todo Naming/BlockForwarding
|
31
|
+
def transact mode, key, &block
|
31
32
|
store.transaction mode == :read do
|
32
|
-
configuration.table_for(store, key).instance_eval(&)
|
33
|
+
configuration.table_for(store, key).instance_eval(&block)
|
33
34
|
end
|
34
35
|
end
|
36
|
+
# rubocop:enable Naming/BlockForwarding
|
35
37
|
end
|
36
38
|
end
|
data/lib/lode/configuration.rb
CHANGED
@@ -6,7 +6,7 @@ module Lode
|
|
6
6
|
# Models the default configuration.
|
7
7
|
Configuration = Struct.new :store, :mode, :table, :primary_key, :registry do
|
8
8
|
using Refines::PersistentStore
|
9
|
-
using Refinements::
|
9
|
+
using Refinements::Array
|
10
10
|
|
11
11
|
def initialize store: PStore,
|
12
12
|
mode: :default,
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "pstore"
|
4
|
-
require "refinements/
|
4
|
+
require "refinements/array"
|
5
5
|
|
6
6
|
module Lode
|
7
7
|
module Refines
|
8
8
|
# Refined and enhanced PStore functionality.
|
9
9
|
module PersistentStore
|
10
|
-
using Refinements::
|
10
|
+
using Refinements::Array
|
11
11
|
|
12
12
|
refine PStore.singleton_class do
|
13
13
|
def with path, mode: :default
|
data/lib/lode/setting.rb
CHANGED
data/lib/lode/tables/abstract.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "dry/monads"
|
4
|
-
require "refinements/
|
4
|
+
require "refinements/array"
|
5
5
|
|
6
6
|
module Lode
|
7
7
|
module Tables
|
@@ -9,7 +9,7 @@ module Lode
|
|
9
9
|
class Abstract
|
10
10
|
include Dry::Monads[:result]
|
11
11
|
|
12
|
-
using Refinements::
|
12
|
+
using Refinements::Array
|
13
13
|
|
14
14
|
def initialize store, key, setting: Setting.new
|
15
15
|
@store = store
|
data/lode.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "lode"
|
5
|
-
spec.version = "0.
|
5
|
+
spec.version = "1.0.0"
|
6
6
|
spec.authors = ["Brooke Kuhlmann"]
|
7
7
|
spec.email = ["brooke@alchemists.io"]
|
8
8
|
spec.homepage = "https://alchemists.io/projects/lode"
|
@@ -22,9 +22,9 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.signing_key = Gem.default_key_path
|
23
23
|
spec.cert_chain = [Gem.default_cert_path]
|
24
24
|
|
25
|
-
spec.required_ruby_version =
|
25
|
+
spec.required_ruby_version = "~> 3.3"
|
26
26
|
spec.add_dependency "dry-monads", "~> 1.6"
|
27
|
-
spec.add_dependency "refinements", "~>
|
27
|
+
spec.add_dependency "refinements", "~> 12.0"
|
28
28
|
spec.add_dependency "zeitwerk", "~> 2.6"
|
29
29
|
|
30
30
|
spec.extra_rdoc_files = Dir["README*", "LICENSE*"]
|
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: 0.
|
4
|
+
version: 1.0.0
|
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:
|
38
|
+
date: 2024-01-01 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: dry-monads
|
@@ -57,14 +57,14 @@ dependencies:
|
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '
|
60
|
+
version: '12.0'
|
61
61
|
type: :runtime
|
62
62
|
prerelease: false
|
63
63
|
version_requirements: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - "~>"
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: '
|
67
|
+
version: '12.0'
|
68
68
|
- !ruby/object:Gem::Dependency
|
69
69
|
name: zeitwerk
|
70
70
|
requirement: !ruby/object:Gem::Requirement
|
@@ -116,10 +116,7 @@ require_paths:
|
|
116
116
|
- lib
|
117
117
|
required_ruby_version: !ruby/object:Gem::Requirement
|
118
118
|
requirements:
|
119
|
-
- - "
|
120
|
-
- !ruby/object:Gem::Version
|
121
|
-
version: '3.2'
|
122
|
-
- - "<="
|
119
|
+
- - "~>"
|
123
120
|
- !ruby/object:Gem::Version
|
124
121
|
version: '3.3'
|
125
122
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
@@ -128,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
125
|
- !ruby/object:Gem::Version
|
129
126
|
version: '0'
|
130
127
|
requirements: []
|
131
|
-
rubygems_version: 3.
|
128
|
+
rubygems_version: 3.5.3
|
132
129
|
signing_key:
|
133
130
|
specification_version: 4
|
134
131
|
summary: A monadic store of marshaled objects.
|
metadata.gz.sig
CHANGED
Binary file
|