kramdown-prismic 0.2.2 → 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: 3229f319815e16e39608a957bb9f596e623a6ef605be3955c46723de2aedbb98
4
- data.tar.gz: '08f9b62d41e583e99d51373ddb875352abec6226f2a584c6f9d21b61c15ed26f'
3
+ metadata.gz: 5375492a7419784a19fee9021699380d7106184167742f73f693502aeee28767
4
+ data.tar.gz: 378f78feb7e48a07c5177a7ae98556fb918a6b6258201227a5cfd415dc73d23c
5
5
  SHA512:
6
- metadata.gz: 8c3bf867920d85af049006027d70f156cca4c0863cd8c40784eb473121153652acc368906e1100fabdb90d36a04f73c9a966090c8a68e7d55fc8c55f0e3610e7
7
- data.tar.gz: e4daf1cfe1886f809f0234d7a181b22e677be78401f06c4f4657d89a519e61b13d56ce1dcabcad11ed13bbe782f359c3214c5650da098b8b72c65fccdeb230b4
6
+ metadata.gz: b90f2f0df8505ef0403704d0db3c32aa3003589e5bd958827ed270347e477b7b87f464626781fa0049b43bf5372f6fd501e4d476b83a61d8bd4d0c399f020bcf
7
+ data.tar.gz: 87d4c10f8ccd35b29ee9fc0b030a604490f35354bb86809bf18c8dfcfe79c3ae62199aa3f2b7195290be38febe09c76a7d9df74734845c9e0b0ebde41602661c
@@ -2,12 +2,33 @@ name: CI
2
2
 
3
3
  on: [push, pull_request]
4
4
  jobs:
5
- test:
5
+ test-kramdown2:
6
6
  strategy:
7
7
  fail-fast: false
8
8
  matrix:
9
9
  os: [ubuntu-latest]
10
- ruby: [2.5, 2.6, 2.7]
10
+ ruby: [2.6, 2.7, "3.0"]
11
+ gemfile: [ kramdown2 ]
12
+ env:
13
+ BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile
14
+ runs-on: ${{ matrix.os }}
15
+ steps:
16
+ - uses: actions/checkout@v2
17
+ - uses: ruby/setup-ruby@v1
18
+ with:
19
+ ruby-version: ${{ matrix.ruby }}
20
+ bundler-cache: true
21
+ - run: bundle exec rake test
22
+
23
+ test-kramdown1:
24
+ strategy:
25
+ fail-fast: false
26
+ matrix:
27
+ os: [ubuntu-latest]
28
+ ruby: [2.6, 2.7]
29
+ gemfile: [ kramdown1 ]
30
+ env:
31
+ BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}.gemfile
11
32
  runs-on: ${{ matrix.os }}
12
33
  steps:
13
34
  - uses: actions/checkout@v2
data/Changelog.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## Version 0.3.0
4
+
5
+ - Relax the kramdown dependency to allows the version 2.
6
+ - XML elements support have been removed.
7
+
3
8
  ## Version 0.2.2
4
9
 
5
10
  - Convert links with only an image inside. See #1.
data/Gemfile.lock CHANGED
@@ -1,15 +1,17 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kramdown-prismic (0.2.2)
5
- kramdown (~> 1.0)
4
+ kramdown-prismic (0.3.0)
5
+ kramdown (>= 1, < 3)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- kramdown (1.17.0)
10
+ kramdown (2.3.1)
11
+ rexml
11
12
  minitest (5.10.3)
12
13
  rake (13.0.6)
14
+ rexml (3.2.5)
13
15
 
14
16
  PLATFORMS
15
17
  ruby
@@ -4,8 +4,8 @@ require File.expand_path('../lib/kramdown-prismic/version', __FILE__)
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'kramdown-prismic'
6
6
  s.version = KramdownPrismic::VERSION
