RedCloth 4.3.3 → 4.3.4

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: 3e774a70b77a51fd99310d8ac12418de23dc1028372024f09ff80db0e92dfce3
4
- data.tar.gz: f3aa2ff8b6650b883947c9496e6b1ece61b1abdf4a6d85a9b8411c94c125c4f5
3
+ metadata.gz: 3bf6223596d141287ffe67bb0321d0cb329110cf056730a6a88072123e61eb23
4
+ data.tar.gz: 66e55aa28a5fd6d69e9140fc822e9b299bd8fd8b68747cbb61b1322e1686774d
5
5
  SHA512:
6
- metadata.gz: 2fceea8abce902bbbc98f0c5e969e3acdbeebd2614f409b3befa216d3cf7012158c8175edbaa2f3f84f9ac7474b40dc40302e010914eda205b5b8a3a45bbfcb4
7
- data.tar.gz: 7db2b9647d05ee81462c2ffb7fd006a9174c971f80e35a527dfe5878d243e8617f502a6d9801ed9fbe652297648975f2dd5eea3db3991ec86339d892b5c6c8d4
6
+ metadata.gz: 330980e516cd9966d6860e92ca917d102c9957635bdf76869774a8b8893d372da7aeca4f5d69da3a8db6d98b3c2d8f97f5628f9c96309e34ea424503fbcdb40a
7
+ data.tar.gz: c1614dce1f131bed42fed09cef9e4679ef0d7f49868548d355ce1ee5d2753dd64f9c7e172e70d90a838464f70653c78f9e91e149f22909a6eadd63305969593e
data/CHANGELOG CHANGED
@@ -1,8 +1,16 @@
1
+ == 4.3.4 / Mar 13th, 2024
2
+
3
+ * A round of cleanups [Helio Cola]
4
+ * Stop checking for main function in libc [Jean byroot Boussier]
5
+ * Update maintainer, scrub redcloth.org [Jason Garber]
6
+ * Add GitHub action [Anton Maminov]
7
+
1
8
  == 4.3.3 / Nov 2nd, 2023
2
9
 
3
10
  * Add tests for CVE-2023-31606 [Helio Cola]
4
11
  * Fix rake compile [Helio Cola and Faria Education Group]
5
12
  * Fix CVE-2023-31606 (ReDOS possible in the sanitize_html function) [Kornelius Kalnbach and Merbin Russel]
13
+ * Immutable strings [Matijs van Zuijlen]
6
14
 
7
15
  == 4.3.2 / May 23rd, 2016
8
16
 
data/README.rdoc CHANGED
@@ -1,14 +1,12 @@
1
1
  = RedCloth - Textile parser for Ruby
2
2
 
3
- Homepage:: http://redcloth.org
4
- Maintainer:: Joshua Siler https://github.com/joshuasiler
3
+ Homepage:: https://github.com/jgarber/redcloth
4
+ Maintainer:: Helio Cola https://github.com/heliocola
5
5
  Author:: Jason Garber
6
6
  Copyright:: (c) 2011 Jason Garber
7
7
  License:: MIT
8
8
 
