lode 1.11.0 → 2.0.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
  SHA256:
3
- metadata.gz: 2059c40be86fcb96b659630b3c7f29dbfcfc6d22097197d2bb9f49c4a76801c6
4
- data.tar.gz: e5c269817dd3b7f4344b079cd2c5379d8354ab7e490d45d1d168e44f915140e6
3
+ metadata.gz: 1f0d451ef8acbcdb79535dcf91763cd297f1f3489d95a62e3f63c946ed232e64
4
+ data.tar.gz: 416c3e6c793ab8b3cd40015a40e6ddf89fee1bb079ab9cb4d8666f2790746b5e
5
5
  SHA512:
6
- metadata.gz: eb98f91d1b3ce5b35430eca77677fd1b6ed3662316ebb01a7d5ffb0ef919701bd8c4d8496719a69b24d67736b97581cc007a8dd018ece25cad4f4118355e9ef9
7
- data.tar.gz: ca956d30628a7f31550090cd428f92f48a4771b9af4377ff3f0e86d3441f6bd9c586e7fbca0b55105545b476275d4cd3ef8b87b3703ea377c98e97d806a65114
6
+ metadata.gz: f4c80ec9a72a008902ae45f4289c58c08ed3d775b1bc616b8cbbd29c46cb58176660de42243021c7870cae298d55cc313444deb73d3da79e7bbb3caeb06dd3c3
7
+ data.tar.gz: 7367ef9670fc1225bd06dd24cb64eb4f88d50ed0e172ac8a6b5da848503b8d8b014e61a7c99c5aed0dad94c5c6b0130b26a69327f9fc765a4b2e4151bd6a7688
checksums.yaml.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -5,6 +5,7 @@
5
5
  :dry_monads_link: link:https://dry-rb.org/gems/dry-monads[Dry Monads]
6
6
  :pstore_link: link:https://github.com/ruby/pstore[PStore]
7
7
  :ruby_link: link:https://www.ruby-lang.org[Ruby]
8
+ :wholeable_link: link:https://alchemists.io/projects/wholeable[Wholeable]
8
9
  :xdg_link: link:https://alchemists.io/projects/xdg[XDG]
9
10
 
10
11
  = Lode
@@ -19,7 +20,7 @@ toc::[]
19
20
 
20
21
  - Built atop {pstore_link}.
21
22
  - Uses the _Railway Pattern_ via {dry_monads_link} for fault tolerant pipelines.
22
- - Emphasizes use of `Hash`, `Data`, `Struct`, or link:https://alchemists.io/projects/wholable[whole value objects] in general.
23
+ - Emphasizes use of `Hash`, `Data`, `Struct`, or {wholeable_link} objects.
23
24
  - Great for {xdg_link} caches, lightweight file-based databases, or simple file stores in general.
24
25
 
25
26
  == Requirements
@@ -143,7 +144,7 @@ The default configuration consists of the following attributes:
143
144
  Lode::Configuration[
144
145
  store: PStore,
145
146
  mode: :default,
146
- table: Lode::Tables::Dictionary,
147
+ table: Lode::Tables::Hash,
147
148
  primary_key: :id,
148
149
  registry: {}
149
150
  ]
@@ -158,8 +159,8 @@ Each key can be configured as follows:
158
159
  ** `:file`: Ensures a file safe `PStore` instance is created. This is identical to setting `store.ultra_safe = true` on a `PStore` instance.
159
160
  ** `:max`: Ensures a thread _and_ file safe `PStore` instance is created for situations where you need maximum safety.
160
161
  * `table`: Defines the _type_ of table used to interact with your records. The following values are supported:
161
- ** `Lode::Tables::Dictionary`: The default value which allows you to interact with a `Hash` of records but would also work with any object that can respond to `+#[]+` and `+#[]=+`.
162
- ** `Lode::Tables::Value`: Allows you to interact with whole value objects like `Data`, `Struct`, or link:https://alchemists.io/projects/wholable[whole value objects] in general which have attribute readers and writers.
162
+ ** `Lode::Tables::Hash`: The default value which allows you to interact with a `Hash` of records but would also work with any object that can respond to `+#[]+` and `+#[]=+`.
163
+ ** `Lode::Tables::Value`: Allows you to interact with whole value objects like `Data`, `Struct`, or {wholeable_link} objects which have attribute readers and writers.
163
164
  * `primary_key`: Defines the primary key used when interacting with your table of records (useful when finding or upserting records). Default: `:id`.
164
165
  * `registry`: Used for registering default settings for your tables. _This is not meant to be used directly_ but is documented for transparency.
165
166
 
@@ -218,7 +219,7 @@ Even though the default primary key was registered to be `:slug`, we were able t
218
219
 
219
220
  === Tables
220
221
 
221
- As mentioned when configuring a Lode instance, two _types_ of tables are available to you. The default (i.e. `Lode::Tables::Dictionary`) allows you to interact with `Hash` records which is compatible with default `PStore` functionality. Example:
222
+ As mentioned when configuring a Lode instance, two _types_ of tables are available to you. The default (i.e. `Lode::Tables::Hash`) allows you to interact with `Hash` records which is compatible with default `PStore` functionality. Example:
222
223
 
