andromeda_cms 0.5.0-aarch64-linux → 0.6.0-aarch64-linux

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e64f4dc8a464812ca4fbd50f7ffc1a15609623471dd1a643a2a5b7ce2437a731
4
- data.tar.gz: e0e688fa71f11e8e214ab087753dc52806af908808c03b268593247cecc91f25
3
+ metadata.gz: 5651680f10561904a02f8626baa6f59e4d5bf540131a3fc0653e5025e4a39114
4
+ data.tar.gz: a403b5c8a6a1dd1da2a3b978be2027a0da1edd6628b81326be6e2b36b2847eff
5
5
  SHA512:
6
- metadata.gz: 1563ed9bf6fba82b6e8222af0b766a14322afddb17dffeb99e129a556b74319b4498e7aac657535e2500eee149cb7621293eb3e8ec1a1131b6c0df549c174fdf
7
- data.tar.gz: ed53c666b48a20394b15b1c25ef0468c26af275e4f23dac957b38f32672c61c99394fcb71ccb491e3afc5ca25fa6d7c81285503b6dce3a7aef9961b383880768
6
+ metadata.gz: 24cc9016120eee6474096caf06d4f82fcf1eccb648df857b99919ccc4a4dad377b7521bf779070ab266443544a20e71732f95f8920e9e7ebb16f314d1c871877
7
+ data.tar.gz: 895dc27f36bc43bcd19f8daacbf17e165f9d46832a321885f70f7a7a85696b0a843c2b8ca6fedeeccfc68892f71ec6ca6f751aae1bef9d47812bb25bf7a5d25a
data/CHANGELOG.md CHANGED
@@ -5,6 +5,19 @@ All notable changes to this project are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.6.0] - 2026-10-08
9
+
10
+ ### Added
11
+
12
+ - `Entry.replace_entries(list)` swaps a collection's entries in tests without
13
+ depending on internal cache variables; `reload!` restores the real ones.
14
+
15
+ ### Fixed
16
+
17
+ - The gem now requires `json < 3`, so `bundle update` no longer pulls in a
18
+ version that breaks session cookie decryption on Rails 8.1. The `Gemfile`
19
+ pin from the README is no longer needed.
20
+
8
21
  ## [0.5.0] - 2026-10-07
9
22
 
10
23
  ### Changed
@@ -153,6 +166,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
153
166
  - Generators: `andromeda:install`, `andromeda:collection`,
154
167
  `andromeda:component` and `andromeda:import_astro`.
155
168
 
169
+ [0.6.0]: https://github.com/AndromedaCMS/andromeda_cms/releases/tag/v0.6.0
156
170
  [0.5.0]: https://github.com/AndromedaCMS/andromeda_cms/releases/tag/v0.5.0
157
171
  [0.4.2]: https://github.com/AndromedaCMS/andromeda_cms/releases/tag/v0.4.2
158
172
  [0.4.1]: https://github.com/AndromedaCMS/andromeda_cms/releases/tag/v0.4.1
data/README.md CHANGED
@@ -307,16 +307,27 @@ bundle exec rake test:corpus # after test/fetch_corpus.sh: parse ~370 real Astr
307
307
  ## Troubleshooting
308
308
 
309
309
  **`ArgumentError: wrong number of arguments (given 2, expected 1)` from `JSON.parse`.**
310
- Not this gem: Rails 8.1 calls `JSON.parse` with a positional options hash, which
311
- version 3 of the `json` gem no longer accepts, and decrypting a session cookie
312
- hits that path — so pages fail only once a session exists. Pin the `json` gem
313
- until Rails ships a fix:
310
+ Not this gem's code: Rails 8.1 calls `JSON.parse` with a positional options hash,
311
+ which version 3 of the `json` gem no longer accepts, and decrypting a session
312
+ cookie hits that path, so pages fail only once a session exists. The gem
313
+ restricts `json` to `< 3` to avoid this. If you are on an older andromeda_cms,
314
+ pin it in your own `Gemfile` until Rails ships a fix:
314
315
 
315
316
  ```ruby
316
317
  # Gemfile
317
318
  gem "json", "~> 2.9"
318
319
  ```
319
320
 
321
+ ## Testing
322
+
323
+ To run model tests against entries that are not files under `app/content`,
324
+ swap them in with `replace_entries` and restore the real ones with `reload!`:
325
+
326
+ ```ruby
327
+ setup { Content::Post.replace_entries([Content::Post.new(id: "a", collection: :posts, data: { title: "A" }, body: "", file_path: "a.md", digest: "x")]) }
328
+ teardown { Content::Post.reload! }
329
+ ```
330
+
320
331
  ## Contributing
321
332
 
322
333
  Bug reports are welcome; patches are not. Andromeda is open source but not open
@@ -184,6 +184,22 @@ module Andromeda
184
184
  @entries_signature = nil
185
185
  end
186
186
 
187
+ # Swaps the collection's entries for `list`, so tests can run against
188
+ # entries that are not backed by files under `app/content`. The cache
189
+ # signature is set to match the current source files, so the next query
190
+ # keeps `list` instead of noticing a mismatch and re-reading the files;
191
+ # setting `@entries` alone leaves the signature nil and the swap is
192
+ # silently undone. A later source file change, or `reload!`, restores
193
+ # the real entries.
194
+ #
195
+ # @param list [Array<Andromeda::Entry>]
196
+ # @return [Array<Andromeda::Entry>]
197
+ def replace_entries(list)
198
+ @entries = list.to_a.dup
199
+ @entries_signature = production? ? nil : source_signature
200
+ @entries
201
+ end
202
+
187
203
  private
188
204
 
189
205
  # Production never touches source files: everything a query
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Andromeda
4
- VERSION = "0.5.0"
4
+ VERSION = "0.6.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: andromeda_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - LIMHAUS Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-10-07 00:00:00.000000000 Z
11
+ date: 2026-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '2.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: json
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "<"
74
+ - !ruby/object:Gem::Version
75
+ version: '3'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "<"
81
+ - !ruby/object:Gem::Version
82
+ version: '3'
69
83
  description: |
70
84
  Andromeda brings Astro's content collections to an ordinary Ruby on Rails
71
85
  app. Markdown and MDX files copied from an Astro project are validated