reverse_adoc 0.2.8 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/macos.yml +8 -1
  3. data/.github/workflows/ubuntu.yml +8 -1
  4. data/.github/workflows/windows.yml +8 -1
  5. data/Gemfile +1 -1
  6. data/README.adoc +5 -5
  7. data/Rakefile +1 -1
  8. data/bin/reverse_adoc +18 -18
  9. data/bin/w2a +15 -15
  10. data/lib/{reverse_asciidoctor.rb → reverse_adoc.rb} +9 -9
  11. data/lib/{reverse_asciidoctor → reverse_adoc}/cleaner.rb +4 -4
  12. data/lib/{reverse_asciidoctor → reverse_adoc}/config.rb +1 -1
  13. data/lib/{reverse_asciidoctor → reverse_adoc}/converters.rb +6 -6
  14. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/a.rb +1 -1
  15. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/aside.rb +1 -1
  16. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/audio.rb +1 -1
  17. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/base.rb +2 -2
  18. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/blockquote.rb +2 -2
  19. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/br.rb +1 -1
  20. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/bypass.rb +1 -1
  21. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/code.rb +1 -1
  22. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/div.rb +1 -1
  23. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/drop.rb +1 -1
  24. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/em.rb +1 -1
  25. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/example.rb +1 -1
  26. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/express_ref.rb +1 -1
  27. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/ext_description.rb +1 -1
  28. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/ext_descriptions.rb +1 -1
  29. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/figure.rb +1 -1
  30. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/h.rb +1 -1
  31. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/head.rb +1 -1
  32. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/hr.rb +1 -1
  33. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/ignore.rb +1 -1
  34. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/img.rb +7 -7
  35. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/li.rb +1 -1
  36. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/mark.rb +1 -1
  37. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/math.rb +3 -3
  38. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/note.rb +1 -1
  39. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/ol.rb +1 -1
  40. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/p.rb +1 -1
  41. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/pass_through.rb +1 -1
  42. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/pre.rb +1 -1
  43. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/q.rb +1 -1
  44. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/strong.rb +1 -1
  45. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/sub.rb +1 -1
  46. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/sup.rb +1 -1
  47. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/table.rb +1 -1
  48. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/td.rb +1 -1
  49. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/text.rb +1 -1
  50. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/th.rb +1 -1
  51. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/tr.rb +1 -1
  52. data/lib/{reverse_asciidoctor → reverse_adoc}/converters/video.rb +1 -1
  53. data/lib/{reverse_asciidoctor → reverse_adoc}/errors.rb +1 -1
  54. data/lib/reverse_adoc/html_converter.rb +56 -0
  55. data/lib/reverse_adoc/smrl_description_converter.rb +45 -0
  56. data/lib/reverse_adoc/version.rb +3 -0
  57. data/reverse_adoc.gemspec +2 -2
  58. data/spec/components/anchors_spec.rb +2 -2
  59. data/spec/components/basic_spec.rb +2 -2
  60. data/spec/components/code_spec.rb +4 -4
  61. data/spec/components/escapables_spec.rb +2 -2
  62. data/spec/components/from_the_wild_spec.rb +2 -2
  63. data/spec/components/html_fragment_spec.rb +2 -2
  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 -9
  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 -2
  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 -2
  77. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/div_spec.rb +2 -2
  78. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/example_spec.rb +2 -2
  79. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/express_ref_spec.rb +2 -2
  80. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/ext_description_spec.rb +2 -2
  81. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/ext_descriptions_spec.rb +2 -2
  82. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/figure_spec.rb +2 -2
  83. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/img_spec.rb +2 -2
  84. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/li_spec.rb +2 -2
  85. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/mark_spec.rb +2 -2
  86. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/note_spec.rb +2 -2
  87. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/p_spec.rb +2 -2
  88. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/pre_spec.rb +2 -2
  89. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/q_spec.rb +2 -2
  90. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/strong_spec.rb +2 -2
  91. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/text_spec.rb +2 -2
  92. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters/video_spec.rb +2 -2
  93. data/spec/lib/{reverse_asciidoctor → reverse_adoc}/converters_spec.rb +5 -5
  94. data/spec/spec_helper.rb +3 -3
  95. metadata +100 -100
  96. data/lib/reverse_asciidoctor/html_converter.rb +0 -56
  97. data/lib/reverse_asciidoctor/smrl_description_converter.rb +0 -45
  98. data/lib/reverse_asciidoctor/version.rb +0 -3
