reverse_adoc 0.3.0 → 0.3.5

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: 151922bd17ae4f65700977c109db7d8c55698e7eab9b22f7879df019b84c0923
4
- data.tar.gz: b18bfb38f7d53ba8eae5cca00798824c8d4c6726a6d9c7baf0ab3a86f69c0d9a
3
+ metadata.gz: 7499c144d3114121db528db188b0602d9a5200b0f5e7a96053fb88f4d72cb27a
4
+ data.tar.gz: 83af0602458355d71d013bc5736d5bd22bc65006b6e89e8f984cf078680fe190
5
5
  SHA512:
6
- metadata.gz: f8cf25df3279d0bd4b33c105be476e15dcb0c8e4aca7812e3332daf3bc5ac4ea671281266ec8c70b83c7d906fa87593ce65e24a0a0a009382eb0921e6072e669
7
- data.tar.gz: 5431dacaa7627908c4bb1e2583d56e7b982bd73f6ad44bf6a348ccc99cb632743ea701db79d53c46d5f0e263961abd676570f9c1d02417855dfc9d9b91deb3fa
6
+ metadata.gz: 2c0fe6bf549ac2836d812985501efef76710340e4ed9d86ae62ae28fe995a5e54152a50bda148e0c3bd14e97aa86cea243cdb30af675d17a7b2070a9d33e2b04
7
+ data.tar.gz: b2b3cd453b1229add0a86fbc6f492be261241778a46fa2c70727362fb9465b9d839f94d10089ae36848575fd719babe0ecb867a65565d95f96b5d20ed6ce8510
data/.editorconfig ADDED
@@ -0,0 +1,15 @@
1
+ # EditorConfig is awesome: http://EditorConfig.org
2
+
3
+ # top-most EditorConfig file
4
+ root = true
5
+
6
+ # Unix-style newlines with a newline ending every file
7
+ [*]
8
+ charset = utf-8
9
+ end_of_line = lf
10
+
11
+ [{*.adoc,*.html,*.js,*.json,*.rake,*.rb,*.rf,*.yaml,*.yml,Rakefile,rakefile}]
12
+ indent_style = space
13
+ indent_size = 2
14
+ insert_final_newline = true
15
+ trim_trailing_whitespace = true
@@ -16,19 +16,9 @@ jobs:
16
16
  strategy:
17
17
  fail-fast: false
18
18
  matrix:
19
- ruby: [ '2.7', '2.6', '2.5', '2.4' ]
19
+ ruby: [ '3.0', '2.7', '2.6', '2.5' ]
20
20
  os: [ ubuntu-latest, windows-latest, macos-latest ]
21
21
  experimental: [ false ]
22
- include:
23
- - ruby: '3.0'
24
- os: 'ubuntu-latest'
25
- experimental: true
26
- - ruby: '3.0'
27
- os: 'windows-latest'
28
- experimental: true
29
- - ruby: '3.0'
30
- os: 'macos-latest'
31
- experimental: true
32
22
  steps:
33
23
  - uses: actions/checkout@master
34
24
 
@@ -0,0 +1,45 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
3
+ name: release
4
+
5
+ on:
6
+ workflow_dispatch:
7
+ inputs:
8
+ next_version:
9
+ description: |
10
+ Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
11
+ required: true
12
+ default: 'skip'
13
+ push:
14
+ tags: [ v* ]
15
+
16
+ jobs:
17
+ release:
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - uses: actions/checkout@v2
21
+
22
+ - uses: ruby/setup-ruby@v1
23
+ with:
24
+ ruby-version: '2.6'
25
+ bundler-cache: true
26
+
27
+ - run: gem install gem-release
28
+
29
+ - if: ${{ github.event_name == 'workflow_dispatch' }} && ${{ github.event.inputs.next_version != 'skip' }}
30
+ run: |
31
+ git config user.name github-actions
32
+ git config user.email github-actions@github.com
33
+ gem bump --version ${{ github.event.inputs.next_version }} --tag --push
34
+
35
+ - name: publish to rubygems.org
36
+ env:
37
+ RUBYGEMS_API_KEY: ${{secrets.METANORMA_CI_RUBYGEMS_API_KEY}}
38
+ run: |
39
+ gem install gem-release
40
+ envsubst << 'EOF' > ~/.gem/credentials
41
+ ---
42
+ :rubygems_api_key: ${RUBYGEMS_API_KEY}
43
+ EOF
44
+ chmod 0600 ~/.gem/credentials
45
+ gem release
data/.gitignore ADDED
@@ -0,0 +1,10 @@
1
+ /coverage
2
+ /Gemfile.lock
3
+
4
+ .DS_Store
5
+
6
+ # RuboCop's remote style books
7
+ .rubocop-https---*
8
+
9
+ # Some odd files created by specs
10
+ /test1
data/.hound.yml CHANGED
@@ -1,3 +1,5 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
1
3
  ruby:
