omml2mathml 0.0.6 → 0.0.10

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: ae5e556addfde081b6a69814bff297d6746b288c4eb08f62727189734168cd08
4
- data.tar.gz: acaf80a290d4218eb0179b3bd12b3d241292fe55828d7914b2a8c9466eaccf0f
3
+ metadata.gz: b16e36ab8d00d188dd662d1fab76f66c2bf0bcd68cc9b5200324a24c3dc5c653
4
+ data.tar.gz: 85722707ed5f01851abf01b8ca441a5f8c5b37b899ab4f4674463d6440da2618
5
5
  SHA512:
6
- metadata.gz: e3b5d615d2dcb1ca5ca93aa39439e5481b296db47976745bfbfa98331bb6e8bd9932d5d3428718fd66994ae9d81abbc01daeb16ce1fb6d61e327f449f753f3d6
7
- data.tar.gz: f4c787762477791c34259bac9c677332e755009b8ca82db415b0e06f72366e015a301dc6f7f0048dbd20dc185c89cc9c640db2286e2e60f67ef9a35b66cb7955
6
+ metadata.gz: a30158390b73c15928ba5489afc344f4713539afacdd30294355427192a71aa7afe2caa9f58174bd06c3a622e9a210124c94b4228c05582dc9a5b1c3893fec04
7
+ data.tar.gz: ee84b5c04b565c4b097a8a8d471d890707a3e5bbb8c4a6ada1ad2dde2ab54ad55bae34b18ac23fb2221aff4ead0a56d949f36ba6ab4b90d451b071b1ab1769d7
@@ -0,0 +1,32 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
3
+ name: rake
4
+
5
+ on:
6
+ push:
7
+ branches: [ master, main ]
8
+ tags: [ v* ]
9
+ pull_request:
10
+
11
+ jobs:
12
+ rake:
13
+ name: Test on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
14
+ runs-on: ${{ matrix.os }}
15
+ continue-on-error: ${{ matrix.experimental }}
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ ruby: [ '3.0', '2.7', '2.6', '2.5' ]
20
+ os: [ ubuntu-latest, windows-latest, macos-latest ]
21
+ experimental: [ false ]
22
+ steps:
23
+ - uses: actions/checkout@v2
24
+ with:
25
+ submodules: true
26
+
27
+ - uses: ruby/setup-ruby@v1
28
+ with:
29
+ ruby-version: ${{ matrix.ruby }}
30
+ bundler-cache: true
31
+
32
+ - run: bundle exec rake
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ .rubocop-https--*
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/README.adoc CHANGED
@@ -1,9 +1,10 @@
1
1
  = omml2mathml
2
2
 
3
3
  image:https://img.shields.io/gem/v/omml2mathml.svg["Gem Version", link="https://rubygems.org/gems/omml2mathml"]
4
- image:https://img.shields.io/travis/metanorma/omml2mathml/master.svg["Travis Build Status", link="https://travis-ci.org/metanorma/omml2mathml"]
5
- image:https://ci.appveyor.com/api/projects/status/vp0jam9miy9lvftj?svg=true["Appveyor Build Status", link="https://ci.appveyor.com/project/ribose/omml2mathml"]
6
- image:https://codeclimate.com/github/metanorma/omml2mathml/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/omml2mathml"]
4
+ image:https://github.com/plurimath/omml2mathml/workflows/rake/badge.svg["Build Status", link="https://github.com/plurimath/omml2mathml/actions?query=workflow%3Arake"]
5
+ image:https://codeclimate.com/github/plurimath/omml2mathml/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/plurimath/omml2mathml"]
6
+ image:https://img.shields.io/github/issues-pr-raw/plurimath/omml2mathml.svg["Pull Requests", link="https://github.com/plurimath/omml2mathml/pulls"]
7
+ image:https://img.shields.io/github/commits-since/plurimath/omml2mathml/latest.svg["Commits since latest",link="https://github.com/plurimath/omml2mathml/releases"]
7
8
 
8
9
  Convert Office Math Markup to MathML
9
10
 
@@ -1,4 +1,4 @@
1
1
  module Omml2Mathml
2
- VERSION = "0.0.6".freeze
2
+ VERSION = "0.0.10".freeze
3
3
  end
4
4
 
data/omml2mathml.gemspec CHANGED
@@ -14,25 +14,24 @@ Gem::Specification.new do |spec|
14
14
  This is a Ruby gem for converting Office Math Markup (OMML) into MathML within Word HTML documents.
