neurolibre 1.5.7 → 1.5.8
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 +9 -0
- data/lib/theoj/paper.rb +12 -1
- data/lib/theoj/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: d551d008924929db68dc5ffb268b705b3d245310a6beacfb6f0caddc86a492df
|
|
4
|
+
data.tar.gz: f852c56ee6e7c9826eda7dc89ab0f1698d44754edf825924e4ea402cdf771b09
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 38fe331c552a555bd299ecbce13e2140cf12557fcde5606d00d3b0dcfb909f49b2ee1c4961bcff3ecb825e9bfc1ac1ec1486e7b27bd9f8f18bb5df2c5aa76b20
|
|
7
|
+
data.tar.gz: 76e04948fca0a7fa7fa2146e44fa71e477292c8b732abdf5a32e594b0aa0cd51fbbcdcbbd33cf0b6bc76527e224c69d5b86eb31e60a376e210f1f7ff317e6189
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.5.8 (2026-11-06)
|
|
4
|
+
|
|
5
|
+
- A paper.md with no front matter block takes all of its metadata from
|
|
6
|
+
myst.yml. The 1.5.7 fallback was never reached for such a paper: the whole
|
|
7
|
+
file was handed to the YAML parser, which read the markdown body as YAML and
|
|
8
|
+
raised `mapping values are not allowed in this context` on the first line
|
|
9
|
+
of prose with a colon in it.
|
|
10
|
+
- The spec helper requires the gem's own entry file, so the suite loads again.
|
|
11
|
+
|
|
3
12
|
## 1.5.7 (2026-08-19)
|
|
4
13
|
|
|
5
14
|
- Paper metadata falls back to myst.yml when a key is absent from the paper's
|
data/lib/theoj/paper.rb
CHANGED
|
@@ -125,11 +125,22 @@ module Theoj
|
|
|
125
125
|
def front_matter_metadata
|
|
126
126
|
if paper_path.include?('.tex')
|
|
127
127
|
YAML.load_file(paper_path.gsub('.tex', '.yml'))
|
|
128
|
-
|
|
128
|
+
elsif front_matter_block?(paper_path)
|
|
129
129
|
YAML.load_file(paper_path)
|
|
130
|
+
else
|
|
131
|
+
# No front matter: everything comes from myst.yml. Parsing the file
|
|
132
|
+
# anyway would read the markdown body as YAML, and prose with a
|
|
133
|
+
# colon in it ("Note: see below") is a Psych syntax error.
|
|
134
|
+
nil
|
|
130
135
|
end
|
|
131
136
|
end
|
|
132
137
|
|
|
138
|
+
# Does the paper open with a `---` line, the start of a YAML front matter block?
|
|
139
|
+
def front_matter_block?(path)
|
|
140
|
+
first_line = File.open(path, &:gets).to_s
|
|
141
|
+
first_line.strip == "---"
|
|
142
|
+
end
|
|
143
|
+
|
|
133
144
|
def parse_authors
|
|
134
145
|
parsed_authors = []
|
|
135
146
|
authors_metadata = @paper_metadata['authors']
|
data/lib/theoj/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: neurolibre
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.5.
|
|
4
|
+
version: 1.5.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Juanjo Bazán
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-11-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: octokit
|