omml2mathml 0.0.5 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8d3157cca03b596ae40b3f9d7712ee732b84e4ef8fe4146d1f5cb3f8ca16730
4
- data.tar.gz: d127daebb8555da2fe48d72b990967003963302f9aa5a68f3c1b4b0182dfae4e
3
+ metadata.gz: 7db85a5002512b1ed422613680da8ef895f95c3daba393b8b6b8e682674d5bae
4
+ data.tar.gz: 3142e397b1dd51c215a8aa42457bac3a1d436c9f6aeffbbedf3d3cfe7c73ac4d
5
5
  SHA512:
6
- metadata.gz: 187e5d2d4966941fd5856898b9b243329747d28277105d0f1aabfefed913628e65d97c1d1ea4c89e2cd1f88391e0335ecb47d5eaabe488562f952a468a497ef6
7
- data.tar.gz: 1766b0341e0f43919f88fc05adb4b61326124563545bc3a5f3d82502eaaafd0486a45ff5f83a0533c348f779195e44b2557116913ea35153f9173c5c512e5907
6
+ metadata.gz: bd8633b37e92860aabe8ba2f1bc4ef41a2ebfaf84f78f59ea1001fa271b5e72b8273c637ce10003dff31caae571565dc6e96cb40eb529737976e3c58b5113855
7
+ data.tar.gz: 5caa51de9334a1aa2b7a19cdadf9cff6be5898bd644f0bbc111eb297d256edcc2ce19360fe2f8fe67132cbd98546b7eac2a28b4b8ca22d69420840b31ee1a973
@@ -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.5".freeze
2
+ VERSION = "0.0.9".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.3.0")
24
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
25
25
 
26
- spec.add_dependency "nokogiri"
27
-
28
- spec.add_development_dependency "bundler", "~> 2.0.1"
26
+ spec.add_dependency "nokogiri", "~> 1.11"
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.5
4
+ version: 0.0.9
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-04-14 00:00:00.000000000 Z
11
+ date: 2021-08-02 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: '0'
19
+ version: '1.11'
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: '0'
26
+ version: '1.11'
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.3.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,17 +0,0 @@
1
- language: ruby
2
- cache: bundler
3
- os:
4
- - linux
5
- - osx
6
- rvm:
7
- - 2.5
8
- - 2.4
9
- - 2.3
10
- - ruby-head
11
- before_install:
12
- - gem install bundler -v 2.0.1
13
- - bundle update
14
- matrix:
15
- allow_failures:
16
- - rvm: ruby-head
17
-
data/Gemfile.lock DELETED
@@ -1,111 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- omml2mathml (0.0.4)
5
- nokogiri
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.1)
15
- equivalent-xml (0.6.0)
16
- nokogiri (>= 1.4.3)
17
- ffi (1.10.0)
18
- formatador (0.2.5)
19
- guard (2.15.0)
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.2)
43
- mini_portile2 (~> 2.4.0)
44
- notiffany (0.1.1)
45
- nenv (~> 0.1)
46
- shellany (~> 0.0)
47
- parallel (1.17.0)
48
- parser (2.6.2.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.2)
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.0)
64
- rspec-support (~> 3.8.0)
65
- rspec-expectations (3.8.2)
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.0)
71
- diff-lcs (>= 1.2.0, < 2.0)
72
- rspec-support (~> 3.8.0)
73
- rspec-support (3.8.0)
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.0)
82
- ruby_dep (1.5.0)
83
- shellany (0.0.1)
84
- simplecov (0.16.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.5.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.1
data/appveyor.yml DELETED
@@ -1,30 +0,0 @@
1
- version: '{build}'
2
-
3
- environment:
4
- matrix:
5
- - RUBY_VERSION: 25
6
- - RUBY_VERSION: 24
7
- - RUBY_VERSION: 23
8
- - RUBY_VERSION: _trunk
9
-
10
- matrix:
11
- allow_failures:
12
- - RUBY_VERSION: _trunk
13
-
14
- install:
15
- - ps: . { iwr -useb https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/appveyor.ps1 } | iex
16
- - refreshenv
17
-
18
- build_script:
19
- - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
20
- - bundle update
21
- - bundle install
22
-
23
- before_test:
24
- - ruby -v
25
- - gem -v
26
- - bundle -v
27
-
28
- test_script:
29
- - bundle exec rake
30
-