15
15
  DESCRIPTION
16
16
 
17
- spec.homepage = "https://github.com/metanorma/omml2mathml"
17
+ spec.homepage = "https://github.com/plurimath/omml2mathml"
18
18
  spec.license = "BSD-2-Clause"
19
19
 
20
20
  spec.bindir = "bin"
21
21
  spec.require_paths = ["lib"]
22
22
  spec.files = `git ls-files`.split("\n")
23
23
  spec.test_files = `git ls-files -- {spec}/*`.split("\n")
24
- spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
24
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
25
25
 
26
- spec.add_dependency "nokogiri", ">= 1.10.4"
27
-
28
- spec.add_development_dependency "bundler", "~> 2.0.1"
26
+ spec.add_dependency "nokogiri", "~> 1.12"
27
+ spec.add_development_dependency "bundler"
29
28
  spec.add_development_dependency "byebug", "~> 9.1"
30
29
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
31
30
  spec.add_development_dependency "guard", "~> 2.14"
32
31
  spec.add_development_dependency "guard-rspec", "~> 4.7"
33
32
  spec.add_development_dependency "rake", "~> 12.0"
34
33
  spec.add_development_dependency "rspec", "~> 3.6"
35
- spec.add_development_dependency "rubocop", "= 0.54.0"
34
+ spec.add_development_dependency "rubocop", "~> 1.5.2"
36
35
  spec.add_development_dependency "simplecov", "~> 0.15"
37
36
  spec.add_development_dependency "timecop", "~> 0.9"
38
37
  end
@@ -1,4 +1,5 @@
1
1
  require "spec_helper"
2
+ require "nokogiri"
2
3
 
3
4
  RSpec.describe Omml2Mathml do
4
5
  it "has a version number" do
@@ -6,9 +7,9 @@ RSpec.describe Omml2Mathml do
6
7
  end
7
8
 
8
9
  it "processes a document" do
9
- html = Omml2Mathml.convert("spec/test.html").sub(/<\?xml[^>]+>/, "").sub(/<!DOCTYPE[^>]+>/, "")
10
- expect(html).to be_equivalent_to <<~"OUTPUT"
11
- <html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml">
10
+ output = Omml2Mathml.convert("spec/test.html").sub(/<\?xml[^>]+>/, "").sub(/<!DOCTYPE[^>]+>/, "")
11
+ html = <<~"OUTPUT"
12
+ <html xmlns="http://www.w3.org/TR/REC-html40" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml">
12
13
 
13
14
  <head>
14
15
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
@@ -19,11 +20,11 @@ RSpec.describe Omml2Mathml do
19
20
  <link rel="Edit-Time-Data" href="Part%201_General.fld/editdata.mso"/>
20
21
  </head>
21
22
 
22
- <body lang="EL" link="blue" vlink="purple" style="tab-interval:20.0pt" xml:lang="EL">
23
+ <body lang="EL" link="blue" vlink="purple" style="tab-interval:20.0pt">
23
24
 
24
25
  <div class="WordSection3">
25
26
 
26
- <p class="MsoNormal"><span lang="EN-US" style="mso-fareast-font-family:SimSun;&#10;mso-fareast-theme-font:minor-fareast;mso-ansi-language:EN-US;mso-fareast-language:&#10;ZH-CN" xml:lang="EN-US">This standard applies to the elliptic curves over the finite field </span><mml:math>
27
+ <p class="MsoNormal"><span lang="EN-US" style="mso-fareast-font-family:SimSun;&#10;mso-fareast-theme-font:minor-fareast;mso-ansi-language:EN-US;mso-fareast-language:&#10;ZH-CN">This standard applies to the elliptic curves over the finite field </span><mml:math>
27
28
  <mml:msub>
28
29
  <mml:mrow>
29
30
  <mml:mrow>
@@ -36,8 +37,10 @@ RSpec.describe Omml2Mathml do
36
37
  </mml:mrow>
37
38
  </mml:mrow>
38
39
  </mml:msub>