2
- Enabled: true
4
+ enabled: true
3
5
  config_file: .rubocop.yml
data/.rubocop.yml CHANGED
@@ -1,10 +1,10 @@
1
- # This project follows the Ribose OSS style guide.
2
- # https://github.com/riboseinc/oss-guides
3
- # All project-specific additions and overrides should be specified in this file.
4
-
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
5
3
  inherit_from:
6
4
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
5
+
6
+ # local repo-specific modifications
7
+ # ...
8
+
7
9
  AllCops:
8
- TargetRubyVersion: 2.3
9
- Rails:
10
- Enabled: true
10
+ TargetRubyVersion: 2.5
data/Gemfile CHANGED
@@ -4,5 +4,3 @@ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
4
 
5
5
  # Specify your gem's dependencies in reverse_adoc.gemspec
6
6
  gemspec
7
-
8
- gem "byebug"
File without changes
data/{bin → exe}/w2a RENAMED
File without changes
@@ -1,6 +1,5 @@
1
1
  module ReverseAdoc
2
2
  class Cleaner
3
-
4
3
  def tidy(string)
5
4
  result = remove_inner_whitespaces(string)
6
5
  result = remove_newlines(result)
@@ -14,7 +13,7 @@ module ReverseAdoc
14
13
  end
15
14
 
16
15
  def remove_leading_newlines(string)
17
- string.gsub(/\A\n+/, '')
16
+ string.gsub(/\A\n+/, "")
18
17
  end
19
18
 
20
19
  def remove_inner_whitespaces(string)
@@ -25,7 +24,7 @@ module ReverseAdoc
25
24
  end
26
25
  string.each_line.inject("") do |memo, line|
27
26
  memo + preserve_border_whitespaces(line) do
28
- line.strip.gsub(/[ \t]{2,}/, ' ')
27
+ line.strip.gsub(/[ \t]{2,}/, " ")
29
28
  end
30
29
  end
31
30
  end
@@ -37,64 +36,67 @@ module ReverseAdoc
37
36
  def clean_tag_borders(string)
38
37
  result = string.gsub(/\s?\*{2,}.*?\*{2,}\s?/) do |match|
39
38
  preserve_border_whitespaces(match, default_border: ReverseAdoc.config.tag_border) do
40
- match.strip.sub('** ', '**').sub(' **', '**')
39
+ match.strip.sub("** ", "**").sub(" **", "**")
41
40
  end
42
41
  end
43
42
 
44
- result = result.gsub(/\s?\_{2,}.*?\_{2,}\s?/) do |match|
43
+ result = result.gsub(/\s?_{2,}.*?_{2,}\s?/) do |match|
45
44
  preserve_border_whitespaces(match, default_border: ReverseAdoc.config.tag_border) do
46
- match.strip.sub('__ ', '__').sub(' __', '__')
45
+ match.strip.sub("__ ", "__").sub(" __", "__")
47
46
  end
48
47
  end
49
48
 
50
49
  result = result.gsub(/\s?~{2,}.*?~{2,}\s?/) do |match|
51
50
  preserve_border_whitespaces(match, default_border: ReverseAdoc.config.tag_border) do
52
- match.strip.sub('~~ ', '~~').sub(' ~~', '~~')
51
+ match.strip.sub("~~ ", "~~").sub(" ~~", "~~")
53
52
  end
54
53
  end
55
54
 
56
55
  result.gsub(/\s?\[.*?\]\s?/) do |match|
