andromeda_cms 0.4.0-aarch64-linux → 0.4.2-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 +4 -4
- data/CHANGELOG.md +22 -0
- data/README.md +3 -0
- data/lib/andromeda/entry.rb +30 -3
- data/lib/andromeda/helpers.rb +17 -0
- data/lib/andromeda/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b45897e9dc293bb72ac57a478cc9ceb775664b670106ec1a6d8ff758b4742770
|
|
4
|
+
data.tar.gz: 6efac97db6d3b4e61f69585c0a3b82d888624e6358d7947aad2ac9ca1c2ee7d9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c0f5d3062cd2db5270b1c241cf796bab3551dd194844047a7d91130567c3ccf77172e9e3b18c36ed465b7d46d6b94d5c09a7047b35058c7bf045c7894d48b13c
|
|
7
|
+
data.tar.gz: 58dc0a9dd82764038e44fdbc1742bef8f2d9e11c2c5b33147e91b1a375918a5fc0e8e11b0f2eb71aa34ce543707df895e9951f0f12d6c2704a5de72cc43c0d44
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,26 @@ 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.4.2] - 2026-09-30
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- In development, a file added or edited under `app/content/` now shows up
|
|
13
|
+
without restarting the server. `Entry` used to keep the list it loaded
|
|
14
|
+
first, so a new file returned 404 and an edited one kept its old content.
|
|
15
|
+
The list is now reloaded when the paths, mtimes or sizes of the collection's
|
|
16
|
+
source files change; production is unchanged.
|
|
17
|
+
|
|
18
|
+
## [0.4.1] - 2026-09-29
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- `image_tag andromeda_image_url(src)` in a component no longer fails
|
|
23
|
+
`andromeda:build` with `Propshaft::MissingAssetError`. While converting,
|
|
24
|
+
the asset helpers (`image_tag`, `asset_path`, `asset_url`...) pass an asset
|
|
25
|
+
marker through untouched, so `andromeda_content` resolves it when the page
|
|
26
|
+
is served.
|
|
27
|
+
|
|
8
28
|
## [0.4.0] - 2026-09-29
|
|
9
29
|
|
|
10
30
|
### Added
|
|
@@ -121,6 +141,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
121
141
|
- Generators: `andromeda:install`, `andromeda:collection`,
|
|
122
142
|
`andromeda:component` and `andromeda:import_astro`.
|
|
123
143
|
|
|
144
|
+
[0.4.2]: https://github.com/AndromedaCMS/andromeda_cms/releases/tag/v0.4.2
|
|
145
|
+
[0.4.1]: https://github.com/AndromedaCMS/andromeda_cms/releases/tag/v0.4.1
|
|
124
146
|
[0.4.0]: https://github.com/AndromedaCMS/andromeda_cms/releases/tag/v0.4.0
|
|
125
147
|
[0.3.0]: https://github.com/AndromedaCMS/andromeda_cms/releases/tag/v0.3.0
|
|
126
148
|
[0.2.0]: https://github.com/AndromedaCMS/andromeda_cms/releases/tag/v0.2.0
|
data/README.md
CHANGED
|
@@ -234,6 +234,9 @@ The partial receives the same `Andromeda::Image` an `image` attribute holds:
|
|
|
234
234
|
</figure>
|
|
235
235
|
```
|
|
236
236
|
|
|
237
|
+
`image_tag andromeda_image_url(src)` works as well: while converting, the
|
|
238
|
+
asset helpers pass the placeholder through untouched.
|
|
239
|
+
|
|
237
240
|
## Development and deployment
|
|
238
241
|
|
|
239
242
|
```
|
data/lib/andromeda/entry.rb
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require "digest"
|
|
3
4
|
require "pathname"
|
|
4
5
|
|
|
5
6
|
module Andromeda
|
|
@@ -45,6 +46,7 @@ module Andromeda
|
|
|
45
46
|
@base_dir = resolve_base(base)
|
|
46
47
|
@pattern = pattern
|
|
47
48
|
@entries = nil
|
|
49
|
+
@entries_signature = nil
|
|
48
50
|
Andromeda::Registry.register(@collection_name, self)
|
|
49
51
|
self
|
|
50
52
|
end
|
|
@@ -174,10 +176,12 @@ module Andromeda
|
|
|
174
176
|
end
|
|
175
177
|
|
|
176
178
|
# Drops the in-memory cache, forcing the next query to re-run the
|
|
177
|
-
# Loader. Used by tests that change fixtures mid-example
|
|
178
|
-
#
|
|
179
|
+
# Loader. Used by tests that change fixtures mid-example and by
|
|
180
|
+
# Andromeda::Check; development queries notice source changes on their
|
|
181
|
+
# own (see `entries`).
|
|
179
182
|
def reload!
|
|
180
183
|
@entries = nil
|
|
184
|
+
@entries_signature = nil
|
|
181
185
|
end
|
|
182
186
|
|
|
183
187
|
private
|
|
@@ -190,10 +194,33 @@ module Andromeda
|
|
|
190
194
|
# the index is only rewritten once a collection finishes converting,
|
|
191
195
|
# so a component querying entries mid-build reads source instead
|
|
192
196
|
# (see Andromeda::BuildContext).
|
|
197
|
+
#
|
|
198
|
+
# The development cache is dropped whenever the source files change
|
|
199
|
+
# (see `source_signature`), so a file added or edited while the server
|
|
200
|
+
# runs shows up on the next query without a restart.
|
|
193
201
|
def entries
|
|
194
202
|
return source_entries if Andromeda::BuildContext.building?
|
|
203
|
+
return @entries ||= entries_from_index if production?
|
|
204
|
+
|
|
205
|
+
signature = source_signature
|
|
206
|
+
if @entries.nil? || signature != @entries_signature
|
|
207
|
+
@entries = load_entries_from_source
|
|
208
|
+
@entries_signature = signature
|
|
209
|
+
end
|
|
210
|
+
@entries
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
# Paths, mtimes and sizes of the collection's source files: an added or
|
|
214
|
+
# removed file changes the path list, an edit changes mtime/size. Same
|
|
215
|
+
# scheme as Andromeda::Pipeline#render_key uses for component partials.
|
|
216
|
+
def source_signature
|
|
217
|
+
files = Dir.glob(pattern, base: base_dir).sort.filter_map do |relative|
|
|
218
|
+
file = File.join(base_dir, relative)
|
|
219
|
+
next unless File.file?(file)
|
|
195
220
|
|
|
196
|
-
|
|
221
|
+
[relative, File.mtime(file).to_r, File.size(file)].join(":")
|
|
222
|
+
end
|
|
223
|
+
Digest::SHA256.hexdigest(files.join("\n"))
|
|
197
224
|
end
|
|
198
225
|
|
|
199
226
|
def production?
|
data/lib/andromeda/helpers.rb
CHANGED
|
@@ -32,6 +32,23 @@ module Andromeda
|
|
|
32
32
|
Andromeda::BuildContext.converting? ? source : Andromeda::Assets.resolve(source)
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
+
# Lets `image_tag andromeda_image_url(src)` work at conversion time.
|
|
36
|
+
# The marker has no `//`, so Rails would take it for a logical path and
|
|
37
|
+
# Propshaft would fail to find it; passing it through leaves it for
|
|
38
|
+
# `andromeda_content` to resolve like any other marker. Every asset
|
|
39
|
+
# helper (`image_tag`, `image_path`, `asset_url`...) goes through here.
|
|
40
|
+
def asset_path(source, options = {})
|
|
41
|
+
return source if Andromeda::BuildContext.converting? && source.to_s.start_with?(Andromeda::Assets::MARKER)
|
|
42
|
+
|
|
43
|
+
super
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# `image_tag` and `asset_url` call this alias, which Rails binds to its
|
|
47
|
+
# own `asset_path` and so would skip the override above.
|
|
48
|
+
def path_to_asset(source, options = {})
|
|
49
|
+
asset_path(source, options)
|
|
50
|
+
end
|
|
51
|
+
|
|
35
52
|
# Renders a nested table of contents from `entry.headings`.
|
|
36
53
|
#
|
|
37
54
|
# `min`/`max` default to h2..h3 because a page's h1 is usually the entry
|
data/lib/andromeda/version.rb
CHANGED
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.4.
|
|
4
|
+
version: 0.4.2
|
|
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-09-
|
|
11
|
+
date: 2026-09-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: railties
|