omml2mathml 0.0.8 → 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: f7ace8eb8ce776ab6bf79a84a413703233e23af57605ef4314937c8e494c1a5b
4
- data.tar.gz: a7d16ba5c1036dafd44442de68559ada29024961c6af72d763266a414a9068fe
3
+ metadata.gz: 7db85a5002512b1ed422613680da8ef895f95c3daba393b8b6b8e682674d5bae
4
+ data.tar.gz: 3142e397b1dd51c215a8aa42457bac3a1d436c9f6aeffbbedf3d3cfe7c73ac4d
5
5
  SHA512:
6
- metadata.gz: 797ad140a03873d956cbc680abf370710d2d4e8a1e2844743063d10fbf6ad11dc5421cf77977e994a3ee7763d14fe0c47456fe87a92566920758dacfa6e77bc8
7
- data.tar.gz: d6b4919a6941459f2ca62910c631b58cf42283d5615adbf62e4baee34752036450a3851d02a03691dc277f43b9f42eb298cf4f10161400dde6b5ea3ce328070d
6
+ metadata.gz: bd8633b37e92860aabe8ba2f1bc4ef41a2ebfaf84f78f59ea1001fa271b5e72b8273c637ce10003dff31caae571565dc6e96cb40eb529737976e3c58b5113855
7
+ data.tar.gz: 5caa51de9334a1aa2b7a19cdadf9cff6be5898bd644f0bbc111eb297d256edcc2ce19360fe2f8fe67132cbd98546b7eac2a28b4b8ca22d69420840b31ee1a973
@@ -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@v2
34
24
  with:
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,12 +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.
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
4
3
  inherit_from:
5
4
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
6
5
 
7
6
  # local repo-specific modifications
7
+ # ...
8
8
 
9
9
  AllCops:
10
- DisplayCopNames: false
11
- StyleGuideCopsOnly: false
12
- TargetRubyVersion: 2.4
10
+ TargetRubyVersion: 2.5
@@ -1,4 +1,4 @@
1
1
  module Omml2Mathml
2
- VERSION = "0.0.8".freeze
2
+ VERSION = "0.0.9".freeze
3
3
  end
4
4
 
data/omml2mathml.gemspec CHANGED
@@ -21,10 +21,9 @@ Gem::Specification.new do |spec|
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
26
  spec.add_dependency "nokogiri", "~> 1.11"
27
-
28
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"
@@ -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,8 +7,8 @@ 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"
10
+ output = Omml2Mathml.convert("spec/test.html").sub(/<\?xml[^>]+>/, "").sub(/<!DOCTYPE[^>]+>/, "")
11
+ html = <<~"OUTPUT"
11
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>
@@ -57,5 +58,14 @@ RSpec.describe Omml2Mathml do
57
58
  </body>
58
59
  </html>
59
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
60
70
  end
61
71
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omml2mathml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-07 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
@@ -206,7 +206,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
206
206
  requirements:
207
207
  - - ">="
208
208
  - !ruby/object:Gem::Version
209
- version: 2.4.0
209
+ version: 2.5.0
210
210
  required_rubygems_version: !ruby/object:Gem::Requirement
211
211
  requirements:
212
212
  - - ">="