223
224
  [source,ruby]
224
225
  ----
data/lib/lode/client.rb CHANGED
@@ -26,13 +26,6 @@ module Lode
26
26
 
27
27
  def write(key, &) = transact(:commit, key, &)
28
28
 
29
- def commit(key, &)
30
- warn "`#{self.class}##{__method__}` is deprecated, use `#write` instead.",
31
- category: :deprecated
32
-
33
- write(key, &)
34
- end
35
-
36
29
  private
37
30
 
38
31
  attr_reader :configuration
@@ -10,7 +10,7 @@ module Lode
10
10
 
11
11
  def initialize store: PStore,
12
12
  mode: :default,
13
- table: Tables::Dictionary,
13
+ table: Tables::Hash,
14
14
  primary_key: PRIMARY_KEY,
15
15
  registry: {}
16
16
  super
@@ -4,8 +4,8 @@ require "dry/monads"
4
4
 
5
5
  module Lode
6
6
  module Tables
7
- # Provides an array-based table for dictionary or hash-like objects.
8
- class Dictionary < Abstract
7
+ # Provides an array-based table for hash objects.
8
+ class Hash < Abstract
9
9
  include Dry::Monads[:result]
10
10
 
11
11
  def upsert change, key: primary_key
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 = "1.11.0"
5
+ spec.version = "2.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,10 +22,10 @@ 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 = ">= 3.3", "<= 3.4"
25
+ spec.required_ruby_version = "~> 3.4"
26
26
  spec.add_dependency "dry-monads", "~> 1.6"
27
27
  spec.add_dependency "pstore", "~> 0.1"
28
- spec.add_dependency "refinements", "~> 12.10"
28
+ spec.add_dependency "refinements", "~> 13.0"
29
29
  spec.add_dependency "zeitwerk", "~> 2.7"
30
30
 
31
31
  spec.extra_rdoc_files = Dir["README*", "LICENSE*"]
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,11 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lode
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain:
11
10
  - |
@@ -35,7 +34,7 @@ cert_chain:
35
34
  3n5C8/6Zh9DYTkpcwPSuIfAga6wf4nXc9m6JAw8AuMLaiWN/r/2s4zJsUHYERJEu
36
35
  gZGm4JqtuSg8pYjPeIJxS960owq+SfuC+jxqmRA54BisFCv/0VOJi7tiJVY=
37
36
  -----END CERTIFICATE-----
38
- date: 2024-11-09 00:00:00.000000000 Z
37
+ date: 2024-12-27 00:00:00.000000000 Z
39
38
  dependencies:
40
39
  - !ruby/object:Gem::Dependency
41
40
  name: dry-monads
@@ -71,14 +70,14 @@ dependencies:
71
70
  requirements:
72
71
  - - "~>"
73
72
  - !ruby/object:Gem::Version
74
- version: '12.10'
73
+ version: '13.0'
75
74
  type: :runtime
76
75
  prerelease: false
77
76
  version_requirements: !ruby/object:Gem::Requirement
78
77
  requirements:
79
78
  - - "~>"
80
79
  - !ruby/object:Gem::Version
81
- version: '12.10'
80
+ version: '13.0'
82
81
  - !ruby/object:Gem::Dependency
83
82
  name: zeitwerk
84
83
  requirement: !ruby/object:Gem::Requirement
@@ -93,7 +92,6 @@ dependencies:
93
92
  - - "~>"
94
93
  - !ruby/object:Gem::Version
95
94
  version: '2.7'
96
- description:
97
95
  email:
98
96
  - brooke@alchemists.io
99
97
  executables: []
@@ -110,7 +108,7 @@ files:
110
108
  - lib/lode/refines/persistent_store.rb
111
109
  - lib/lode/setting.rb
112
110
  - lib/lode/tables/abstract.rb
113
- - lib/lode/tables/dictionary.rb
111
+ - lib/lode/tables/hash.rb
114
112
  - lib/lode/tables/value.rb
115
113
  - lode.gemspec
116
114
  homepage: https://alchemists.io/projects/lode
@@ -124,16 +122,12 @@ metadata:
124
122
  label: Lode
125
123
  rubygems_mfa_required: 'true'
126
124
  source_code_uri: https://github.com/bkuhlmann/lode
127
- post_install_message:
128
125
  rdoc_options: []
129
126
  require_paths:
130
127
  - lib
131
128
  required_ruby_version: !ruby/object:Gem::Requirement
132
129
  requirements:
133
- - - ">="
134
- - !ruby/object:Gem::Version
135
- version: '3.3'
136
- - - "<="
130
+ - - "~>"
137
131
  - !ruby/object:Gem::Version
138
132
  version: '3.4'
139
133
  required_rubygems_version: !ruby/object:Gem::Requirement
@@ -142,8 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
136
  - !ruby/object:Gem::Version
143
137
  version: '0'
144
138
  requirements: []
145
- rubygems_version: 3.5.23
146
- signing_key:
139
+ rubygems_version: 3.6.2
147
140
  specification_version: 4
148
141
  summary: A monadic store of marshaled objects.
149
142
  test_files: []
metadata.gz.sig CHANGED
Binary file