github-markup 4.0.2 → 5.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +4 -4
- data/.gitignore +3 -1
- data/Gemfile +2 -2
- data/HISTORY.md +10 -0
- data/github-markup.gemspec +5 -4
- data/lib/github/markup/command_implementation.rb +8 -28
- data/lib/github-markup.rb +1 -1
- data/test/markup_test.rb +6 -1
- data/test/markups/README.asciidoc.html +1 -1
- data/test/markups/README.hidetitle.asciidoc.html +1 -1
- data/test/markups/README.litcoffee.html +1 -1
- data/test/markups/README.long.rst +1319 -0
- data/test/markups/README.long.rst.html +1303 -0
- data/test/markups/README.mediawiki.html +9 -5
- data/test/markups/README.pod.html +8 -4
- data/test/markups/README.rst.html +4 -4
- data/test/markups/README.toc.asciidoc.html +1 -1
- data/test/markups/README.toc.rst.html +2 -2
- metadata +14 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a16f615db76eeec528d2740f8f417c3b4e744d9cbd60f2e48c4de0ac9e154c8c
|
4
|
+
data.tar.gz: bbf5e23d4b3f3e709db7c21b3dbb362f1cf1da4d84bcad450169abf263733bf0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 499115c0d8552ab3d59a13b9b5d34fa04b462afd5b56381269aadfb3ff48693409e43a087313402257514d75674b7209ccc82f5887bea75815573d8441c6ec4c
|
7
|
+
data.tar.gz: f7f6fb200d33f3e7b86c11eddcf01e5e225971574c1f313215512aae19e66c0561c282ba225e4ac2da49d11a22063c5da4036449f3606ccf11cbffad70b1443f
|
data/.github/workflows/ci.yml
CHANGED
data/.gitignore
CHANGED
data/Gemfile
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
source "http://rubygems.org"
|
2
2
|
gemspec
|
3
3
|
|
4
|
-
gem "posix-spawn", :platforms => :ruby
|
5
4
|
gem "redcarpet", :platforms => :ruby
|
6
5
|
gem "kramdown", :platforms => :jruby
|
7
6
|
gem "RedCloth"
|
8
7
|
# using a tag version here because 0.18.3 was not published by the author to encourage users to upgrade.
|
9
8
|
# however we want to bump up to this version since this has a security patch
|
10
9
|
gem "commonmarker", git: "https://github.com/gjtorikian/commonmarker.git", tag: "v0.18.3"
|
11
|
-
gem "rdoc", "~>
|
10
|
+
gem "rdoc", "~> 6.7.0"
|
12
11
|
gem "org-ruby", "= 0.9.9"
|
13
12
|
gem "creole", "~>0.3.6"
|
14
13
|
gem "wikicloth", "=0.8.3"
|
15
14
|
gem "twitter-text", "~> 1.14"
|
16
15
|
gem "asciidoctor", "~> 2.0.5"
|
17
16
|
gem "rake"
|
17
|
+
gem "rexml"
|
data/HISTORY.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
## 5.0.1 - 2024-06-17
|
2
|
+
* Bump activesupport from 4.0 to 7.1.3.4
|
3
|
+
|
4
|
+
## 5.0.0 - 2024-06-17
|
5
|
+
* Drop support for Ruby versions < 3
|
6
|
+
* Bump nokogiri from 1.8.1 to 1.16.5
|
7
|
+
* Bump nokogiri-diff from 0.2.0 to 0.3.0
|
8
|
+
* Bump rdoc from 3.6 to 6.7.0
|
9
|
+
* Update CommandImplementation to better support large files (affecting RST and POD6 rendering)
|
10
|
+
|
1
11
|
## 4.0.2 - 2023-10-10
|
2
12
|
* Add support for .mdx files in markdown
|
3
13
|
|
data/github-markup.gemspec
CHANGED
@@ -13,18 +13,19 @@ Gem::Specification.new do |s|
|
|
13
13
|
s.homepage = "https://github.com/github/markup"
|
14
14
|
s.license = "MIT"
|
15
15
|
|
16
|
+
s.required_ruby_version = '>= 3.0.0'
|
17
|
+
|
16
18
|
s.files = `git ls-files`.split($\)
|
17
|
-
s.files += Dir['vendor/**/*']
|
18
19
|
s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
19
20
|
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
20
21
|
s.require_paths = %w[lib]
|
21
22
|
|
22
23
|
s.add_development_dependency 'rake', '~> 12'
|
23
|
-
s.add_development_dependency 'activesupport', '~> 4
|
24
|
+
s.add_development_dependency 'activesupport', '~> 7.1.3.4'
|
24
25
|
s.add_development_dependency 'minitest', '~> 5.4', '>= 5.4.3'
|
25
26
|
s.add_development_dependency 'html-pipeline', '~> 1.0'
|
26
27
|
s.add_development_dependency 'sanitize', '>= 4.6.3'
|
27
|
-
s.add_development_dependency 'nokogiri', '~> 1.
|
28
|
-
s.add_development_dependency 'nokogiri-diff', '~> 0.
|
28
|
+
s.add_development_dependency 'nokogiri', '~> 1.16.5'
|
29
|
+
s.add_development_dependency 'nokogiri-diff', '~> 0.3.0'
|
29
30
|
s.add_development_dependency "github-linguist", ">= 7.1.3"
|
30
31
|
end
|
@@ -1,9 +1,4 @@
|
|
1
|
-
|
2
|
-
require "posix-spawn"
|
3
|
-
rescue LoadError
|
4
|
-
require "open3"
|
5
|
-
end
|
6
|
-
|
1
|
+
require "open3"
|
7
2
|
require "github/markup/implementation"
|
8
3
|
|
9
4
|
|
@@ -39,28 +34,13 @@ module GitHub
|
|
39
34
|
end
|
40
35
|
end
|
41
36
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
end
|
50
|
-
end
|
51
|
-
else
|
52
|
-
def execute(command, target)
|
53
|
-
output = Open3.popen3(*command) do |stdin, stdout, stderr, wait_thr|
|
54
|
-
stdin.puts target
|
55
|
-
stdin.close
|
56
|
-
if wait_thr.value.success?
|
57
|
-
stdout.readlines
|
58
|
-
else
|
59
|
-
raise CommandError.new(stderr.readlines.join('').strip)
|
60
|
-
end
|
61
|
-
end
|
62
|
-
sanitize(output.join(''), target.encoding)
|
63
|
-
end
|
37
|
+
def execute(command, target)
|
38
|
+
# capture3 blocks until both buffers are written to and the process terminates, but
|
39
|
+
# it won't allow either buffer to fill up
|
40
|
+
stdout, stderr, status = Open3.capture3(*command, stdin_data: target)
|
41
|
+
|
42
|
+
raise CommandError.new(stderr) unless status.success?
|
43
|
+
sanitize(stdout, target.encoding)
|
64
44
|
end
|
65
45
|
|
66
46
|
def sanitize(input, encoding)
|
data/lib/github-markup.rb
CHANGED
data/test/markup_test.rb
CHANGED
@@ -66,6 +66,11 @@ class MarkupTest < Minitest::Test
|
|
66
66
|
f.close_write
|
67
67
|
f.read
|
68
68
|
end
|
69
|
+
|
70
|
+
if ENV['UPDATE']
|
71
|
+
File.open(expected_file, 'w') { |f| f.write actual }
|
72
|
+
end
|
73
|
+
|
69
74
|
assert_html_equal expected, actual, <<message
|
70
75
|
#{File.basename expected_file}'s contents are not html equal to output:
|
71
76
|
#{diff}
|
@@ -106,7 +111,7 @@ message
|
|
106
111
|
begin
|
107
112
|
GitHub::Markup.render('README.java', "stop swallowing errors", symlink: false)
|
108
113
|
rescue GitHub::Markup::CommandError => e
|
109
|
-
assert_equal "failure message", e.message
|
114
|
+
assert_equal "failure message", e.message.strip
|
110
115
|
else
|
111
116
|
fail "an exception was expected but was not raised"
|
112
117
|
end
|