ask-rails 0.11.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/ask/rails/persistence.rb +5 -1
- data/lib/ask/rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9a65444d40a0b57ed299905f78aaf17d4321ce2c50a23a0bfc23c494c8a32b81
|
|
4
|
+
data.tar.gz: 6e2009064de021537f2aaee16a6b9e92066c216268cb67a6f31a92177384ef0a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d137bd72632e357072ddd7bcdea9046b70fa75a0ce67baf7715afeec30cd5a7bc68b0bd36ee0d072eee7772ff9714305477bdaa9ede339ba4d029f69b9c4df09
|
|
7
|
+
data.tar.gz: d53a058708f7958c756f0ddb1391f45f419976513b8e2a7f36d1dbdaf2af86fcbafa0105c006a081c6c2e0c077252416cb9f6df2182819f89aded4a2ed61885c
|
data/CHANGELOG.md
CHANGED
|
@@ -190,3 +190,13 @@
|
|
|
190
190
|
### Added
|
|
191
191
|
|
|
192
192
|
- **Persistence tests** — New `FakeModel` fixture with 6 real roundtrip tests covering set/get, missing key, delete, list, and old save/load interface.
|
|
193
|
+
## [0.11.1] — 2026-07-23
|
|
194
|
+
|
|
195
|
+
### Changed
|
|
196
|
+
|
|
197
|
+
- **Persistence now inherits from Ask::State::Adapter** — Contract enforcement instead of duck-typing. Users get a compile-time guarantee that all required methods are implemented.
|
|
198
|
+
|
|
199
|
+
### Added
|
|
200
|
+
|
|
201
|
+
- **Persistence#clear** — Required by the State::Adapter contract. Removes all session records.
|
|
202
|
+
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module Ask
|
|
4
4
|
module Rails
|
|
5
|
-
class Persistence
|
|
5
|
+
class Persistence < ::Ask::State::Adapter
|
|
6
6
|
def initialize(model_class: nil)
|
|
7
7
|
@model_class = model_class
|
|
8
8
|
end
|
|
@@ -34,6 +34,10 @@ module Ask
|
|
|
34
34
|
record&.data
|
|
35
35
|
end
|
|
36
36
|
|
|
37
|
+
def clear
|
|
38
|
+
model_class.delete_all
|
|
39
|
+
end
|
|
40
|
+
|
|
37
41
|
def list
|
|
38
42
|
model_class.pluck(:session_id)
|
|
39
43
|
end
|
data/lib/ask/rails/version.rb
CHANGED