57
56
  preserve_border_whitespaces(match) do
58
- match.strip.sub('[ ', '[').sub(' ]', ']')
57
+ match.strip.sub("[ ", "[").sub(" ]", "]")
59
58
  end
60
59
  end
61
60
  end
62
61
 
63
62
  def clean_punctuation_characters(string)
64
- string.gsub(/(\*\*|~~|__)\s([\.!\?'"])/, "\\1".strip + "\\2")
63
+ string.gsub(/(\*\*|~~|__)\s([.!?'"])/, "\\1".strip + "\\2")
65
64
  end
66
65
 
67
- # preprocesses HTML, rather than postprocessing it
66
+ # preprocesses HTML, rather than postprocessing it
68
67
  def preprocess_word_html(string)
69
68
  clean_headings(scrub_whitespace(string.dup))
70
69
  end
71
70
 
72
71
  def scrub_whitespace(string)
73
- string.gsub!(/&nbsp;|\&#xA0;|\u00a0/i, '&#xA0;') # HTML encoded spaces
74
- string.sub!(/^\A[[:space:]]+/m, '') # document leading whitespace
75
- string.sub!(/[[:space:]]+\z$/m, '') # document trailing whitespace
76
- string.gsub!(/([ ]+)$/, ' ') # line trailing whitespace
77
- string.gsub!(/\n\n\n\n/, "\n\n") # Quadruple line breaks
78
- #string.delete!('?| ') # Unicode non-breaking spaces, injected as tabs
72
+ string.gsub!(/&nbsp;|&#xA0;|\u00a0/i, "&#xA0;") # HTML encoded spaces
73
+ string.sub!(/^\A[[:space:]]+/m, "") # document leading whitespace
74
+ string.sub!(/[[:space:]]+\z$/m, "") # document trailing whitespace
75
+ string.gsub!(/( +)$/, " ") # line trailing whitespace
76
+ string.gsub!(/\n\n\n\n/, "\n\n") # Quadruple line breaks
77
+ # string.delete!('?| ') # Unicode non-breaking spaces, injected as tabs
79
78
  string
80
79
  end
81
80
 
82
81
  # following added by me
83
82
  def clean_headings(string)
84
- string.gsub!(%r{<h([1-9])[^>]*></h\1>}, " ") # I don't know why Libre Office is inserting them, but they need to go
83
+ string.gsub!(%r{<h([1-9])[^>]*></h\1>}, " ")
84
+ # I don't know why Libre Office is inserting them, but they need to go
85
85
  string.gsub!(%r{<h([1-9])[^>]* style="vertical-align: super;[^>]*>(.+?)</h\1>},
86
- "<sup>\\2</sup>") # I absolutely don't know why Libre Office is rendering superscripts as h1
86
+ "<sup>\\2</sup>")
87
+ # I absolutely don't know why Libre Office is rendering superscripts as h1
87
88
  string
88
89
  end
89
90
 
90
91
  private
91
92
 
92
- def preserve_border_whitespaces(string, options = {}, &block)
93
- return string if string =~ /\A\s*\Z/
94
- default_border = options.fetch(:default_border, '')
93
+ def preserve_border_whitespaces(string, options = {})
94
+ return string if /\A\s*\Z/.match?(string)
95
+
96
+ default_border = options.fetch(:default_border, "")
95
97
  # If the string contains part of a link so the characters [,],(,)
96
98
  # then don't add any extra spaces
97
- default_border = '' if string =~ /[\[\(\]\)]/
99
+ default_border = "" if /[\[(\])]/.match?(string)
98
100
  string_start = present_or_default(string[/\A\s*/], default_border)
99
101
  string_end = present_or_default(string[/\s*\Z/], default_border)
100
102
  result = yield
@@ -108,6 +110,5 @@ module ReverseAdoc
108
110
  string
109
111
  end
110
112
  end
111
-
112
113
  end
113
114
  end
@@ -12,7 +12,9 @@ module ReverseAdoc
12
12
  end
13
13
 
14
14
  def escape_keychars(string)
15
- string.gsub(/(?<!\\)[*_]/, '*' => '\*', '_' => '\_')
15
+ subs = { '*' => '\*', '_' => '\_' }
16
+ string
17
+ .gsub(/((?<=\s)[\*_]+)|[\*_]+(?=\s)/) { |n| n.chars.map { |char| subs[char] }.join }
16
18
  end
17
19
 
18
20
  def extract_title(node)
@@ -1,51 +1,51 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'reverse_adoc/converters/a'
4
- require 'reverse_adoc/converters/aside'
5
- require 'reverse_adoc/converters/audio'
6
- require 'reverse_adoc/converters/blockquote'
7
- require 'reverse_adoc/converters/br'
8
- require 'reverse_adoc/converters/bypass'
9
- require 'reverse_adoc/converters/code'
10
- require 'reverse_adoc/converters/div'
11
- require 'reverse_adoc/converters/drop'
12
- require 'reverse_adoc/converters/em'
13
- require 'reverse_adoc/converters/figure'
14
- require 'reverse_adoc/converters/h'
15
- require 'reverse_adoc/converters/head'
16
- require 'reverse_adoc/converters/hr'
17
- require 'reverse_adoc/converters/ignore'
18
- require 'reverse_adoc/converters/img'
19
- require 'reverse_adoc/converters/mark'
20
- require 'reverse_adoc/converters/li'
21
- require 'reverse_adoc/converters/ol'
22
- require 'reverse_adoc/converters/p'
23
- require 'reverse_adoc/converters/pass_through'
24
- require 'reverse_adoc/converters/pre'
25
- require 'reverse_adoc/converters/q'
26
- require 'reverse_adoc/converters/strong'
27
- require 'reverse_adoc/converters/sup'
28
- require 'reverse_adoc/converters/sub'
29
- require 'reverse_adoc/converters/table'
30
- require 'reverse_adoc/converters/td'
31
- require 'reverse_adoc/converters/th'
32
- require 'reverse_adoc/converters/text'
33
- require 'reverse_adoc/converters/tr'
34
- require 'reverse_adoc/converters/video'
35
- require 'reverse_adoc/converters/math'
3
+ require "reverse_adoc/converters/a"
4
+ require "reverse_adoc/converters/aside"
5
+ require "reverse_adoc/converters/audio"
6
+ require "reverse_adoc/converters/blockquote"
7
+ require "reverse_adoc/converters/br"
8
+ require "reverse_adoc/converters/bypass"
9
+ require "reverse_adoc/converters/code"
10
+ require "reverse_adoc/converters/div"
11
+ require "reverse_adoc/converters/drop"
12
+ require "reverse_adoc/converters/em"
13
+ require "reverse_adoc/converters/figure"
14
+ require "reverse_adoc/converters/h"
15
+ require "reverse_adoc/converters/head"
16
+ require "reverse_adoc/converters/hr"
17
+ require "reverse_adoc/converters/ignore"
18
+ require "reverse_adoc/converters/img"
19
+ require "reverse_adoc/converters/mark"
20
+ require "reverse_adoc/converters/li"
21
+ require "reverse_adoc/converters/ol"
22
+ require "reverse_adoc/converters/p"
23
+ require "reverse_adoc/converters/pass_through"
24
+ require "reverse_adoc/converters/pre"
25
+ require "reverse_adoc/converters/q"
26
+ require "reverse_adoc/converters/strong"
27
+ require "reverse_adoc/converters/sup"
28
+ require "reverse_adoc/converters/sub"
29
+ require "reverse_adoc/converters/table"
30
+ require "reverse_adoc/converters/td"
31
+ require "reverse_adoc/converters/th"
32
+ require "reverse_adoc/converters/text"
33
+ require "reverse_adoc/converters/tr"
34
+ require "reverse_adoc/converters/video"
35
+ require "reverse_adoc/converters/math"
36
36
 
37
37
  module ReverseAdoc
38
38
  class HtmlConverter
39
39
  def self.convert(input, options = {})
40
40
  root = if input.is_a?(String)
41
41
  then Nokogiri::HTML(input).root
42
- elsif input.is_a?(Nokogiri::XML::Document)
42
+ elsif input.is_a?(Nokogiri::XML::Document)
43
43
  then input.root
44
- elsif input.is_a?(Nokogiri::XML::Node)
44
+ elsif input.is_a?(Nokogiri::XML::Node)
45
45
  then input
46
- end
46
+ end
47
47
 
48
- root || (return '')
48
+ root || (return "")
49
49
 
50
50
  ReverseAdoc.config.with(options) do
51
51
  result = ReverseAdoc::Converters.lookup(root.name).convert(root)
@@ -53,4 +53,4 @@ module ReverseAdoc
53
53
  end
54
54
  end
55
55
  end
56
- end
56
+ end
@@ -1,3 +1,3 @@
1
1
  module ReverseAdoc
2
- VERSION = '0.3.0'
2
+ VERSION = "0.3.5".freeze
3
3
  end
data/reverse_adoc.gemspec CHANGED
@@ -1,5 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
2
+
3
+ $:.push File.expand_path("lib", __dir__)
3
4
  require "reverse_adoc/version"
4
5
 
5
6
  Gem::Specification.new do |s|
@@ -9,29 +10,30 @@ Gem::Specification.new do |s|
9
10
  s.email = ["open.source@ribose.com"]
10
11
 
11
12
  s.homepage = "http://github.com/metanorma/reverse_adoc"
12
- s.summary = %q{Generate AsciiDoc from HTML and Microsoft Word via CLI or library.}
13
- s.description = %q{Generate AsciiDoc from HTML and Microsoft Word via CLI or library.}
13
+ s.summary = "Generate AsciiDoc from HTML and Microsoft Word via CLI or library."
14
+ s.description = "Generate AsciiDoc from HTML and Microsoft Word via CLI or library."
14
15
  s.license = "BSD-2-Clause"
15
16
 
16
17
  s.files = `git ls-files`.split("\n")
17
18
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.executables = `git ls-files -- exe/*`.split("\n").map { |f| File.basename(f) }
20
+ s.bindir = "exe"
19
21
  s.require_paths = ["lib"]
20
- s.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
22
+ s.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
21
23
 
22
24
  # specify any dependencies here; for example:
23
- s.add_dependency 'nokogiri', "~> 1.10.4"
24
- s.add_dependency 'mathml2asciimath'
25
- s.add_dependency 'marcel', "~> 1.0.0"
26
- s.add_development_dependency 'rspec'
27
- s.add_development_dependency 'simplecov'
28
- s.add_development_dependency 'rake'
29
- s.add_development_dependency 'redcarpet'
30
- s.add_development_dependency 'codeclimate-test-reporter'
25
+ s.add_dependency "marcel", "~> 1.0.0"
26
+ s.add_dependency "mathml2asciimath"
27
+ s.add_dependency "nokogiri", "~> 1.12"
28
+ s.add_development_dependency "codeclimate-test-reporter"
29
+ s.add_development_dependency "rake"
30
+ s.add_development_dependency "redcarpet"
31
+ s.add_development_dependency "rspec"
32
+ s.add_development_dependency "simplecov"
31
33
 
32
34
  # spec.add_runtime_dependency "thor"
33
35
 
34
36
  # All the following are for bin/w2m
35
- s.add_dependency 'word-to-markdown'
36
- s.add_dependency 'premailer', '~> 1.11.0'
37
+ s.add_dependency "premailer", "~> 1.11.0"
38
+ s.add_dependency "word-to-markdown"
37
39
  end
@@ -4,8 +4,10 @@
4
4
 
5
5
  **two asterisks**
6
6
  ***three asterisks***
7
+ ***three *and*the* asterisc*word and asterisc**multword asterisks***
7
8
  __two underscores__
8
9
  ___three underscores___
10
+ ___three__underscores___ and another_undersocre
9
11
 
10
12
  some text...
11
13
 
@@ -2,9 +2,9 @@
2
2
 
3
3
  require 'spec_helper'
4
4
 
5
- describe 'bin/revrse_adoc' do
5
+ describe 'exe/revrse_adoc' do
6
6
  subject(:convert) do
7
- ShellUtils.execute!("./bin/reverse_adoc -e -o test1 #{input_file_path}")
7
+ ShellUtils.execute!("./exe/reverse_adoc -e -o test1 #{input_file_path}")
8
8
  end
9
9
  unless Gem.win_platform?
10
10
  context 'when external images present' do
data/spec/bin/w2a_spec.rb CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  require 'spec_helper'
4
4
 
5
- describe 'bin/w2a' do
5
+ describe 'exe/w2a' do
6
6
  subject(:convert) do
7
- ShellUtils.execute!("./bin/w2a -e -o test1 #{input_file_path}")
7
+ ShellUtils.execute!("./exe/w2a -e -o test1 #{input_file_path}")
8
8
  end
9
9
  # TODO: fix github actions integration with libreoffice, currently it hangs
10
10
  # when trying to use soffice binary
@@ -25,10 +25,10 @@ describe 'bin/w2a' do
25
25
  it 'extracts images from source html' do
26
26
  expect { convert }
27
27
  .to(change do
28
- Dir["#{images_folder}/*gif"]
29
- .map { |entry| File.basename(entry) }
30
- .sort
31
- end.from([]).to(['001.gif']))
28
+ Dir["#{images_folder}/*gif"]
29
+ .map { |entry| File.basename(entry) }
30
+ .size > 0
31
+ end.from(false).to(true))
32
32
  end
33
33
  end
34
34
  end
@@ -8,7 +8,7 @@ describe ReverseAdoc do
8
8
 
9
9
  it { is_expected.to match /plain text ?\n/ }
10
10
  it { is_expected.to match /\n== h1\n/ }
11
- it { is_expected.to match /\n\[\[A]\]\n== h1 with anchor\n/ }
11
+ it { is_expected.to match /\n\[\[A\]\]\n== h1 with anchor\n/ }
12
12
  it { is_expected.to match /\n=== h2\n/ }
13
13
  it { is_expected.to match /\n==== h3\n/ }
14
14
  it { is_expected.to match /\n===== h4\n/ }
@@ -25,4 +25,3 @@ describe ReverseAdoc do
25
25
  end
26
26
 
27
27
  end
28
-
@@ -9,6 +9,9 @@ describe ReverseAdoc do
9
9
  context "multiple asterisks" do
10
10
  it { is_expected.to include ' \*\*two asterisks\*\* ' }
11
11
  it { is_expected.to include ' \*\*\*three asterisks\*\*\* ' }
12
+ it { is_expected.to include ' \*and*the\* ' }
13
+ it { is_expected.to include ' asterisc*word ' }
14
+ it { is_expected.to include ' asterisc**multword asterisks\*\*\* ' }
12
15
  end
13
16
 
14
17
  context "multiple underscores" do
@@ -16,6 +19,11 @@ describe ReverseAdoc do
16
19
  it { is_expected.to include ' \_\_\_three underscores\_\_\_ ' }
17
20
  end
18
21
 
22
+ context "multiple underscores with undersocre inside words and new lines" do
23
+ it { is_expected.to include 'another_undersocre' }
24
+ it { is_expected.to include ' \_\_\_three__underscores\_\_\_ ' }
25
+ end
26
+
19
27
  context "underscores within words in code blocks" do
20
28
  it { is_expected.to include "....\n<code>var theoretical_max_infin = 1.0;</code>\n....\n" }
21
29
  end
@@ -8,4 +8,3 @@ describe ReverseAdoc do
8
8
 
9
9
  it { is_expected.to eq("naked text 1\n\nparagraph text\n\nnaked text 2") }
10
10
  end
11
-
@@ -36,4 +36,3 @@ describe ReverseAdoc do
36
36
  it { expect { result }.to raise_error(ReverseAdoc::InvalidConfigurationError) }
37
37
  end
38
38
  end
39
-
@@ -15,4 +15,3 @@ describe ReverseAdoc::Converters::Audio do
15
15
  end
16
16
 
17
17
  end
18
-
@@ -15,4 +15,3 @@ describe ReverseAdoc::Converters::Code do
15
15
  end
16
16
 
17
17
  end
18
-
@@ -15,4 +15,3 @@ describe ReverseAdoc::Converters::Code do
15
15
  end
16
16
 
17
17
  end
18
-
@@ -10,4 +10,3 @@ describe ReverseAdoc::Converters::Figure do
10
10
 
11
11
  end
12
12
  end
13
-
@@ -25,4 +25,3 @@ describe ReverseAdoc::Converters::Img do
25
25
  end
26
26
 
27
27
  end
28
-
@@ -9,4 +9,3 @@ describe ReverseAdoc::Converters::P do
9
9
  expect(converter.convert(node)).to include "\n[[A]]\nputs foo"
10
10
  end
11
11
  end
12
-
@@ -42,4 +42,3 @@ describe ReverseAdoc::Converters::Pre do
42
42
  end
43
43
  end
44
44
  end
45
-
@@ -15,4 +15,3 @@ describe ReverseAdoc::Converters::Video do
15
15
  end
16
16
 
17
17
  end
18
-
data/spec/spec_helper.rb CHANGED
@@ -1,5 +1,4 @@
1
1
  require 'simplecov'
2
- # require 'byebug'
3
2
 
4
3
  SimpleCov.profiles.define 'gem' do
5
4
  add_filter '/spec/'
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reverse_adoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
- bindir: bin
9
+ bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-29 00:00:00.000000000 Z
11
+ date: 2021-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: nokogiri
14
+ name: marcel
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.10.4
19
+ version: 1.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.10.4
26
+ version: 1.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mathml2asciimath
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -39,21 +39,21 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: marcel
42
+ name: nokogiri
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.0.0
47
+ version: '1.12'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.0.0
54
+ version: '1.12'
55
55
  - !ruby/object:Gem::Dependency
56
- name: rspec
56
+ name: codeclimate-test-reporter
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
@@ -67,7 +67,7 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: simplecov
70
+ name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ">="
@@ -81,7 +81,7 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: rake
84
+ name: redcarpet
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
@@ -95,7 +95,7 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: redcarpet
98
+ name: rspec
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
@@ -109,7 +109,7 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
- name: codeclimate-test-reporter
112
+ name: simplecov
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="
@@ -123,33 +123,33 @@ dependencies:
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
- name: word-to-markdown
126
+ name: premailer
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ">="
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '0'
131
+ version: 1.11.0
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ">="
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '0'
138
+ version: 1.11.0
139
139
  - !ruby/object:Gem::Dependency
140
- name: premailer
140
+ name: word-to-markdown
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - "~>"
143
+ - - ">="
144
144
  - !ruby/object:Gem::Version
145
- version: 1.11.0
145
+ version: '0'
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - "~>"
150
+ - - ">="
151
151
  - !ruby/object:Gem::Version
152
- version: 1.11.0
152
+ version: '0'
153
153
  description: Generate AsciiDoc from HTML and Microsoft Word via CLI or library.
154
154
  email:
155
155
  - open.source@ribose.com
@@ -159,15 +159,18 @@ executables:
159
159
  extensions: []
160
160
  extra_rdoc_files: []
161
161
  files:
162
+ - ".editorconfig"
162
163
  - ".github/workflows/rake.yml"
164
+ - ".github/workflows/release.yml"
165
+ - ".gitignore"
163
166
  - ".hound.yml"
164
167
  - ".rubocop.yml"
165
168
  - Gemfile
166
169
  - LICENSE.txt
167
170
  - README.adoc
168
171
  - Rakefile
169
- - bin/reverse_adoc
170
- - bin/w2a
172
+ - exe/reverse_adoc
173
+ - exe/w2a
171
174
  - lib/reverse_adoc.rb
172
175
  - lib/reverse_adoc/cleaner.rb
173
176
  - lib/reverse_adoc/config.rb
@@ -272,14 +275,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
272
275
  requirements:
273
276
  - - ">="
274
277
  - !ruby/object:Gem::Version
275
- version: 2.4.0
278
+ version: 2.5.0
276
279
  required_rubygems_version: !ruby/object:Gem::Requirement
277
280
  requirements:
278
281
  - - ">="
279
282
  - !ruby/object:Gem::Version
280
283
  version: '0'
281
284
  requirements: []
282
- rubygems_version: 3.1.4
285
+ rubygems_version: 3.2.22
283
286
  signing_key:
284
287
  specification_version: 4
285
288
  summary: Generate AsciiDoc from HTML and Microsoft Word via CLI or library.