Skip to content

Commit

Permalink
Merge branch 'master' into 00-windows-find-so-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
heliocola authored Mar 13, 2024
2 parents 1b57559 + 8b10f41 commit 8415f67
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 24 deletions.
1 change: 1 addition & 0 deletions .ruby-gemset
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
redcloth
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.2.3
1 change: 0 additions & 1 deletion .rvmrc

This file was deleted.

3 changes: 2 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
2 changes: 1 addition & 1 deletion lib/redcloth/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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('.')
Expand Down
18 changes: 12 additions & 6 deletions redcloth.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand All @@ -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']
Expand All @@ -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
6 changes: 3 additions & 3 deletions spec/custom_tags_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ def fig( opts )
html << %Q{<div>\n}
html << %Q{<p>The last line of text.</p>}

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 == "<p>fig()>[no]{color:red}. 1.1 | img.jpg</p>"
expect(r.to_html).to eq("<p>fig()>[no]{color:red}. 1.1 | img.jpg</p>")
end

it "should not call just regular string methods" do
Expand All @@ -45,6 +45,6 @@ def fig( opts )

html = "<p>next. </p>"

r.to_html.should == html
expect(r.to_html).to eq(html)
end
end
2 changes: 1 addition & 1 deletion spec/erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
template = %{<%=t "This new ERB tag makes is so _easy_ to use *RedCloth*" %>}
expected = %{<p>This new <span class="caps">ERB</span> tag makes is so <em>easy</em> to use <strong>RedCloth</strong></p>}

ERB.new(template).result.should == expected
expect(ERB.new(template).result).to eq(expected)
end
end
2 changes: 1 addition & 1 deletion spec/extension_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def refs_smiley(text)

html = %Q{<p>You&#8217;re so silly! <img src='/images/emoticons/58_80.png' title=':P' class='smiley' /></p>}

RedCloth.new(input).to_html(:textile, :refs_smiley).should == html
expect(RedCloth.new(input).to_html(:textile, :refs_smiley)).to eq(html)
end

end
4 changes: 2 additions & 2 deletions spec/formatters/html_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions spec/formatters/latex_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions spec/parser_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8415f67

Please sign in to comment.