md2key 0.9.4 → 0.10.0

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: 80da60ca0d6e4c16e147a3f1d28bd43f4a2aa60e79d7318971d92170ff951399
4
- data.tar.gz: 2c47733bd545317a1383fc1c79eb44e51f3a88e585340c8ad044e90830b4adea
3
+ metadata.gz: ad6034c87205238cf1b4d7ebfca1d9f29656107335dbe2aedd23aa46a5bf3425
4
+ data.tar.gz: b12405ef5a7e773d4f53d760d44cdc96717f2d89de04675ee8f13ce9d70549b0
5
5
  SHA512:
6
- metadata.gz: 9217c6b591495ac21de0f1d0a2d432210f1bb1dca6ec8ac3bbfb6806a16332e78a0be07b8562d86dfe6927b2b6c503b4a60d3bdca453eac43f2d786b0e87ef20
7
- data.tar.gz: 101b0f21d93c9a9c312d98c1b6d23b07efbed4787a40f92d253acf0633ee2797cb1b1347f58287e91af3d863cd760f28ffa5650eb80c604bfddbdb968cc33c9c
6
+ metadata.gz: 7d16d940f67df5e99d0aac0094a5257060d75c0f8b90ddd3eeb8fc4bb8734db649732473cc57c3d2f2ab1ae30d3d6e3b976dec7c1062e79837418c3617cd2da3
7
+ data.tar.gz: 0a48ae9002f1ef4520d8b1156fc2c16d97ab12a76e236909e7701a0bb676e07839ae0d4b735b65b7226bada981eba75d823f17bc780665046bc6da380a1b0967
@@ -0,0 +1,36 @@
1
+ name: test
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ tests:
7
+ strategy:
8
+ fail-fast: false
9
+
10
+ matrix:
11
+ os:
12
+ - macos-10.15
13
+ - macos-11.0
14
+
15
+ ruby-version:
16
+ - '2.3'
17
+ - '2.4'
18
+ - '2.5'
19
+ - '2.6'
20
+ - '2.7'
21
+ - '3.0'
22
+ - '3.1'
23
+ - ruby-head
24
+
25
+ runs-on: ${{ matrix.os }}
26
+ steps:
27
+ - uses: actions/checkout@v3
28
+
29
+ - uses: ruby/setup-ruby@v1
30
+ with:
31
+ ruby-version: ${{ matrix.ruby-version }}
32
+
33
+ - run: |
34
+ bundle install
35
+ bundle exec exe/md2key # Test only syntax and basic functionality
36
+ continue-on-error: ${{ matrix.ruby-version == 'ruby-head' }}
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ # v0.10.0
2
+
3
+ - Switch from `mermaid` to `mmdc` to support newer Mermaid
4
+ https://github.com/k0kubun/md2key/pull/48
5
+
6
+ # v0.9.5
7
+
8
+ - Fix keyword argument errors with slide theme selection for Ruby 3
9
+
1
10
  # v0.9.4
2
11
 
3
12
  - Fix keyword argument warnings for Ruby 2.7
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # md2key [![Build Status](https://travis-ci.org/k0kubun/md2key.svg?branch=master)](https://travis-ci.org/k0kubun/md2key)
1
+ # md2key [![Build Status](https://github.com/k0kubun/md2key/actions/workflows/main.yml/badge.svg)](https://github.com/k0kubun/md2key/actions)
2
2
 
3
3
  Convert your markdown to keynote.
4
4
 
@@ -29,7 +29,7 @@ gem install md2key
29
29
 
30
30
  ### Basic example
31
31
 
32
- The slides in the movie can be generated with following markdown.
32
+ The slides in the movie can be generated with following markdown.
33
33
  You can separate slides with `---` just for readability.
34
34
 
35
35
  ```markdown
@@ -58,7 +58,7 @@ You can separate slides with `---` just for readability.
58
58
 
59
59
  ### Insert source code
60
60
 
61
- If you have `highlight` command, you can insert syntax-highlighted source code.
61
+ If you have `highlight` command, you can insert syntax-highlighted source code.
62
62
  If you don't have it, execute `brew install highlight`.
63
63
 
64
64
  <img src='https://i.gyazo.com/7ff36be267652ab567191a6d5cae1d0f.png' width='60%'>
@@ -17,7 +17,7 @@ module Md2key
17
17
 
18
18
  # @param [Array<Hash{ Symbol => String,Integer,TrueClass,FalseClass }>] masters
19
19
  def initialize(masters: [])
20
- @masters = masters.map { |m| Master.new(m) }
20
+ @masters = masters.map { |m| Master.new(**m) }
21
21
  validate!
22
22
  end
23
23
 
@@ -14,8 +14,9 @@ module Md2key
14
14
 
15
15
  output_dir = File.dirname(file.path)
16
16
  image_path = ""
17
- IO.popen("mermaid #{file.path} | grep 'saved png' | awk -F':' '\{print $2\}'", 'r+') do |info|
18
- image_path = info.read.strip
17
+ IO.popen("mmdc -i #{file.path} --output #{file.path}.png", 'r') do |info|
18
+ info.read
19
+ image_path = "#{file.path}.png"
19
20
  file.unlink
20
21
  end
21
22
 
@@ -25,9 +26,9 @@ module Md2key
25
26
  private
26
27
 
27
28
  def ensure_mermaid_availability
28
- return if system('which -s mermaid')
29
+ return if system('which -s mmdc')
29
30
 
30
- abort "`mermaid` is not available. Try `npm install -g phantomjs mermaid`."
31
+ abort "`mmdc` is not available. Try `npm install -g mermaid.cli`."
31
32
  end
32
33
  end
33
34
  end
@@ -1,3 +1,3 @@
1
1
  module Md2key
2
- VERSION = '0.9.4'
2
+ VERSION = '0.10.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: md2key
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Kokubun
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-02-18 00:00:00.000000000 Z
11
+ date: 2022-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -102,8 +102,8 @@ executables:
102
102
  extensions: []
103
103
  extra_rdoc_files: []
104
104
  files:
105
+ - ".github/workflows/main.yml"
105
106
  - ".gitignore"
106
- - ".travis.yml"
107
107
  - CHANGELOG.md
108
108
  - Gemfile
109
109
  - LICENSE.txt
@@ -155,7 +155,7 @@ homepage: https://github.com/k0kubun/md2key
155
155
  licenses:
156
156
  - MIT
157
157
  metadata: {}
158
- post_install_message:
158
+ post_install_message:
159
159
  rdoc_options: []
160
160
  require_paths:
161
161
  - lib
@@ -170,8 +170,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
170
170
  - !ruby/object:Gem::Version
171
171
  version: '0'
172
172
  requirements: []
173
- rubygems_version: 3.1.2
174
- signing_key:
173
+ rubygems_version: 3.3.7
174
+ signing_key:
175
175
  specification_version: 4
176
176
  summary: Convert markdown to keynote
177
177
  test_files: []
data/.travis.yml DELETED
@@ -1,9 +0,0 @@
1
- language: ruby
2
- os: osx
3
- cache: bundler
4
- rvm: 2.3.7
5
- branches:
6
- only:
7
- - master
8
- script:
9
- - "bundle exec exe/md2key" # Test only syntax and basic functionality