jekyll-commonmark 1.2.0 → 1.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
- SHA1:
3
- metadata.gz: c7fa262bbb8c204258512eae201ef6fd2102378c
4
- data.tar.gz: 99d43b95c8a8151360285bce64dc6263cc799b15
2
+ SHA256:
3
+ metadata.gz: f8f2b667d4e48524510c2fc1d13be5074e1e62a3e3699df727a5b9aa676eb687
4
+ data.tar.gz: ef8ab723faad439a0e717bd6251066127b2b3c22eb098c90f0f0b4305f084d64
5
5
  SHA512:
6
- metadata.gz: a80334dc9f6498dddd27e5e84834cf606f839651f0cc0f354bbe95fa867b7f1f81f799d65ce6888aed7e35182fd8a59bb19053c3b114c188e7bf240f96775659
7
- data.tar.gz: 2ee960a701c99be7368fd048e1abc6cf1689776168da923b49a3056c682dccdffcc3b7ca15b21bdf0179b27a43eb0c53a4350caf15f319c5f52ada15a0f3b130
6
+ metadata.gz: 789df562b30e53e50af25079dea399e06e3605e8b92a6fc2fb6a5de8507de79625f19f6f9105cb984183d7d616b0bb583487e48e1bcaf1b5036df9584ac448eb
7
+ data.tar.gz: dfb2879c01320367d9ea4809cb1ea184138c8bfc1b6ba8ac0666d33839db5d11df21c39c0b78306c74085777f45f09d1bac4bfe63bf699ff10423e6a87b22477
@@ -1,27 +1,12 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ require: rubocop-jekyll
4
+
1
5
  inherit_gem:
2
- jekyll: .rubocop.yml
6
+ rubocop-jekyll: .rubocop.yml
3
7
 
4
8
  AllCops:
5
- TargetRubyVersion: 2.2
9
+ TargetRubyVersion: 2.4
6
10
  Exclude:
11
+ - script/**/*
7
12
  - vendor/**/*
8
-
9
- Metrics/AbcSize:
10
- Exclude:
11
- - lib/jekyll-commonmark.rb
12
-
13
- Metrics/MethodLength:
14
- Exclude:
15
- - lib/jekyll-commonmark.rb
16
-
17
- Metrics/LineLength:
18
- Exclude:
19
- - lib/jekyll-commonmark.rb
20
-
21
- Lint/Debugger:
22
- Exclude:
23
- - script/console
24
-
25
- Metrics/BlockLength:
26
- Exclude:
27
- - spec/**/*
@@ -0,0 +1,39 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2019-01-03 13:58:24 +0100 using RuboCop version 0.62.0.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ # Configuration parameters: Max.
11
+ Metrics/AbcSize:
12
+ Exclude:
13
+ - 'lib/jekyll-commonmark.rb'
14
+
15
+ # Offense count: 1
16
+ # Configuration parameters: CountComments, Max, ExcludedMethods.
17
+ # ExcludedMethods: refine
18
+ Metrics/BlockLength:
19
+ Exclude:
20
+ - 'spec/jekyll_commonmark_spec.rb'
21
+
22
+ # Offense count: 1
23
+ # Configuration parameters: Max.
24
+ Metrics/CyclomaticComplexity:
25
+ Exclude:
26
+ - 'lib/jekyll-commonmark.rb'
27
+
28
+ # Offense count: 1
29
+ # Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
30
+ # URISchemes: http, https
31
+ Metrics/LineLength:
32
+ Exclude:
33
+ - 'lib/jekyll-commonmark.rb'
34
+
35
+ # Offense count: 1
36
+ # Configuration parameters: CountComments, Max, ExcludedMethods.
37
+ Metrics/MethodLength:
38
+ Exclude:
39
+ - 'lib/jekyll-commonmark.rb'
@@ -1,13 +1,10 @@
1
1
  language: ruby
2
2
  cache: bundler
3
- sudo: false
4
3
  rvm:
5
- - 2.5
4
+ - 2.6
6
5
  - 2.4
7
- - 2.3
8
- - 2.2
9
6
  git:
10
- depth: 1
7
+ depth: 3
11
8
 
12
9
  # we need a more recent cmake than travis/linux provides (at least 2.8.9):
13
10
  addons:
@@ -18,7 +15,11 @@ addons:
18
15
  - cmake
19
16
 
20
17
  before_install:
18
+ - gem update --system
21
19
  - gem install bundler
22
-
23
20
  before_script: bundle update
24
21
  script: script/cibuild
22
+
23
+ env:
24
+ global:
25
+ - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
data/Gemfile CHANGED
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  source "https://rubygems.org"
4
-
5
4
  gemspec
