reverse_asciidoctor 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.hound.yml +3 -0
- data/.rubocop.yml +10 -0
- data/.travis.yml +18 -0
- data/Gemfile +4 -4
- data/{LICENSE → LICENSE.txt} +0 -7
- data/README.adoc +13 -4
- data/appveyor.yml +37 -0
- data/lib/reverse_asciidoctor/version.rb +1 -1
- data/reverse_asciidoctor.gemspec +4 -2
- metadata +14 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1272eb0151737dfdf85c76e06260fd09e20284cef1925c1b558ce6649e58f803
|
4
|
+
data.tar.gz: 6a45773e3126a9e699e509890e4684bb15a07fb23ae18b114ce5fd0675603e35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 892e1bb83c2a56532fc90953a0c483528d17787c97e68a5f0f0bb73eaca29df5afe420f2547e17353784c387e5fe46daacac7b7f223b9a4dadc24ec4802bfe71
|
7
|
+
data.tar.gz: 2d33e219bb487204bebdf53971a778957851d223cebf42634aa51ef839979a3826b8920247c0d67dd44273911dabf30e7cb1d39d8f8bd65857ccfce1ab8aafdb
|
data/.hound.yml
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +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
|
+
|
5
|
+
inherit_from:
|
6
|
+
- https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
|
7
|
+
AllCops:
|
8
|
+
TargetRubyVersion: 2.3
|
9
|
+
Rails:
|
10
|
+
Enabled: true
|
data/.travis.yml
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# Auto-generated !!! Do not edit it manually
|
2
|
+
# use ci-master https://github.com/metanorma/metanorma-build-scripts
|
3
|
+
language: ruby
|
4
|
+
cache: bundler
|
5
|
+
os:
|
6
|
+
- linux
|
7
|
+
- osx
|
8
|
+
rvm:
|
9
|
+
- 2.6
|
10
|
+
- 2.5
|
11
|
+
- 2.4
|
12
|
+
- ruby-head
|
13
|
+
before_install:
|
14
|
+
- gem install bundler -v "~> 2"
|
15
|
+
- bundle update
|
16
|
+
matrix:
|
17
|
+
allow_failures:
|
18
|
+
- rvm: ruby-head
|
data/Gemfile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
source "
|
1
|
+
source "https://rubygems.org"
|
2
|
+
|
3
|
+
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
|
2
4
|
|
3
|
-
gem
|
4
|
-
|
5
|
-
# Specify your gem's dependencies in reverse_markdown.gemspec
|
5
|
+
# Specify your gem's dependencies in reverse_asciidoctor.gemspec
|
6
6
|
gemspec
|
data/{LICENSE → LICENSE.txt}
RENAMED
@@ -23,10 +23,3 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
23
23
|
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
24
24
|
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
25
25
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
LICENSE OF https://github.com/xijo/reverse_markdown
|
30
|
-
|
31
|
-
https://github.com/xijo/reverse_markdown, on which this gem is based, was
|
32
|
-
licensed with the DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE, v2.
|
data/README.adoc
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
= reverse_asciidoctor
|
2
2
|
|
3
|
+
image:https://img.shields.io/gem/v/reverse_asciidoctor.svg["Gem Version", link="https://rubygems.org/gems/reverse_asciidoctor"]
|
4
|
+
image:https://img.shields.io/travis/metanorma/reverse_asciidoctor/master.svg["Build Status", link="https://travis-ci.org/metanorma/reverse_asciidoctor"]
|
5
|
+
image:https://codeclimate.com/github/metanorma/reverse_asciidoctor/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/reverse_asciidoctor"]
|
6
|
+
image:https://ci.appveyor.com/api/projects/status/s4st0ft8moay90m6?svg=true["Appveyor Build Status", link="https://ci.appveyor.com/project/ribose/reverse-asciidoctor"]
|
7
|
+
|
8
|
+
|
3
9
|
Based on https://github.com/xijo/reverse_markdown
|
4
10
|
|
5
11
|
Transforms HTML into asciidoctor.
|
@@ -29,7 +35,7 @@ gem 'reverse_asciidoctor'
|
|
29
35
|
|
30
36
|
=== Ruby
|
31
37
|
|
32
|
-
You can convert
|
38
|
+
You can convert HTML content as string or Nokogiri document:
|
33
39
|
|
34
40
|
[source,ruby]
|
35
41
|
----
|
@@ -40,7 +46,7 @@ result.inspect # " *feelings* "
|
|
40
46
|
|
41
47
|
=== Commandline
|
42
48
|
|
43
|
-
It's also possible to convert
|
49
|
+
It's also possible to convert HTML files to AsciiDoc markup using the binary:
|
44
50
|
|
45
51
|
[source,console]
|
46
52
|
----
|
@@ -137,7 +143,10 @@ think this is AsciiMath in the `stem:[ ]` macro, try to pass it into MathJax as
|
|
137
143
|
AsciiMath, and fail. But of course, MathJax has no problem with MathML, and some postprocessing
|
138
144
|
on the Asciidoctor output can ensure that the MathML is treated by MathJax (or whatever else
|
139
145
|
uses the output) as such; so this is still much better than nothing for stem processing.
|
140
|
-
**
|
146
|
+
** On the other hand, if you are using this gem in the context of https://www.metanorma.com[Metanorma],
|
147
|
+
Metanorma Asciidoctor accepts MathML as a native mathematical format. So you do not need
|
148
|
+
to convert the MathML to AsciiMath.
|
149
|
+
** The gem will optionally invoke the https://github.com/metanorma/mathml2asciimath
|
141
150
|
gem, to convert MathML to AsciiMath. The conversion is not perfect, and will need to be
|
142
151
|
post-edited; but it's a lot better than nothing.
|
143
152
|
|
@@ -168,7 +177,7 @@ The following options are available:
|
|
168
177
|
* `tag_border` (default `' '`) - how to handle tag borders. valid options are:
|
169
178
|
** `' '` - Add whitespace if there is none at tag borders.
|
170
179
|
** `''` - Do not not add whitespace.
|
171
|
-
* `mathml2asciimath` - if `true`, will use the https://github.com/
|
180
|
+
* `mathml2asciimath` - if `true`, will use the https://github.com/metanorma/mathml2asciimath gem
|
172
181
|
to convert MathML to AsciiMath
|
173
182
|
|
174
183
|
=== As options
|
data/appveyor.yml
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# Auto-generated !!! Do not edit it manually
|
2
|
+
# use ci-master https://github.com/metanorma/metanorma-build-scripts
|
3
|
+
version: '{build}'
|
4
|
+
|
5
|
+
cache:
|
6
|
+
- vendor/bundle
|
7
|
+
|
8
|
+
environment:
|
9
|
+
matrix:
|
10
|
+
- RUBY_VERSION: 26
|
11
|
+
- RUBY_VERSION: 25
|
12
|
+
- RUBY_VERSION: 24
|
13
|
+
- RUBY_VERSION: _trunk
|
14
|
+
|
15
|
+
matrix:
|
16
|
+
allow_failures:
|
17
|
+
- RUBY_VERSION: _trunk
|
18
|
+
|
19
|
+
install:
|
20
|
+
- ps: . { iwr -useb https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/appveyor.ps1 } | iex
|
21
|
+
- refreshenv
|
22
|
+
|
23
|
+
build_script:
|
24
|
+
- set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
|
25
|
+
- set GIT_TERMINAL_PROMPT=0
|
26
|
+
- gem install bundler -v "~> 2"
|
27
|
+
- bundle config --local path vendor/bundle
|
28
|
+
- bundle update
|
29
|
+
- bundle install
|
30
|
+
|
31
|
+
before_test:
|
32
|
+
- ruby -v
|
33
|
+
- gem -v
|
34
|
+
- bundle -v
|
35
|
+
|
36
|
+
test_script:
|
37
|
+
- bundle exec rake
|
data/reverse_asciidoctor.gemspec
CHANGED
@@ -8,17 +8,19 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.authors = ["Ribose Inc."]
|
9
9
|
s.email = ["open.source@ribose.com"]
|
10
10
|
|
11
|
-
s.homepage = "http://github.com/
|
11
|
+
s.homepage = "http://github.com/metanorma/reverse_asciidoctor"
|
12
12
|
s.summary = %q{Convert html code into asciidoctor.}
|
13
13
|
s.description = %q{Map simple html back into asciidoctor, e.g. if you want to import existing html data in your application.}
|
14
|
+
s.license = "BSD-2-Clause"
|
14
15
|
|
15
16
|
s.files = `git ls-files`.split("\n")
|
16
17
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
17
18
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
18
19
|
s.require_paths = ["lib"]
|
20
|
+
s.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
|
19
21
|
|
20
22
|
# specify any dependencies here; for example:
|
21
|
-
s.add_dependency 'nokogiri'
|
23
|
+
s.add_dependency 'nokogiri', ">= 1.10.4"
|
22
24
|
s.add_dependency 'mathml2asciimath'
|
23
25
|
s.add_development_dependency 'rspec'
|
24
26
|
s.add_development_dependency 'simplecov'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reverse_asciidoctor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.10.4
|
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:
|
26
|
+
version: 1.10.4
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mathml2asciimath
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -132,10 +132,14 @@ executables:
|
|
132
132
|
extensions: []
|
133
133
|
extra_rdoc_files: []
|
134
134
|
files:
|
135
|
+
- ".hound.yml"
|
136
|
+
- ".rubocop.yml"
|
137
|
+
- ".travis.yml"
|
135
138
|
- Gemfile
|
136
|
-
- LICENSE
|
139
|
+
- LICENSE.txt
|
137
140
|
- README.adoc
|
138
141
|
- Rakefile
|
142
|
+
- appveyor.yml
|
139
143
|
- bin/reverse_asciidoctor
|
140
144
|
- bin/w2a
|
141
145
|
- lib/reverse_asciidoctor.rb
|
@@ -224,8 +228,9 @@ files:
|
|
224
228
|
- spec/lib/reverse_asciidoctor/converters_spec.rb
|
225
229
|
- spec/lib/reverse_asciidoctor_spec.rb
|
226
230
|
- spec/spec_helper.rb
|
227
|
-
homepage: http://github.com/
|
228
|
-
licenses:
|
231
|
+
homepage: http://github.com/metanorma/reverse_asciidoctor
|
232
|
+
licenses:
|
233
|
+
- BSD-2-Clause
|
229
234
|
metadata: {}
|
230
235
|
post_install_message:
|
231
236
|
rdoc_options: []
|
@@ -235,7 +240,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
235
240
|
requirements:
|
236
241
|
- - ">="
|
237
242
|
- !ruby/object:Gem::Version
|
238
|
-
version:
|
243
|
+
version: 2.4.0
|
239
244
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
240
245
|
requirements:
|
241
246
|
- - ">="
|
@@ -243,7 +248,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
243
248
|
version: '0'
|
244
249
|
requirements: []
|
245
250
|
rubyforge_project:
|
246
|
-
rubygems_version: 2.6
|
251
|
+
rubygems_version: 2.7.6
|
247
252
|
signing_key:
|
248
253
|
specification_version: 4
|
249
254
|
summary: Convert html code into asciidoctor.
|