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.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/.editorconfig +15 -0
  3. data/.github/workflows/rake.yml +32 -0
  4. data/.github/workflows/release.yml +45 -0
  5. data/.gitignore +10 -0
  6. data/.hound.yml +3 -1
  7. data/.rubocop.yml +7 -7
  8. data/Gemfile +1 -1
  9. data/README.adoc +6 -33
  10. data/Rakefile +1 -1
  11. data/exe/reverse_adoc +70 -0
  12. data/{bin → exe}/w2a +15 -15
  13. data/lib/reverse_adoc.rb +27 -0
  14. data/lib/{reverse_asciidoctor → reverse_adoc}/cleaner.rb +28 -27
  15. data/lib/{reverse_asciidoctor → reverse_adoc}/config.rb +1 -1
  16. data/lib/{reverse_asciidoctor → reverse_adoc}/converters.rb +6 -6
  17. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/a.rb +1 -1
  18. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/aside.rb +1 -1
  19. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/audio.rb +1 -1
  20. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/base.rb +5 -3
  21. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/blockquote.rb +2 -2
  22. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/br.rb +1 -1
  23. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/bypass.rb +1 -1
  24. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/code.rb +1 -1
  25. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/div.rb +1 -1
  26. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/drop.rb +1 -1
  27. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/em.rb +1 -1
  28. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/figure.rb +1 -1
  29. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/h.rb +1 -1
  30. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/head.rb +1 -1
  31. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/hr.rb +1 -1
  32. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/ignore.rb +1 -1
  33. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/img.rb +9 -9
  34. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/li.rb +1 -1
  35. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/mark.rb +1 -1
  36. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/math.rb +3 -3
  37. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/ol.rb +1 -1
  38. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/p.rb +1 -1
  39. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/pass_through.rb +1 -1
  40. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/pre.rb +1 -1
  41. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/q.rb +1 -1
  42. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/strong.rb +1 -1
  43. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/sub.rb +1 -1
  44. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/sup.rb +1 -1
  45. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/table.rb +1 -1
  46. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/td.rb +1 -1
  47. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/text.rb +1 -1
  48. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/th.rb +1 -1
  49. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/tr.rb +1 -1
  50. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/video.rb +1 -1
  51. data/lib/{reverse_asciidoctor → reverse_adoc}/errors.rb +1 -1
  52. data/lib/reverse_adoc/html_converter.rb +56 -0
  53. data/lib/reverse_adoc/version.rb +3 -0
  54. data/reverse_adoc.gemspec +18 -15
  55. data/spec/assets/escapables.html +2 -0
  56. data/spec/bin/reverse_adoc_spec.rb +2 -2
  57. data/spec/bin/w2a_spec.rb +7 -7
  58. data/spec/components/anchors_spec.rb +2 -2
  59. data/spec/components/basic_spec.rb +3 -3
  60. data/spec/components/code_spec.rb +4 -5
  61. data/spec/components/escapables_spec.rb +10 -2
  62. data/spec/components/from_the_wild_spec.rb +2 -2
  63. data/spec/components/html_fragment_spec.rb +2 -3
  64. data/spec/components/lists_spec.rb +2 -2
  65. data/spec/components/paragraphs_spec.rb +2 -2
  66. data/spec/components/quotation_spec.rb +2 -2
  67. data/spec/components/tables_spec.rb +2 -2
  68. data/spec/components/unknown_tags_spec.rb +9 -10
  69. data/spec/lib/{reverse_asciidoctor_spec.rb → reverse_adoc.rb} +17 -17
  70. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/cleaner_spec.rb +4 -4
  71. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/config_spec.rb +5 -5
  72. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/aside_spec.rb +2 -2
  73. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/audio_spec.rb +2 -3
  74. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/blockquote_spec.rb +2 -2
  75. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/br_spec.rb +2 -2
  76. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/code_spec.rb +2 -3
  77. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/div_spec.rb +2 -3
  78. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/figure_spec.rb +2 -3
  79. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/img_spec.rb +2 -3
  80. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/li_spec.rb +2 -2
  81. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/mark_spec.rb +2 -2
  82. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/p_spec.rb +2 -3
  83. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/pre_spec.rb +2 -3
  84. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/q_spec.rb +2 -2
  85. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/strong_spec.rb +2 -2
  86. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/text_spec.rb +2 -2
  87. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/video_spec.rb +2 -3
  88. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters_spec.rb +5 -5
  89. data/spec/spec_helper.rb +3 -3
  90. metadata +123 -125
  91. data/.github/workflows/macos.yml +0 -31
  92. data/.github/workflows/ubuntu.yml +0 -33
  93. data/.github/workflows/windows.yml +0 -37
  94. data/Gemfile.lock +0 -84
  95. data/bin/reverse_adoc +0 -74
  96. data/lib/reverse_asciidoctor.rb +0 -30
  97. data/lib/reverse_asciidoctor/converters/example.rb +0 -17
  98. data/lib/reverse_asciidoctor/converters/express_ref.rb +0 -12
  99. data/lib/reverse_asciidoctor/converters/ext_description.rb +0 -16
  100. data/lib/reverse_asciidoctor/converters/ext_descriptions.rb +0 -12
  101. data/lib/reverse_asciidoctor/converters/note.rb +0 -17
  102. data/lib/reverse_asciidoctor/html_converter.rb +0 -56
  103. data/lib/reverse_asciidoctor/smrl_description_converter.rb +0 -45
  104. data/lib/reverse_asciidoctor/version.rb +0 -3
  105. data/spec/lib/reverse_asciidoctor/converters/example_spec.rb +0 -22
  106. data/spec/lib/reverse_asciidoctor/converters/express_ref_spec.rb +0 -14
  107. data/spec/lib/reverse_asciidoctor/converters/ext_description_spec.rb +0 -20
  108. data/spec/lib/reverse_asciidoctor/converters/ext_descriptions_spec.rb +0 -13
  109. data/spec/lib/reverse_asciidoctor/converters/note_spec.rb +0 -22
@@ -1,3 +0,0 @@
1
- module ReverseAsciidoctor
2
- VERSION = '0.2.8'
3
- end
@@ -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