reverse_adoc 0.2.10 → 0.3.0

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: abd0bf0dce3d437c176a1c3486d565fedd235d4b4e58cfdb4259188a1a94e090
4
- data.tar.gz: '08926fcde9721aecc4672ac81c1dce18bf750763fe60621f57eb4cc32605eb70'
3
+ metadata.gz: 151922bd17ae4f65700977c109db7d8c55698e7eab9b22f7879df019b84c0923
4
+ data.tar.gz: b18bfb38f7d53ba8eae5cca00798824c8d4c6726a6d9c7baf0ab3a86f69c0d9a
5
5
  SHA512:
6
- metadata.gz: 39bf9ee3868bbb02440e2d853839a267f4c385e84204aedaeabe1000a7fa3fdc3f9e6baf381025548633b02b5c9e8f7d87925044c3ec992ca1eca2b83e7722b6
7
- data.tar.gz: 5c34f9d71fa904a05c2e726b627d944f61a09f08e50ff587a102cc6e42c107600e08ad4b583fb5c9a07d678c09f06bc86fe25c15b94ae2dbefa0f29d046796bf
6
+ metadata.gz: f8cf25df3279d0bd4b33c105be476e15dcb0c8e4aca7812e3332daf3bc5ac4ea671281266ec8c70b83c7d906fa87593ce65e24a0a0a009382eb0921e6072e669
7
+ data.tar.gz: 5431dacaa7627908c4bb1e2583d56e7b982bd73f6ad44bf6a348ccc99cb632743ea701db79d53c46d5f0e263961abd676570f9c1d02417855dfc9d9b91deb3fa
@@ -0,0 +1,42 @@
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: [ '2.7', '2.6', '2.5', '2.4' ]
20
+ os: [ ubuntu-latest, windows-latest, macos-latest ]
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
+ steps:
33
+ - uses: actions/checkout@master
34
+
35
+ - uses: ruby/setup-ruby@v1
36
+ with:
37
+ ruby-version: ${{ matrix.ruby }}
38
+ bundler-cache: true
39
+
40
+ - uses: metanorma/metanorma-build-scripts/libreoffice-setup-action@master
41
+
42
+ - run: bundle exec rake
data/README.adoc CHANGED
@@ -1,9 +1,7 @@
1
1
  = AsciiDoc from HTML and Microsoft Word: reverse_adoc
2
2
 
3
3
  https://github.com/metanorma/reverse_adoc[reverse_adoc] image:https://img.shields.io/gem/v/reverse_adoc.svg["Gem Version", link="https://rubygems.org/gems/reverse_adoc"]::
4
- image:https://github.com/metanorma/reverse_adoc/workflows/macos/badge.svg["Build Status", link="https://github.com/metanorma/reverse_adoc/actions?workflow=macos"]
5
- image:https://github.com/metanorma/reverse_adoc/workflows/windows/badge.svg["Build Status", link="https://github.com/metanorma/reverse_adoc/actions?workflow=windows"]
6
- image:https://github.com/metanorma/reverse_adoc/workflows/ubuntu/badge.svg["Build Status", link="https://github.com/metanorma/reverse_adoc/actions?workflow=ubuntu"]
4
+ image:https://github.com/metanorma/reverse_adoc/workflows/rake/badge.svg["Build Status", link="https://github.com/metanorma/reverse_adoc/actions?workflow=rake"]
7
5
  image:https://codeclimate.com/github/metanorma/reverse_adoc/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/reverse_adoc"]
8
6
  image:https://img.shields.io/github/issues-pr-raw/metanorma/reverse_adoc.svg["Pull Requests", link="https://github.com/metanorma/reverse_adoc/pulls"]
9
7
  image:https://img.shields.io/github/commits-since/metanorma/reverse_adoc/latest.svg["Commits since latest",link="https://github.com/metanorma/reverse_adoc/releases"]
@@ -2,7 +2,7 @@ require "fileutils"
2
2
  require "pathname"
3
3
  require "tempfile"
4
4
  require "base64"
5
- require "mimemagic"
5
+ require "marcel"
6
6
 
7
7
  module ReverseAdoc
8
8
  module Converters
@@ -50,7 +50,7 @@ module ReverseAdoc
50
50
  f.binmode
51
51
  f.write(Base64.strict_decode64(imgdata))
52
52
  f.rewind
53
- ext = MimeMagic.by_magic(f).subtype
53
+ ext = Marcel::MimeType.for(f).sub(%r{^[^/]+/}, "")
54
54
  [ext, f.path]
55
55
  end
56
56
  end
@@ -1,3 +1,3 @@
1
1
  module ReverseAdoc
2
- VERSION = '0.2.10'
2
+ VERSION = '0.3.0'
3
3
  end