@@ -1,56 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'reverse_asciidoctor/converters/a'
4
- require 'reverse_asciidoctor/converters/aside'
5
- require 'reverse_asciidoctor/converters/audio'
6
- require 'reverse_asciidoctor/converters/blockquote'
7
- require 'reverse_asciidoctor/converters/br'
8
- require 'reverse_asciidoctor/converters/bypass'
9
- require 'reverse_asciidoctor/converters/code'
10
- require 'reverse_asciidoctor/converters/div'
11
- require 'reverse_asciidoctor/converters/drop'
12
- require 'reverse_asciidoctor/converters/em'
13
- require 'reverse_asciidoctor/converters/figure'
14
- require 'reverse_asciidoctor/converters/h'
15
- require 'reverse_asciidoctor/converters/head'
16
- require 'reverse_asciidoctor/converters/hr'
17
- require 'reverse_asciidoctor/converters/ignore'
18
- require 'reverse_asciidoctor/converters/img'
19
- require 'reverse_asciidoctor/converters/mark'
20
- require 'reverse_asciidoctor/converters/li'
21
- require 'reverse_asciidoctor/converters/ol'
22
- require 'reverse_asciidoctor/converters/p'
23
- require 'reverse_asciidoctor/converters/pass_through'
24
- require 'reverse_asciidoctor/converters/pre'
25
- require 'reverse_asciidoctor/converters/q'
26
- require 'reverse_asciidoctor/converters/strong'
27
- require 'reverse_asciidoctor/converters/sup'
28
- require 'reverse_asciidoctor/converters/sub'
29
- require 'reverse_asciidoctor/converters/table'
30
- require 'reverse_asciidoctor/converters/td'
31
- require 'reverse_asciidoctor/converters/th'
32
- require 'reverse_asciidoctor/converters/text'
33
- require 'reverse_asciidoctor/converters/tr'
34
- require 'reverse_asciidoctor/converters/video'
35
- require 'reverse_asciidoctor/converters/math'
36
-
37
- module ReverseAsciidoctor
38
- class HtmlConverter
39
- def self.convert(input, options = {})
40
- root = if input.is_a?(String)
41
- then Nokogiri::HTML(input).root
42
- elsif input.is_a?(Nokogiri::XML::Document)
43
- then input.root
44
- elsif input.is_a?(Nokogiri::XML::Node)
45
- then input
46
- end
47
-
48
- root || (return '')
49
-
50
- ReverseAsciidoctor.config.with(options) do
51
- result = ReverseAsciidoctor::Converters.lookup(root.name).convert(root)
52
- ReverseAsciidoctor.cleaner.tidy(result)
53
- end
54
- end
55
- end
56
- end
@@ -1,45 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'reverse_asciidoctor/converters/a'
4
- require 'reverse_asciidoctor/converters/blockquote'
5
- require 'reverse_asciidoctor/converters/bypass'
6
- require 'reverse_asciidoctor/converters/br'
7
- require 'reverse_asciidoctor/converters/code'
8
- require 'reverse_asciidoctor/converters/drop'
9
- require 'reverse_asciidoctor/converters/em'
10
- require 'reverse_asciidoctor/converters/example'
11
- require 'reverse_asciidoctor/converters/ext_descriptions'
12
- require 'reverse_asciidoctor/converters/ext_description'
13
- require 'reverse_asciidoctor/converters/express_ref'
14
- require 'reverse_asciidoctor/converters/head'
15
- require 'reverse_asciidoctor/converters/hr'
16
- require 'reverse_asciidoctor/converters/ignore'
17
- require 'reverse_asciidoctor/converters/note'
18
- require 'reverse_asciidoctor/converters/p'
19
- require 'reverse_asciidoctor/converters/pass_through'
20
- require 'reverse_asciidoctor/converters/q'
21
- require 'reverse_asciidoctor/converters/strong'
22
- require 'reverse_asciidoctor/converters/sup'
23
- require 'reverse_asciidoctor/converters/sub'
24
- require 'reverse_asciidoctor/converters/text'
25
-
26
- module ReverseAsciidoctor
27
- class SmrlDescriptionConverter
28
- def self.convert(input, options = {})
29
- root = if input.is_a?(String)
30
- then Nokogiri::XML(input).root
31
- elsif input.is_a?(Nokogiri::XML::Document)
32
- then input.root
33
- elsif input.is_a?(Nokogiri::XML::Node)
34
- then input
35
- end
36
-
37
- root || (return '')
38
-
39
- ReverseAsciidoctor.config.with(options) do
40
- result = ReverseAsciidoctor::Converters.lookup(root.name).convert(root)
41
- ReverseAsciidoctor.cleaner.tidy(result)
42
- end
43
- end
44
- end
45
- end
@@ -1,3 +0,0 @@
1
- module ReverseAsciidoctor
2
- VERSION = '0.2.8'
3
- end