7
- s.summary = "A Kramdown converter to convert documents into prismic rich text format."
8
- s.description = "A Kramdown converter to convert documents into prismic rich text format."
7
+ s.summary = "A Kramdown converter to convert documents into prismic rich text format and the other way around."
8
+ s.description = "A Kramdown converter to convert documents into prismic rich text format and the other way around."
9
9
  s.authors = ["François de Metz"]
10
10
  s.email = 'francois@2metz.fr'
11
11
 
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
15
15
  s.homepage = 'https://github.com/stormz/kramdown-prismic'
16
16
  s.license = 'MIT'
17
17
 
18
- s.add_dependency "kramdown", "~> 1.0"
18
+ s.add_dependency "kramdown", ">= 1", "< 3"
19
19
  s.add_development_dependency "minitest", "~> 5.0"
20
20
  s.add_development_dependency "rake", "~> 13.0"
21
21
  end
data/kramdown1.gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+ gem 'kramdown', '~> 1.0'
data/kramdown2.gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+ gem 'kramdown', '~> 2.0'
@@ -1,3 +1,3 @@
1
1
  module KramdownPrismic
2
- VERSION = "0.2.2"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -171,16 +171,6 @@ module Kramdown
171
171
  nil
172
172
  end
173
173
 
174
- def convert_xml_comment(element)
175
- warning('translating xml_comment is not supported')
176
- nil
177
- end
178
-
179
- def convert_xml_pi(element)
180
- warning('translating xml_pi is not supported')
181
- nil
182
- end
183
-
184
174
  def convert_raw(element)
185
175
  warning('translating raw is not supported')
186
176
  nil
@@ -557,22 +557,6 @@ class KramdownPrismicConverterTest < Minitest::Test
557
557
  assert_equal 1, doc.warnings.size
558
558
  end
559
559
 
560
- def test_convert_xml_comment
561
- expected = []
562
- markdown = "<!-- a *comment* -->"
563
- doc = Kramdown::Document.new(markdown, input: :kramdown)
564
- assert_equal expected, doc.to_prismic
565
- assert_equal 1, doc.warnings.size
566
- end
567
-
568
- def test_convert_xml_pi
569
- expected = []
570
- markdown = "<? a processing `instruction`?>"
571
- doc = Kramdown::Document.new(markdown, input: :kramdown)
572
- assert_equal expected, doc.to_prismic
573
- assert_equal 1, doc.warnings.size
574
- end
575
-
576
560
  def test_convert_raw
577
561
  expected = []
578
562
  markdown = "{::nomarkdown}\nComment\n{:/nomarkdown}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kramdown-prismic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - François de Metz
@@ -14,16 +14,22 @@ dependencies:
14
14
  name: kramdown
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '1'
20
+ - - "<"
18
21
  - !ruby/object:Gem::Version
19
- version: '1.0'
22
+ version: '3'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '1'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: '1.0'
32
+ version: '3'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: minitest
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -52,7 +58,8 @@ dependencies:
52
58
  - - "~>"
53
59
  - !ruby/object:Gem::Version
54
60
  version: '13.0'
55
- description: A Kramdown converter to convert documents into prismic rich text format.
61
+ description: A Kramdown converter to convert documents into prismic rich text format
62
+ and the other way around.
56
63
  email: francois@2metz.fr
57
64
  executables: []
58
65
  extensions: []
@@ -68,6 +75,8 @@ files:
68
75
  - README.md
69
76
  - Rakefile
70
77
  - kramdown-prismic.gemspec
78
+ - kramdown1.gemfile
79
+ - kramdown2.gemfile
71
80
  - lib/kramdown-prismic.rb
72
81
  - lib/kramdown-prismic/version.rb
73
82
  - lib/kramdown/converter/prismic.rb
@@ -96,7 +105,8 @@ requirements: []
96
105
  rubygems_version: 3.0.3
97
106
  signing_key:
98
107
  specification_version: 4
99
- summary: A Kramdown converter to convert documents into prismic rich text format.
108
+ summary: A Kramdown converter to convert documents into prismic rich text format and
109
+ the other way around.
100
110
  test_files:
101
111
  - test/converter_test.rb
102
112
  - test/parser_test.rb