39
- </mml:math><span lang="EN-US" style="mso-fareast-font-family:SimSun;mso-fareast-theme-font:minor-fareast;&#10;mso-ansi-language:EN-US;mso-fareast-language:ZH-CN" xml:lang="EN-US"><span style="mso-spacerun:yes">&#xA0;</span>(the prime </span><mml:math>
40
- <mml:mi>p</mml:mi><mml:msup>
40
+ </mml:math><span lang="EN-US" style="mso-fareast-font-family:SimSun;mso-fareast-theme-font:minor-fareast;&#10;mso-ansi-language:EN-US;mso-fareast-language:ZH-CN"><span style="mso-spacerun:yes">&#xA0;</span>(the prime </span><mml:math>
41
+ <mml:mi>p</mml:mi>
42
+ <mml:mo>&gt;</mml:mo>
43
+ <mml:msup>
41
44
  <mml:mrow>
42
45
  <mml:mrow>
43
46
  <mml:mn>2</mml:mn>
@@ -49,11 +52,20 @@ RSpec.describe Omml2Mathml do
49
52
  </mml:mrow>
50
53
  </mml:mrow>
51
54
  </mml:msup>
52
- </mml:math><span lang="EN-US" style="mso-fareast-font-family:SimSun;mso-fareast-theme-font:minor-fareast;&#10;mso-ansi-language:EN-US;mso-fareast-language:ZH-CN" xml:lang="EN-US">).<p/></span></p>
55
+ </mml:math><span lang="EN-US" style="mso-fareast-font-family:SimSun;mso-fareast-theme-font:minor-fareast;&#10;mso-ansi-language:EN-US;mso-fareast-language:ZH-CN">).<p/></span></p>
53
56
 
54
57
  </div>
55
58
  </body>
56
59
  </html>
57
60
  OUTPUT
61
+
62
+ if Gem::Version.new(Nokogiri::VERSION) < Gem::Version.new("1.11")
63
+ output.gsub!("\n<mml:mo>&gt;</mml:mo>", "")
64
+ output.gsub!("http://www.w3.org/TR/REC-html40", "http://www.w3.org/1999/xhtml")
65
+ else
66
+ output.gsub!(%r{ xml:lang="[\w-]+"}, "")
67
+ end
68
+
69
+ expect(html).to be_equivalent_to output
58
70
  end
59
71
  end
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omml2mathml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-27 00:00:00.000000000 Z
11
+ date: 2021-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
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.12'
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.12'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 2.0.1
33
+ version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 2.0.1
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: byebug
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -126,16 +126,16 @@ dependencies:
126
126
  name: rubocop
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - '='
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 0.54.0
131
+ version: 1.5.2
132
132
  type: :development
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.54.0
138
+ version: 1.5.2
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: simplecov
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -174,15 +174,14 @@ executables: []
174
174
  extensions: []
175
175
  extra_rdoc_files: []
176
176
  files:
177
+ - ".github/workflows/rake.yml"
178
+ - ".gitignore"
177
179
  - ".hound.yml"
178
180
  - ".rubocop.yml"
179
- - ".travis.yml"
180
181
  - Gemfile
181
- - Gemfile.lock
182
182
  - LICENSE.txt
183
183
  - README.adoc
184
184
  - Rakefile
185
- - appveyor.yml
186
185
  - bin/console
187
186
  - bin/rspec
188
187
  - bin/setup
@@ -195,11 +194,11 @@ files:
195
194
  - spec/omml2mathml_spec.rb
196
195
  - spec/spec_helper.rb
197
196
  - spec/test.html
198
- homepage: https://github.com/metanorma/omml2mathml
197
+ homepage: https://github.com/plurimath/omml2mathml
199
198
  licenses:
200
199
  - BSD-2-Clause
201
200
  metadata: {}
202
- post_install_message:
201
+ post_install_message:
203
202
  rdoc_options: []
204
203
  require_paths:
205
204
  - lib
@@ -207,16 +206,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
207
206
  requirements:
208
207
  - - ">="
209
208
  - !ruby/object:Gem::Version
210
- version: 2.4.0
209
+ version: 2.5.0
211
210
  required_rubygems_version: !ruby/object:Gem::Requirement
212
211
  requirements:
213
212
  - - ">="
214
213
  - !ruby/object:Gem::Version
215
214
  version: '0'
216
215
  requirements: []
217
- rubyforge_project:
218
- rubygems_version: 2.7.6
219
- signing_key:
216
+ rubygems_version: 3.1.4
217
+ signing_key:
220
218
  specification_version: 4
221
219
  summary: Convert Office Math Markup to MathML
222
220
  test_files: []
