diff --git a/.ruby-gemset b/.ruby-gemset new file mode 100644 index 00000000..b63763b0 --- /dev/null +++ b/.ruby-gemset @@ -0,0 +1 @@ +redcloth diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 00000000..b347b11e --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.2.3 diff --git a/.rvmrc b/.rvmrc deleted file mode 100644 index 91b91d32..00000000 --- a/.rvmrc +++ /dev/null @@ -1 +0,0 @@ -rvm --create use default@redcloth \ No newline at end of file diff --git a/CHANGELOG b/CHANGELOG index 6b27e448..fad394f3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,6 @@ -== 4.3.4 +== 4.3.4 / Mar 13th, 2024 +* A round of cleanups [Helio Cola] * Stop checking for main function in libc [Jean byroot Boussier] * Update maintainer, scrub redcloth.org [Jason Garber] * Add GitHub action [Anton Maminov] diff --git a/lib/redcloth/version.rb b/lib/redcloth/version.rb index 01946fca..a0a28c6d 100644 --- a/lib/redcloth/version.rb +++ b/lib/redcloth/version.rb @@ -2,7 +2,7 @@ module RedCloth module VERSION MAJOR = 4 MINOR = 3 - TINY = 3 + TINY = 4 # RELEASE_CANDIDATE = 0 STRING = [MAJOR, MINOR, TINY].compact.join('.') diff --git a/redcloth.gemspec b/redcloth.gemspec index 03fc97dd..3231cf14 100644 --- a/redcloth.gemspec +++ b/redcloth.gemspec @@ -9,12 +9,21 @@ Gem::Specification.new do |s| s.authors = ["Jason Garber", "Joshua Siler", "Ola Bini"] s.description = "Textile parser for Ruby." s.summary = RedCloth::SUMMARY - s.email = "redcloth-upwards@rubyforge.org" s.homepage = "https://github.com/jgarber/redcloth" - s.rubyforge_project = "redcloth" + s.license = "MIT" + s.platform = 'ruby' + s.required_ruby_version = Gem::Requirement.new(">= 2.4") s.rubygems_version = "1.3.7" + if s.respond_to?(:metadata=) + s.metadata = { + "bug_tracker_uri" => "https://github.com/jgarber/redcloth/issues", + "changelog_uri" => "https://github.com/jgarber/redcloth/blob/master/CHANGELOG", + "source_code_uri" => "https://github.com/jgarber/redcloth" + } + end + s.files = Dir['.gemtest', '.rspec', 'CHANGELOG', 'COPYING', 'Gemfile', 'README.rdoc', 'Rakefile', 'doc/**/*', 'bin/**/*', 'lib/**/*', 'redcloth.gemspec', 'spec/**/*', 'tasks/**/*'] s.test_files = Dir['spec/**/*'] s.executables = ['redcloth'] @@ -25,8 +34,6 @@ Gem::Specification.new do |s| s.files -= Dir['lib/**/*.bundle'] s.files -= Dir['lib/**/*.so'] - s.platform = 'ruby' - s.files += %w[attributes inline scan].map {|f| "ext/redcloth_scan/redcloth_#{f}.c"} s.files += ["ext/redcloth_scan/redcloth.h"] s.extensions = Dir['ext/**/extconf.rb'] @@ -36,5 +43,4 @@ Gem::Specification.new do |s| s.add_development_dependency('rspec', '~> 3.12') s.add_development_dependency('diff-lcs', '~> 1.5') - s.license = "MIT" -end +end \ No newline at end of file diff --git a/spec/custom_tags_spec.rb b/spec/custom_tags_spec.rb index 12b077ab..73947102 100644 --- a/spec/custom_tags_spec.rb +++ b/spec/custom_tags_spec.rb @@ -30,13 +30,13 @@ def fig( opts ) html << %Q{
The last line of text.
} - r.to_html.should == html + expect(r.to_html).to eq(html) end it "should fall back if custom tag isn't defined" do r = RedCloth.new %Q/fig()>[no]{color:red}. 1.1 | img.jpg/ - r.to_html.should == "fig()>[no]{color:red}. 1.1 | img.jpg
" + expect(r.to_html).to eq("fig()>[no]{color:red}. 1.1 | img.jpg
") end it "should not call just regular string methods" do @@ -45,6 +45,6 @@ def fig( opts ) html = "next.
" - r.to_html.should == html + expect(r.to_html).to eq(html) end end diff --git a/spec/erb_spec.rb b/spec/erb_spec.rb index 992903a5..71c11b65 100644 --- a/spec/erb_spec.rb +++ b/spec/erb_spec.rb @@ -5,6 +5,6 @@ template = %{<%=t "This new ERB tag makes is so _easy_ to use *RedCloth*" %>} expected = %{This new ERB tag makes is so easy to use RedCloth
} - ERB.new(template).result.should == expected + expect(ERB.new(template).result).to eq(expected) end end \ No newline at end of file diff --git a/spec/extension_spec.rb b/spec/extension_spec.rb index d1cb9941..59818c87 100644 --- a/spec/extension_spec.rb +++ b/spec/extension_spec.rb @@ -20,7 +20,7 @@ def refs_smiley(text) html = %Q{You’re so silly!
} - RedCloth.new(input).to_html(:textile, :refs_smiley).should == html + expect(RedCloth.new(input).to_html(:textile, :refs_smiley)).to eq(html) end end \ No newline at end of file diff --git a/spec/formatters/html_spec.rb b/spec/formatters/html_spec.rb index ac76a08e..5516e8e3 100644 --- a/spec/formatters/html_spec.rb +++ b/spec/formatters/html_spec.rb @@ -6,8 +6,8 @@ end it "should not raise an error when orphaned parentheses in a link are followed by punctuation and words in HTML" do - lambda { + expect { RedCloth.new(%Q{Test "(read this":http://test.host), ok}).to_html - }.should_not raise_error + }.not_to raise_error end end \ No newline at end of file diff --git a/spec/formatters/latex_spec.rb b/spec/formatters/latex_spec.rb index 404160e6..de6e8bc0 100644 --- a/spec/formatters/latex_spec.rb +++ b/spec/formatters/latex_spec.rb @@ -6,8 +6,8 @@ end it "should not raise an error when orphaned parentheses in a link are followed by punctuation and words in LaTeX" do - lambda { + expect { RedCloth.new(%Q{Test "(read this":http://test.host), ok}).to_latex - }.should_not raise_error + }.not_to raise_error end end \ No newline at end of file diff --git a/spec/parser_spec.rb b/spec/parser_spec.rb index f56c3acc..8a0bb017 100644 --- a/spec/parser_spec.rb +++ b/spec/parser_spec.rb @@ -4,15 +4,15 @@ describe "#new" do it "should accept options" do - lambda { + expect { RedCloth.new("test", [:hard_breaks]) - }.should_not raise_error + }.not_to raise_error end end it "should have a VERSION" do - RedCloth.const_defined?("VERSION").should be_truthy - RedCloth::VERSION.const_defined?("STRING").should be_truthy + expect(RedCloth.const_defined?("VERSION")).to be_truthy + expect(RedCloth::VERSION.const_defined?("STRING")).to be_truthy end it "should show the version as a string" do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 74a5cae4..761895d3 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -10,11 +10,11 @@ def examples_from_yaml(&block) if doc[formatter] example("should output #{formatter} for #{name}") do output = method("format_as_#{formatter}").call(doc) - output.should == doc[formatter] + expect(output).to eq(doc[formatter]) end else example("should not raise errors when rendering #{formatter} for #{name}") do - lambda { method("format_as_#{formatter}").call(doc) }.should_not raise_error + expect { method("format_as_#{formatter}").call(doc) }.not_to raise_error end end end