reverse_adoc 0.2.8 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.editorconfig +15 -0
- data/.github/workflows/rake.yml +32 -0
- data/.github/workflows/release.yml +45 -0
- data/.gitignore +10 -0
- data/.hound.yml +3 -1
- data/.rubocop.yml +7 -7
- data/Gemfile +1 -1
- data/README.adoc +6 -33
- data/Rakefile +1 -1
- data/exe/reverse_adoc +70 -0
- data/{bin → exe}/w2a +15 -15
- data/lib/reverse_adoc.rb +27 -0
- data/lib/{reverse_asciidoctor → reverse_adoc}/cleaner.rb +28 -27
- data/lib/{reverse_asciidoctor → reverse_adoc}/config.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters.rb +6 -6
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/a.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/aside.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/audio.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/base.rb +5 -3
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/blockquote.rb +2 -2
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/br.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/bypass.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/code.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/div.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/drop.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/em.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/figure.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/h.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/head.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/hr.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/ignore.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/img.rb +9 -9
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/li.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/mark.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/math.rb +3 -3
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/ol.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/p.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/pass_through.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/pre.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/q.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/strong.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/sub.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/sup.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/table.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/td.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/text.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/th.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/tr.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/converters/video.rb +1 -1
- data/lib/{reverse_asciidoctor → reverse_adoc}/errors.rb +1 -1
- data/lib/reverse_adoc/html_converter.rb +56 -0
- data/lib/reverse_adoc/version.rb +3 -0
- data/reverse_adoc.gemspec +18 -15
- data/spec/assets/escapables.html +2 -0
- data/spec/bin/reverse_adoc_spec.rb +2 -2
- data/spec/bin/w2a_spec.rb +7 -7
- data/spec/components/anchors_spec.rb +2 -2
- data/spec/components/basic_spec.rb +3 -3
- data/spec/components/code_spec.rb +4 -5
- data/spec/components/escapables_spec.rb +10 -2
- data/spec/components/from_the_wild_spec.rb +2 -2
- data/spec/components/html_fragment_spec.rb +2 -3
- data/spec/components/lists_spec.rb +2 -2
- data/spec/components/paragraphs_spec.rb +2 -2
- data/spec/components/quotation_spec.rb +2 -2
- data/spec/components/tables_spec.rb +2 -2
- data/spec/components/unknown_tags_spec.rb +9 -10
- data/spec/lib/{reverse_asciidoctor_spec.rb → reverse_adoc.rb} +17 -17
- data/spec/lib/{reverse_asciidoctor → reverse_adoc}/cleaner_spec.rb +4 -4
- data/spec/lib/{reverse_asciidoctor → reverse_adoc}/config_spec.rb +5 -5
- data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/aside_spec.rb +2 -2
- data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/audio_spec.rb +2 -3
- data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/blockquote_spec.rb +2 -2
- data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/br_spec.rb +2 -2
- data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/code_spec.rb +2 -3
- data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/div_spec.rb +2 -3
- data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/figure_spec.rb +2 -3
- data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/img_spec.rb +2 -3
- data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/li_spec.rb +2 -2
- data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/mark_spec.rb +2 -2
- data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/p_spec.rb +2 -3
- data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/pre_spec.rb +2 -3
- data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/q_spec.rb +2 -2
- data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/strong_spec.rb +2 -2
- data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/text_spec.rb +2 -2
- data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/video_spec.rb +2 -3
- data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters_spec.rb +5 -5
- data/spec/spec_helper.rb +3 -3
- metadata +123 -125
- data/.github/workflows/macos.yml +0 -31
- data/.github/workflows/ubuntu.yml +0 -33
- data/.github/workflows/windows.yml +0 -37
- data/Gemfile.lock +0 -84
- data/bin/reverse_adoc +0 -74
- data/lib/reverse_asciidoctor.rb +0 -30
- data/lib/reverse_asciidoctor/converters/example.rb +0 -17
- data/lib/reverse_asciidoctor/converters/express_ref.rb +0 -12
- data/lib/reverse_asciidoctor/converters/ext_description.rb +0 -16
- data/lib/reverse_asciidoctor/converters/ext_descriptions.rb +0 -12
- data/lib/reverse_asciidoctor/converters/note.rb +0 -17
- data/lib/reverse_asciidoctor/html_converter.rb +0 -56
- data/lib/reverse_asciidoctor/smrl_description_converter.rb +0 -45
- data/lib/reverse_asciidoctor/version.rb +0 -3
- data/spec/lib/reverse_asciidoctor/converters/example_spec.rb +0 -22
- data/spec/lib/reverse_asciidoctor/converters/express_ref_spec.rb +0 -14
- data/spec/lib/reverse_asciidoctor/converters/ext_description_spec.rb +0 -20
- data/spec/lib/reverse_asciidoctor/converters/ext_descriptions_spec.rb +0 -13
- data/spec/lib/reverse_asciidoctor/converters/note_spec.rb +0 -22
@@ -1,22 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
require 'reverse_asciidoctor/converters/example'
|
5
|
-
|
6
|
-
describe ReverseAsciidoctor::Converters::Example do
|
7
|
-
let(:converter) { described_class.new }
|
8
|
-
let(:output) do
|
9
|
-
<<~TEXT
|
10
|
-
[example]
|
11
|
-
====
|
12
|
-
foo
|
13
|
-
|
14
|
-
====
|
15
|
-
TEXT
|
16
|
-
end
|
17
|
-
|
18
|
-
it 'converts example` children' do
|
19
|
-
input = node_for('<example><li>foo</li></example>')
|
20
|
-
expect(converter.convert(input)).to eq(output)
|
21
|
-
end
|
22
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
require 'reverse_asciidoctor/converters/express_ref'
|
5
|
-
|
6
|
-
describe ReverseAsciidoctor::Converters::ExpressRef do
|
7
|
-
let(:converter) { described_class.new }
|
8
|
-
let(:schema) { 'schema' }
|
9
|
-
|
10
|
-
it 'converts supplied tag by format' do
|
11
|
-
input = node_for("<express_ref linkend='#{schema}' />")
|
12
|
-
expect(converter.convert(input)).to eq("express_ref:[#{schema}]")
|
13
|
-
end
|
14
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
require 'reverse_asciidoctor/converters/ext_description'
|
5
|
-
|
6
|
-
describe ReverseAsciidoctor::Converters::ExtDescription do
|
7
|
-
let(:converter) { described_class.new }
|
8
|
-
let(:schema) { 'schema' }
|
9
|
-
|
10
|
-
it 'takes ext_description linkend attribute' do
|
11
|
-
input = node_for("<ext_description linkend='#{schema}'></ext_description>")
|
12
|
-
expect(converter.convert(input)).to include(%{(*"#{schema}"})
|
13
|
-
end
|
14
|
-
|
15
|
-
it 'converts html children' do
|
16
|
-
input = node_for(
|
17
|
-
"<ext_description linkend='#{schema}'><li>foo</li></ext_description>")
|
18
|
-
expect(converter.convert(input)).to include(" foo\n")
|
19
|
-
end
|
20
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
require 'reverse_asciidoctor/converters/ext_descriptions'
|
5
|
-
|
6
|
-
describe ReverseAsciidoctor::Converters::ExtDescriptions do
|
7
|
-
let(:converter) { described_class.new }
|
8
|
-
|
9
|
-
it 'converts ext_descriptions children' do
|
10
|
-
input = node_for('<ext_descriptions><li>foo</li></ext_descriptions>')
|
11
|
-
expect(converter.convert(input)).to eq " foo\n"
|
12
|
-
end
|
13
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
require 'reverse_asciidoctor/converters/note'
|
5
|
-
|
6
|
-
describe ReverseAsciidoctor::Converters::Note do
|
7
|
-
let(:converter) { described_class.new }
|
8
|
-
let(:output) do
|
9
|
-
<<~TEXT
|
10
|
-
[NOTE]
|
11
|
-
--
|
12
|
-
foo
|
13
|
-
|
14
|
-
--
|
15
|
-
TEXT
|
16
|
-
end
|
17
|
-
|
18
|
-
it 'converts note` children' do
|
19
|
-
input = node_for('<note><li>foo</li></note>')
|
20
|
-
expect(converter.convert(input)).to eq(output)
|
21
|
-
end
|
22
|
-
end
|