data/.travis.yml DELETED
@@ -1,18 +0,0 @@
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.lock DELETED
@@ -1,111 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- omml2mathml (0.0.6)
5
- nokogiri (>= 1.10.4)
6
-
7
- GEM
8
- remote: https://rubygems.org/
9
- specs:
10
- ast (2.4.0)
11
- byebug (9.1.0)
12
- coderay (1.1.2)
13
- diff-lcs (1.3)
14
- docile (1.3.2)
15
- equivalent-xml (0.6.0)
16
- nokogiri (>= 1.4.3)
17
- ffi (1.11.1)
18
- formatador (0.2.5)
19
- guard (2.15.1)
20
- formatador (>= 0.2.4)
21
- listen (>= 2.7, < 4.0)
22
- lumberjack (>= 1.0.12, < 2.0)
23
- nenv (~> 0.1)
24
- notiffany (~> 0.0)
25
- pry (>= 0.9.12)
26
- shellany (~> 0.0)
27
- thor (>= 0.18.1)
28
- guard-compat (1.2.1)
29
- guard-rspec (4.7.3)
30
- guard (~> 2.1)
31
- guard-compat (~> 1.1)
32
- rspec (>= 2.99.0, < 4.0)
33
- json (2.2.0)
34
- listen (3.1.5)
35
- rb-fsevent (~> 0.9, >= 0.9.4)
36
- rb-inotify (~> 0.9, >= 0.9.7)
37
- ruby_dep (~> 1.2)
38
- lumberjack (1.0.13)
39
- method_source (0.9.2)
40
- mini_portile2 (2.4.0)
41
- nenv (0.3.0)
42
- nokogiri (1.10.4)
43
- mini_portile2 (~> 2.4.0)
44
- notiffany (0.1.3)
45
- nenv (~> 0.1)
46
- shellany (~> 0.0)
47
- parallel (1.17.0)
48
- parser (2.6.4.1)
49
- ast (~> 2.4.0)
50
- powerpack (0.1.2)
51
- pry (0.12.2)
52
- coderay (~> 1.1.0)
53
- method_source (~> 0.9.0)
54
- rainbow (3.0.0)
55
- rake (12.3.3)
56
- rb-fsevent (0.10.3)
57
- rb-inotify (0.10.0)
58
- ffi (~> 1.0)
59
- rspec (3.8.0)
60
- rspec-core (~> 3.8.0)
61
- rspec-expectations (~> 3.8.0)
62
- rspec-mocks (~> 3.8.0)
63
- rspec-core (3.8.2)
64
- rspec-support (~> 3.8.0)
65
- rspec-expectations (3.8.4)
66
- diff-lcs (>= 1.2.0, < 2.0)
67
- rspec-support (~> 3.8.0)
68
- rspec-match_fuzzy (0.1.3)
69
- rspec (>= 3.2)
70
- rspec-mocks (3.8.1)
71
- diff-lcs (>= 1.2.0, < 2.0)
72
- rspec-support (~> 3.8.0)
73
- rspec-support (3.8.2)
74
- rubocop (0.54.0)
75
- parallel (~> 1.10)
76
- parser (>= 2.5)
77
- powerpack (~> 0.1)
78
- rainbow (>= 2.2.2, < 4.0)
79
- ruby-progressbar (~> 1.7)
80
- unicode-display_width (~> 1.0, >= 1.0.1)
81
- ruby-progressbar (1.10.1)
82
- ruby_dep (1.5.0)
83
- shellany (0.0.1)
84
- simplecov (0.17.1)
85
- docile (~> 1.1)
86
- json (>= 1.8, < 3)
87
- simplecov-html (~> 0.10.0)
88
- simplecov-html (0.10.2)
89
- thor (0.20.3)
90
- timecop (0.9.1)
91
- unicode-display_width (1.6.0)
92
-
93
- PLATFORMS
94
- ruby
95
-
96
- DEPENDENCIES
97
- bundler (~> 2.0.1)
98
- byebug (~> 9.1)
99
- equivalent-xml (~> 0.6)
100
- guard (~> 2.14)
101
- guard-rspec (~> 4.7)
102
- omml2mathml!
103
- rake (~> 12.0)
104
- rspec
105
- rspec-match_fuzzy
106
- rubocop (= 0.54.0)
107
- simplecov (~> 0.15)
108
- timecop (~> 0.9)
109
-
110
- BUNDLED WITH
111
- 2.0.2
data/appveyor.yml DELETED
@@ -1,37 +0,0 @@
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