data/reverse_adoc.gemspec CHANGED
@@ -20,9 +20,9 @@ Gem::Specification.new do |s|
20
20
  s.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
21
21
 
22
22
  # specify any dependencies here; for example:
23
- s.add_dependency 'nokogiri', ">= 1.10.4"
23
+ s.add_dependency 'nokogiri', "~> 1.10.4"
24
24
  s.add_dependency 'mathml2asciimath'
25
- s.add_dependency 'mimemagic'
25
+ s.add_dependency 'marcel', "~> 1.0.0"
26
26
  s.add_development_dependency 'rspec'
27
27
  s.add_development_dependency 'simplecov'
28
28
  s.add_development_dependency 'rake'
data/spec/bin/w2a_spec.rb CHANGED
@@ -22,13 +22,13 @@ describe 'bin/w2a' do
22
22
  expect { convert }.to_not raise_error
23
23
  end
24
24
 
25
- it 'exatracts images from source html' do
25
+ it 'extracts images from source html' do
26
26
  expect { convert }
27
27
  .to(change do
28
28
  Dir["#{images_folder}/*gif"]
29
29
  .map { |entry| File.basename(entry) }
30
30
  .sort
31
- end.from([]).to(['001.gif', '002.gif']))
31
+ end.from([]).to(['001.gif']))
32
32
  end
33
33
  end
34
34
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reverse_adoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.10
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-16 00:00:00.000000000 Z
11
+ date: 2021-03-29 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
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
26
  version: 1.10.4
27
27
  - !ruby/object:Gem::Dependency
@@ -39,19 +39,19 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: mimemagic
42
+ name: marcel
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: 1.0.0
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: '0'
54
+ version: 1.0.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -159,13 +159,10 @@ executables:
159
159
  extensions: []
160
160
  extra_rdoc_files: []
161
161
  files:
162
- - ".github/workflows/macos.yml"
163
- - ".github/workflows/ubuntu.yml"
164
- - ".github/workflows/windows.yml"
162
+ - ".github/workflows/rake.yml"
165
163
  - ".hound.yml"
166
164
  - ".rubocop.yml"
167
165
  - Gemfile
168
- - Gemfile.lock
169
166
  - LICENSE.txt
170
167
  - README.adoc
171
168
  - Rakefile
@@ -282,7 +279,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
282
279
  - !ruby/object:Gem::Version
283
280
  version: '0'
284
281
  requirements: []
285
- rubygems_version: 3.0.6
282
+ rubygems_version: 3.1.4
286
283
  signing_key:
287
284
  specification_version: 4
288
285
  summary: Generate AsciiDoc from HTML and Microsoft Word via CLI or library.
