neo4j-asciidoctor-extensions 0.1.0 → 0.1.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b42a3be5a38b009c3e709bac862ecd1823a858f3070c1cbbe74f56b2024ebb5f
|
4
|
+
data.tar.gz: 12bf0d58e1bcc0431c1ad80c6171be11ae50f092659cb4ba0d4bfc28763b37b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cb5a08954c0e42523f0bbe47d69e9071e480b54513b5de2e9c9903532f2c09642875f85a8199723027f31f260bcd53d6b236edc4c70e13339a667296c62ee41
|
7
|
+
data.tar.gz: 8fe53eefe0a3ad9cb16e6b9acfb363c3131e445cdeb0ae32ca00efb360246d91d6350f159c7123d6e485fe68f570f23912253d847eba1467b83c3733733bd7b3
|
data/Gemfile.lock
CHANGED
@@ -69,7 +69,7 @@ module Neo4j
|
|
69
69
|
attr_name = resolve_attr_name(attr_include)
|
70
70
|
if document.attr? attr_name
|
71
71
|
attr_value = resolve_attribute_value(attr_name, document, value_type)
|
72
|
-
metadata[attr_name] = attr_value
|
72
|
+
metadata[attr_name.gsub('-', '_')] = attr_value
|
73
73
|
end
|
74
74
|
end
|
75
75
|
metadata['title'] = document.doctitle
|
@@ -96,7 +96,6 @@ module Neo4j
|
|
96
96
|
.gsub(/\*$/, '')
|
97
97
|
.gsub(/\*<>$/, '')
|
98
98
|
.gsub(/\*<>$/, '')
|
99
|
-
.gsub('-', '_')
|
100
99
|
end
|
101
100
|
|
102
101
|
def write(metadata, outfile)
|
@@ -115,5 +115,21 @@ describe Neo4j::AsciidoctorExtensions::DocumentMetadataGeneratorPostProcessor do
|
|
115
115
|
expect(taxonomies.detect { |taxonomy| taxonomy['key'] == 'programming_language' }['values']).to eql(%w[java])
|
116
116
|
expect(taxonomies.detect { |taxonomy| taxonomy['key'] == 'neo4j_version' }['values']).to eql(%w[3-5 3-6])
|
117
117
|
end
|
118
|
+
it 'should replace - by _ in the attribute name' do
|
119
|
+
input = <<~'ADOC'
|
120
|
+
= Introduction to Neo4j 4.0
|
121
|
+
:slug: introduction-neo4j-4-0
|
122
|
+
:parent-path: /labs
|
123
|
+
|
124
|
+
This is a paragraph.
|
125
|
+
ADOC
|
126
|
+
Asciidoctor.convert(input, safe: 'safe', to_file: 'spec/output/test.html', attributes: {
|
127
|
+
'document-metadata-attrs-include' => 'slug,parent-path'
|
128
|
+
})
|
129
|
+
metadata = YAML.load_file('spec/output/test.yml')
|
130
|
+
expect(metadata['title']).to eql('Introduction to Neo4j 4.0')
|
131
|
+
expect(metadata['slug']).to eql('introduction-neo4j-4-0')
|
132
|
+
expect(metadata['parent_path']).to eql('/labs')
|
133
|
+
end
|
118
134
|
end
|
119
135
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: neo4j-asciidoctor-extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guillaume Grossetie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|