9
- {<img src="https://travis-ci.org/jgarber/redcloth.svg" />}[https://travis-ci.org/jgarber/redcloth] {<img src="https://codeclimate.com/github/jgarber/redcloth/badges/gpa.svg" />}[https://codeclimate.com/github/jgarber/redcloth]
10
-
11
- (See http://redcloth.org/textile/ for a Textile reference.)
9
+ {rdoc-image:https://codeclimate.com/github/jgarber/redcloth/badges/gpa.svg}[https://codeclimate.com/github/jgarber/redcloth]
12
10
 
13
11
  = RedCloth
14
12
 
@@ -2,5 +2,4 @@ require 'mkmf'
2
2
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
3
3
  $CFLAGS << ' -O0 -Wall ' if CONFIG['CC'] =~ /gcc/
4
4
  dir_config("redcloth_scan")
5
- have_library("c", "main")
6
5
  create_makefile("redcloth_scan")
@@ -2,7 +2,7 @@ module RedCloth
2
2
  module VERSION
3
3
  MAJOR = 4
4
4
  MINOR = 3
5
- TINY = 3
5
+ TINY = 4
6
6
  # RELEASE_CANDIDATE = 0
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY].compact.join('.')
@@ -22,7 +22,7 @@ module RedCloth
22
22
 
23
23
  NAME = "RedCloth"
24
24
  GEM_NAME = NAME
25
- URL = "http://redcloth.org/"
25
+ URL = "https://github.com/jgarber/redcloth"
26
26
  description = "Textile parser for Ruby."
27
27
 
28
28
  if RedCloth.const_defined?(:EXTENSION_LANGUAGE)
data/lib/redcloth.rb CHANGED
@@ -10,6 +10,11 @@ begin
10
10
  conf = Object.const_get(defined?(RbConfig) ? :RbConfig : :Config)::CONFIG
11
11
  prefix = conf['arch'] =~ /mswin|mingw/ ? "#{conf['MAJOR']}.#{conf['MINOR']}/" : ''
12
12
  lib = "#{prefix}redcloth_scan"
13
+ begin
14
+ require lib
15
+ rescue LoadError => e
16
+ lib = "redcloth_scan"
17
+ end
13
18
  require lib
14
19
  rescue LoadError => e
15
20
  e.message << %{\nCouldn't load #{lib}\nThe $LOAD_PATH was:\n#{$LOAD_PATH.join("\n")}}
data/redcloth.gemspec CHANGED
@@ -9,12 +9,20 @@ Gem::Specification.new do |s|
9
9
  s.authors = ["Jason Garber", "Joshua Siler", "Ola Bini"]
10
10
  s.description = "Textile parser for Ruby."
11
11
  s.summary = RedCloth::SUMMARY
12
- s.email = "redcloth-upwards@rubyforge.org"
13
- s.homepage = "http://redcloth.org"
14
- s.rubyforge_project = "redcloth"
12
+ s.homepage = "https://github.com/jgarber/redcloth"
13
+ s.license = "MIT"
15
14
 
15
+ s.platform = 'ruby'
16
+ s.required_ruby_version = Gem::Requirement.new(">= 2.4")
16
17
  s.rubygems_version = "1.3.7"
17
- s.default_executable = "redcloth"
18
+
19
+ if s.respond_to?(:metadata=)
20
+ s.metadata = {
21
+ "bug_tracker_uri" => "https://github.com/jgarber/redcloth/issues",
22
+ "changelog_uri" => "https://github.com/jgarber/redcloth/blob/master/CHANGELOG",
23
+ "source_code_uri" => "https://github.com/jgarber/redcloth"
24
+ }
25
+ end
18
26
 
19
27
  s.files = Dir['.gemtest', '.rspec', 'CHANGELOG', 'COPYING', 'Gemfile', 'README.rdoc', 'Rakefile', 'doc/**/*', 'bin/**/*', 'lib/**/*', 'redcloth.gemspec', 'spec/**/*', 'tasks/**/*']
20
28
  s.test_files = Dir['spec/**/*']
@@ -26,8 +34,6 @@ Gem::Specification.new do |s|
26
34
  s.files -= Dir['lib/**/*.bundle']
27
35
  s.files -= Dir['lib/**/*.so']
28
36
 
29
- s.platform = 'ruby'
30
-
31
37
  s.files += %w[attributes inline scan].map {|f| "ext/redcloth_scan/redcloth_#{f}.c"}
32
38
  s.files += ["ext/redcloth_scan/redcloth.h"]
33
39
  s.extensions = Dir['ext/**/extconf.rb']
@@ -37,5 +43,4 @@ Gem::Specification.new do |s|
37
43
  s.add_development_dependency('rspec', '~> 3.12')
38
44
  s.add_development_dependency('diff-lcs', '~> 1.5')
39
45
 
40
- s.license = "MIT"
41
- end
46
+ end
@@ -30,13 +30,13 @@ describe "custom tags" do
30
30
  html << %Q{<div>\n}
31
31
  html << %Q{<p>The last line of text.</p>}
32
32
 
33
- r.to_html.should == html
33
+ expect(r.to_html).to eq(html)
34
34
  end
35
35
 
36
36
  it "should fall back if custom tag isn't defined" do
37
37
  r = RedCloth.new %Q/fig()>[no]{color:red}. 1.1 | img.jpg/
38
38
 
39
- r.to_html.should == "<p>fig()>[no]{color:red}. 1.1 | img.jpg</p>"
39
+ expect(r.to_html).to eq("<p>fig()>[no]{color:red}. 1.1 | img.jpg</p>")
40
40
  end
41
41
 
42
42
  it "should not call just regular string methods" do
@@ -45,6 +45,6 @@ describe "custom tags" do
45
45
 
46
46
  html = "<p>next. </p>"
47
47
 
48
- r.to_html.should == html
48
+ expect(r.to_html).to eq(html)
49
49
  end
50
50
  end
data/spec/erb_spec.rb CHANGED
@@ -5,6 +5,6 @@ describe "ERB helper" do
5
5
  template = %{<%=t "This new ERB tag makes is so _easy_ to use *RedCloth*" %>}
6
6
  expected = %{<p>This new <span class="caps">ERB</span> tag makes is so <em>easy</em> to use <strong>RedCloth</strong></p>}
7
7
 
8
- ERB.new(template).result.should == expected
8
+ expect(ERB.new(template).result).to eq(expected)
9
9
  end
10
10
  end
@@ -20,7 +20,7 @@ describe RedClothSmileyExtension do
20
20
 
21
21
  html = %Q{<p>You&#8217;re so silly! <img src='/images/emoticons/58_80.png' title=':P' class='smiley' /></p>}
22
22
 
23
- RedCloth.new(input).to_html(:textile, :refs_smiley).should == html
23
+ expect(RedCloth.new(input).to_html(:textile, :refs_smiley)).to eq(html)
24
24
  end
25
25
 
26
26
  end
@@ -6,8 +6,8 @@ describe "HTML" do
6
6
  end
7
7
 
8
8
  it "should not raise an error when orphaned parentheses in a link are followed by punctuation and words in HTML" do
9
- lambda {
9
+ expect {
10
10
  RedCloth.new(%Q{Test "(read this":http://test.host), ok}).to_html
11
- }.should_not raise_error
11
+ }.not_to raise_error
12
12
  end
13
13
  end
@@ -6,8 +6,8 @@ describe "LaTeX" do
6
6
  end
7
7
 
8
8
  it "should not raise an error when orphaned parentheses in a link are followed by punctuation and words in LaTeX" do
9
- lambda {
9
+ expect {
10
10
  RedCloth.new(%Q{Test "(read this":http://test.host), ok}).to_latex
11
- }.should_not raise_error
11
+ }.not_to raise_error
12
12
  end
13
13
  end
data/spec/parser_spec.rb CHANGED
@@ -4,15 +4,15 @@ describe RedCloth do
4
4
 
5
5
  describe "#new" do
6
6
  it "should accept options" do
7
- lambda {
7
+ expect {
8
8
  RedCloth.new("test", [:hard_breaks])
9
- }.should_not raise_error
9
+ }.not_to raise_error
10
10
  end
11
11
  end
12
12
 
13
13
  it "should have a VERSION" do
14
- RedCloth.const_defined?("VERSION").should be_truthy
15
- RedCloth::VERSION.const_defined?("STRING").should be_truthy
14
+ expect(RedCloth.const_defined?("VERSION")).to be_truthy
15
+ expect(RedCloth::VERSION.const_defined?("STRING")).to be_truthy
16
16
  end
17
17
 
18
18
  it "should show the version as a string" do
data/spec/spec_helper.rb CHANGED
@@ -10,11 +10,11 @@ def examples_from_yaml(&block)
10
10
  if doc[formatter]
11
11
  example("should output #{formatter} for #{name}") do
12
12
  output = method("format_as_#{formatter}").call(doc)
13
- output.should == doc[formatter]
13
+ expect(output).to eq(doc[formatter])
14
14
  end
15
15
  else
16
16
  example("should not raise errors when rendering #{formatter} for #{name}") do
17
- lambda { method("format_as_#{formatter}").call(doc) }.should_not raise_error
17
+ expect { method("format_as_#{formatter}").call(doc) }.not_to raise_error
18
18
  end
19
19
  end
20
20
  end
data/tasks/compile.rake CHANGED
@@ -29,7 +29,6 @@ require 'mkmf'
29
29
  CONFIG['warnflags'].gsub!(/-Wshorten-64-to-32/, '') if CONFIG['warnflags']
30
30
  $CFLAGS << ' -O0 -Wall ' if CONFIG['CC'] =~ /gcc/
31
31
  dir_config("redcloth_scan")
32
- have_library("c", "main")
33
32
  create_makefile("redcloth_scan")
34
33
  EOF
35
34
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: RedCloth
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.3
4
+ version: 4.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Garber
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-11-03 00:00:00.000000000 Z
13
+ date: 2024-03-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -69,7 +69,7 @@ dependencies:
69
69
  - !ruby/object:Gem::Version
70
70
  version: '1.5'
71
71
  description: Textile parser for Ruby.
72
- email: redcloth-upwards@rubyforge.org
72
+ email:
73
73
  executables:
74
74
  - redcloth
75
75
  extensions:
@@ -143,10 +143,13 @@ files:
143
143
  - tasks/release.rake
144
144
  - tasks/rspec.rake
145
145
  - tasks/rvm.rake
146
- homepage: http://redcloth.org
146
+ homepage: https://github.com/jgarber/redcloth
147
147
  licenses:
148
148
  - MIT
149
- metadata: {}
149
+ metadata:
150
+ bug_tracker_uri: https://github.com/jgarber/redcloth/issues
151
+ changelog_uri: https://github.com/jgarber/redcloth/blob/master/CHANGELOG
152
+ source_code_uri: https://github.com/jgarber/redcloth
150
153
  post_install_message:
151
154
  rdoc_options:
152
155
  - "--charset=UTF-8"
@@ -164,17 +167,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
164
167
  requirements:
165
168
  - - ">="
166
169
  - !ruby/object:Gem::Version
167
- version: '0'
170
+ version: '2.4'
168
171
  required_rubygems_version: !ruby/object:Gem::Requirement
169
172
  requirements:
170
173
  - - ">="
171
174
  - !ruby/object:Gem::Version
172
175
  version: '0'
173
176
  requirements: []
174
- rubygems_version: 3.4.19
177
+ rubygems_version: 3.5.6
175
178
  signing_key:
176
179
  specification_version: 4
177
- summary: RedCloth-4.3.3
180
+ summary: RedCloth-4.3.4
178
181
  test_files:
179
182
  - spec/benchmark_spec.rb
180
183
  - spec/custom_tags_spec.rb