@@ -1,41 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: macos
4
-
5
- on:
6
- push:
7
- branches: [ master ]
8
- pull_request:
9
- paths-ignore:
10
- - .github/workflows/ubuntu.yml
11
- - .github/workflows/windows.yml
12
-
13
- jobs:
14
- test-macos:
15
- name: Test on Ruby ${{ matrix.ruby }} macOS
16
- runs-on: macos-latest
17
- continue-on-error: ${{ matrix.experimental }}
18
- strategy:
19
- fail-fast: false
20
- matrix:
21
- ruby: [ '2.6', '2.5', '2.4' ]
22
- experimental: [false]
23
- include:
24
- - ruby: '2.7'
25
- experimental: true
26
- steps:
27
- - uses: actions/checkout@master
28
- - name: Use Ruby
29
- uses: actions/setup-ruby@v1
30
- with:
31
- ruby-version: ${{ matrix.ruby }}
32
- - name: Update gems
33
- run: |
34
- sudo gem install bundler --force
35
- bundle install --jobs 4 --retry 3
36
- - name: Install LibreOffice
37
- run: |
38
- brew cask install libreoffice
39
- - name: Run specs
40
- run: |
41
- bundle exec rake
@@ -1,40 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: ubuntu
4
-
5
- on:
6
- push:
7
- branches: [ master ]
8
- pull_request:
9
- paths-ignore:
10
- - .github/workflows/macos.yml
11
- - .github/workflows/windows.yml
12
-
13
- jobs:
14
- test-linux:
15
- name: Test on Ruby ${{ matrix.ruby }} Ubuntu
16
- runs-on: ubuntu-latest
17
- continue-on-error: ${{ matrix.experimental }}
18
- strategy:
19
- fail-fast: false
20
- matrix:
21
- ruby: [ '2.6', '2.5', '2.4' ]
22
- experimental: [false]
23
- include:
24
- - ruby: '2.7'
25
- experimental: true
26
- steps:
27
- - uses: actions/checkout@master
28
- - name: Use Ruby
29
- uses: actions/setup-ruby@v1
30
- with:
31
- ruby-version: ${{ matrix.ruby }}
32
- - name: Install LibreOffice
33
- run: sudo apt-get -y --no-install-recommends install libreoffice
34
- - name: Update gems
35
- run: |
36
- gem install bundler
37
- bundle install --jobs 4 --retry 3
38
- - name: Run specs
39
- run: |
40
- bundle exec rake
@@ -1,44 +0,0 @@
1
- # Auto-generated by Cimas: Do not edit it manually!
2
- # See https://github.com/metanorma/cimas
3
- name: windows
4
-
5
- on:
6
- push:
7
- branches: [ master ]
8
- pull_request:
9
- paths-ignore:
10
- - .github/workflows/macos.yml
11
- - .github/workflows/ubuntu.yml
12
-
13
- jobs:
14
- test-windows:
15
- name: Test on Ruby ${{ matrix.ruby }} Windows
16
- runs-on: windows-latest
17
- continue-on-error: ${{ matrix.experimental }}
18
- strategy:
19
- fail-fast: false
20
- matrix:
21
- ruby: [ '2.6', '2.5', '2.4' ]
22
- experimental: [false]
23
- include:
24
- - ruby: '2.7'
25
- experimental: true
26
- steps:
27
- - uses: actions/checkout@master
28
- - name: Use Ruby
29
- uses: actions/setup-ruby@v1
30
- with:
31
- ruby-version: ${{ matrix.ruby }}
32
- - name: Install LibreOffice
33
- run: |
34
- choco install libreoffice-still
35
- echo "::add-path::C:\Program Files\LibreOffice\program"
36
- - name: Update gems
37
- shell: pwsh
38
- run: |
39
- gem install bundler
40
- bundle config --local path vendor/bundle
41
- bundle install --jobs 4 --retry 3
42
- - name: Run specs
43
- run: |
44
- bundle exec rake
data/Gemfile.lock DELETED
@@ -1,85 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- reverse_adoc (0.2.10)
5
- mathml2asciimath
6
- mimemagic
7
- nokogiri (>= 1.10.4)
8
- premailer (~> 1.11.0)
9
- word-to-markdown
10
-
11
- GEM
12
- remote: https://rubygems.org/
13
- specs:
14
- addressable (2.7.0)
15
- public_suffix (>= 2.0.2, < 5.0)
16
- byebug (11.1.1)
17
- cliver (0.3.2)
18
- codeclimate-test-reporter (1.0.7)
19
- simplecov
20
- css_parser (1.7.1)
21
- addressable
22
- descriptive_statistics (2.5.1)
23
- diff-lcs (1.3)
24
- docile (1.3.2)
25
- ffi (1.13.1)
26
- htmlentities (4.3.4)
27
- mathml2asciimath (0.0.10)
28
- htmlentities (~> 4.3.4)
29
- nokogiri (>= 1.10.4)
30
- mimemagic (0.3.5)
31
- mini_portile2 (2.4.0)
32
- nokogiri (1.10.10)
33
- mini_portile2 (~> 2.4.0)
34
- nokogiri-styles (0.1.2)
35
- nokogiri
36
- premailer (1.11.1)
37
- addressable
38
- css_parser (>= 1.6.0)
39
- htmlentities (>= 4.0.0)
40
- public_suffix (4.0.6)
41
- rake (13.0.1)
42
- redcarpet (3.5.0)
43
- reverse_markdown (1.4.0)
44
- nokogiri
45
- rspec (3.9.0)
46
- rspec-core (~> 3.9.0)
47
- rspec-expectations (~> 3.9.0)
48
- rspec-mocks (~> 3.9.0)
49
- rspec-core (3.9.1)
50
- rspec-support (~> 3.9.1)
51
- rspec-expectations (3.9.0)
52
- diff-lcs (>= 1.2.0, < 2.0)
53
- rspec-support (~> 3.9.0)
54
- rspec-mocks (3.9.1)
55
- diff-lcs (>= 1.2.0, < 2.0)
56
- rspec-support (~> 3.9.0)
57
- rspec-support (3.9.2)
58
- simplecov (0.18.5)
59
- docile (~> 1.1)
60
- simplecov-html (~> 0.11)
61
- simplecov-html (0.12.1)
62
- sys-proctable (1.2.6)
63
- ffi
64
- word-to-markdown (1.1.8)
65
- cliver (~> 0.3)
66
- descriptive_statistics (~> 2.5)
67
- nokogiri-styles (~> 0.1)
68
- premailer (~> 1.8)
69
- reverse_markdown (~> 1.0)
70
- sys-proctable (~> 1.0)
71
-
72
- PLATFORMS
73
- ruby
74
-
75
- DEPENDENCIES
76
- byebug
77
- codeclimate-test-reporter
78
- rake
79
- redcarpet
80
- reverse_adoc!
81
- rspec
82
- simplecov
83
-
84
- BUNDLED WITH
85
- 2.0.2