5
+
6
+ gem "jekyll", "~> #{ENV["JEKYLL_VERSION"]}" if ENV["JEKYLL_VERSION"]
@@ -1,3 +1,12 @@
1
+ ## 1.3.0 / 2019-03-22
2
+
3
+ ### Development Fixes
4
+
5
+ * Allow Jekyll v4 (still alpha)
6
+ * Drop Ruby < 2.4
7
+ * chore(deps): rubocop-jekyll 0.3.0 (#25)
8
+ * Target Ruby 2.4 (#30)
9
+
1
10
  ## 1.2.0 / 2018-03-29
2
11
 
3
12
  ### Minor Enhancements
data/Readme.md CHANGED
@@ -7,7 +7,10 @@
7
7
  [![Windows Build status](https://img.shields.io/appveyor/ci/pathawks/jekyll-commonmark/master.svg?label=Windows%20build)](https://ci.appveyor.com/project/pathawks/jekyll-commonmark)
8
8
  [![Dependency Status](https://img.shields.io/gemnasium/pathawks/jekyll-commonmark.svg)](https://gemnasium.com/pathawks/jekyll-commonmark)
9
9
 
10
- Jekyll Markdown converter that uses [libcmark](https://github.com/jgm/CommonMark), the reference parser for CommonMark.
10
+ Jekyll Markdown converter that uses [libcmark](https://github.com/jgm/CommonMark), the reference parser for CommonMark.
11
+ As a result, it is faster than Kramdown.
12
+
13
+ GitHub Pages supports CommonMark through https://github.com/github/jekyll-commonmark-ghpages
11
14
 
12
15
  ## Installation
13
16
 
@@ -24,3 +27,14 @@ and modify your `_config.yml` to use **CommonMark** as your Markdown converter
24
27
  ```yaml
25
28
  markdown: CommonMark
26
29
  ```
30
+
31
+ ## Configuration
32
+
33
+ To specify [extensions](https://github.com/gjtorikian/commonmarker#extensions) and [options](https://github.com/gjtorikian/commonmarker#options) for use in converting Markdown to HTML, supply options to the Markdown converter:
34
+
35
+ ```yaml
36
+ commonmark:
37
+ options: ["SMART", "FOOTNOTES"]
38
+ extensions: ["strikethrough", "autolink", "table"]
39
+ ```
40
+
@@ -8,11 +8,9 @@ install:
8
8
 
9
9
  environment:
10
10
  matrix:
11
+ - RUBY_FOLDER_VER: "25"
12
+ - RUBY_FOLDER_VER: "25-x64"
11
13
  - RUBY_FOLDER_VER: "24"
12
- - RUBY_FOLDER_VER: "24-x64"
13
- - RUBY_FOLDER_VER: "23"
14
- - RUBY_FOLDER_VER: "22"
15
- - RUBY_FOLDER_VER: "21"
16
14
 
17
15
  test_script:
18
16
  - ruby --version
@@ -17,11 +17,13 @@ Gem::Specification.new do |spec|
17
17
  spec.test_files = spec.files.grep(%r!^(test|spec|features)/!)
18
18
  spec.require_paths = ["lib"]
19
19
 
20
+ spec.required_ruby_version = ">= 2.4.0"
21
+
20
22
  spec.add_runtime_dependency "commonmarker", "~> 0.14"
21
- spec.add_runtime_dependency "jekyll", [">= 3.0", "< 4.0"]
23
+ spec.add_runtime_dependency "jekyll", ">= 3.7", "< 5.0"
22
24
 
23
- spec.add_development_dependency "bundler", "~> 1.15"
25
+ spec.add_development_dependency "bundler"
24
26
  spec.add_development_dependency "rake", "~> 12.0"
25
27
  spec.add_development_dependency "rspec", "~> 3.0"
26
- spec.add_development_dependency "rubocop", "~> 0.52.0"
28
+ spec.add_development_dependency "rubocop-jekyll", "~> 0.5"
27
29
  end
@@ -2,46 +2,50 @@
2
2
 
3
3
  module Jekyll
4
4
  module Converters
5
- class Markdown::CommonMark
6
- def initialize(config)
7
- Jekyll::External.require_with_graceful_fail "commonmarker"
8
- begin
9
- options = config["commonmark"]["options"].collect { |e| e.upcase.to_sym }
10
- rescue NoMethodError
11
- options = []
12
- else
13
- valid_opts = Set.new(CommonMarker::Config::Parse.keys + CommonMarker::Config::Render.keys)
14
- options.reject! do |e|
15
- next if valid_opts.include? e
16
- Jekyll.logger.warn "CommonMark:", "#{e} is not a valid option"
17
- Jekyll.logger.info "Valid options:", valid_opts.to_a.join(", ")
18
- true
5
+ class Markdown
6
+ class CommonMark
7
+ def initialize(config)
8
+ Jekyll::External.require_with_graceful_fail "commonmarker"
9
+ begin
10
+ options = config["commonmark"]["options"].collect { |e| e.upcase.to_sym }
11
+ rescue NoMethodError
12
+ options = []
13
+ else
14
+ valid_opts = Set.new(CommonMarker::Config::Parse.keys + CommonMarker::Config::Render.keys)
15
+ options.reject! do |e|
16
+ next if valid_opts.include? e
17
+
18
+ Jekyll.logger.warn "CommonMark:", "#{e} is not a valid option"
19
+ Jekyll.logger.info "Valid options:", valid_opts.to_a.join(", ")
20
+ true
21
+ end
19
22
  end
20
- end
21
- begin
22
- @extensions = config["commonmark"]["extensions"].collect(&:to_sym)
23
- rescue NoMethodError
24
- @extensions = []
25
- else
26
- @extensions.reject! do |e|
27
- next if CommonMarker.extensions.include? e.to_s
28
- Jekyll.logger.warn "CommonMark:", "#{e} is not a valid extension"
29
- Jekyll.logger.info "Valid extensions:", CommonMarker.extensions.join(", ")
30
- true
23
+ begin
24
+ @extensions = config["commonmark"]["extensions"].collect(&:to_sym)
25
+ rescue NoMethodError
26
+ @extensions = []
27
+ else
28
+ @extensions.reject! do |e|
29
+ next if CommonMarker.extensions.include? e.to_s
30
+
31
+ Jekyll.logger.warn "CommonMark:", "#{e} is not a valid extension"
32
+ Jekyll.logger.info "Valid extensions:", CommonMarker.extensions.join(", ")
33
+ true
34
+ end
31
35
  end
32
- end
33
36
 
34
- options_set = Set.new(options).freeze
35
- @parse_options = (options_set & CommonMarker::Config::Parse.keys).to_a
36
- @render_options = (options_set & CommonMarker::Config::Render.keys).to_a
37
+ options_set = Set.new(options).freeze
38
+ @parse_options = (options_set & CommonMarker::Config::Parse.keys).to_a
39
+ @render_options = (options_set & CommonMarker::Config::Render.keys).to_a
37
40
 
38
- @parse_options = :DEFAULT if @parse_options.empty?
39
- @render_options = :DEFAULT if @render_options.empty?
40
- end
41
+ @parse_options = :DEFAULT if @parse_options.empty?
42
+ @render_options = :DEFAULT if @render_options.empty?
43
+ end
41
44
 
42
- def convert(content)
43
- CommonMarker.render_doc(content, @parse_options, @extensions)
44
- .to_html(@render_options, @extensions)
45
+ def convert(content)
46
+ CommonMarker.render_doc(content, @parse_options, @extensions)
47
+ .to_html(@render_options, @extensions)
48
+ end
45
49
  end
46
50
  end
47
51
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module CommonMark
5
- VERSION = "1.2.0".freeze
5
+ VERSION = "1.3.0"
6
6
  end
7
7
  end
@@ -21,11 +21,11 @@ def dest_dir(*files)
21
21
  end
22
22
 
23
23
  def config(overrides = {})
24
- Jekyll.configuration({
24
+ Jekyll.configuration(
25
25
  "source" => source_dir,
26
26
  "destination" => dest_dir,
27
- "url" => "http://example.org",
28
- }).merge(overrides)
27
+ "url" => "http://example.org"
28
+ ).merge(overrides)
29
29
  end
30
30
 
31
31
  def site(configuration = config)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-commonmark
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pat Hawks
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-30 00:00:00.000000000 Z
11
+ date: 2019-03-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commonmarker
@@ -30,34 +30,34 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '3.0'
33
+ version: '3.7'
34
34
  - - "<"
35
35
  - !ruby/object:Gem::Version
36
- version: '4.0'
36
+ version: '5.0'
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- version: '3.0'
43
+ version: '3.7'
44
44
  - - "<"
45
45
  - !ruby/object:Gem::Version
46
- version: '4.0'
46
+ version: '5.0'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bundler
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - "~>"
51
+ - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: '1.15'
53
+ version: '0'
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - "~>"
58
+ - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: '1.15'
60
+ version: '0'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: rake
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -87,19 +87,19 @@ dependencies:
87
87
  - !ruby/object:Gem::Version
88
88
  version: '3.0'
89
89
  - !ruby/object:Gem::Dependency
90
- name: rubocop
90
+ name: rubocop-jekyll
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: 0.52.0
95
+ version: '0.5'
96
96
  type: :development
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: 0.52.0
102
+ version: '0.5'
103
103
  description:
104
104
  email: pat@pathawks.com
105
105
  executables: []
@@ -109,6 +109,7 @@ files:
109
109
  - ".github/stale.yml"
110
110
  - ".gitignore"
111
111
  - ".rubocop.yml"
112
+ - ".rubocop_todo.yml"
112
113
  - ".travis.yml"
113
114
  - Gemfile
114
115
  - History.markdown
@@ -138,15 +139,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
138
139
  requirements:
139
140
  - - ">="
140
141
  - !ruby/object:Gem::Version
141
- version: '0'
142
+ version: 2.4.0
142
143
  required_rubygems_version: !ruby/object:Gem::Requirement
143
144
  requirements:
144
145
  - - ">="
145
146
  - !ruby/object:Gem::Version
146
147
  version: '0'
147
148
  requirements: []
148
- rubyforge_project:
149
- rubygems_version: 2.6.14
149
+ rubygems_version: 3.0.3
150
150
  signing_key:
151
151
  specification_version: 4
152
152
  summary: CommonMark generator for Jekyll