From 0ff11f24759d3a779a461ccdf6df099d3052887c Mon Sep 17 00:00:00 2001 From: Dejan Simic Date: Sat, 4 Jan 2025 00:53:46 +0100 Subject: [PATCH] Remove rors.org references --- README.md | 12 ++++++------ spec/auto_html/image_spec.rb | 8 ++++---- spec/auto_html/link_spec.rb | 12 ++++++------ spec/auto_html/pipeline_spec.rb | 6 +++--- spec/auto_html/simple_format_spec.rb | 4 ++-- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index f2fc6c8c..b15bba68 100644 --- a/README.md +++ b/README.md @@ -33,8 +33,8 @@ AutoHtml uses concepts found in "Pipes and Filters" processing design pattern: ```ruby link_filter = AutoHtml::Link.new(target: '_blank') -link_filter.call('Checkout out my blog: http://rors.org') -# => 'Checkout out my blog: http://rors.org' +link_filter.call('Checkout out auto_html: https://github.com/dejan/auto_html') +# => 'Checkout out my blog: https://github.com/dejan/auto_html' emoji_filter = AutoHtml::Emoji.new emoji_filter.call(':point_left: yo!') @@ -42,14 +42,14 @@ emoji_filter.call(':point_left: yo!') # Use Pipeline to combine filters base_format = AutoHtml::Pipeline.new(link_filter, emoji_filter) -base_format.call('Checkout out my blog: http://rors.org :point_left: yo!') -# => 'Checkout out my blog: http://rors.org :point_left: yo!' +base_format.call('Checkout out auto_html: https://github.com/dejan/auto_html :point_left: yo!') +# => 'Checkout out my blog: https://github.com/dejan/auto_html :point_left: yo!' # A pipeline can be reused in another pipeline. Note that the order of filters is important - ie you want # `Image` before `Link` filter so that URL of the image gets transformed to `img` tag and not `a` tag. comment_format = AutoHtml::Pipeline.new(AutoHtml::Markdown.new, AutoHtml::Image.new, base_format) -comment_format.call("Hello!\n\n Checkout out my blog: http://rors.org :point_left: yo! \n\n http://gifs.joelglovier.com/boom/booyah.gif") -# => "

Hello!

\n\n

Checkout out my blog: http://rors.org " class="emoji" title=":point_left:" alt=":point_left:" height="20" witdh="20" align="absmiddle" /> yo!

\n\n

" target="_blank">

\n" +comment_format.call("Hello!\n\n Checkout out auto_html: https://github.com/dejan/auto_html :point_left: yo! \n\n http://gifs.joelglovier.com/boom/booyah.gif") +# => "

Hello!

\n\n

Checkout out my blog: https://github.com/dejan/auto_html " class="emoji" title=":point_left:" alt=":point_left:" height="20" witdh="20" align="absmiddle" /> yo!

\n\n

" target="_blank">

\n" ``` ## Bundled filters diff --git a/spec/auto_html/image_spec.rb b/spec/auto_html/image_spec.rb index 0acd2662..41bb58ff 100644 --- a/spec/auto_html/image_spec.rb +++ b/spec/auto_html/image_spec.rb @@ -4,8 +4,8 @@ RSpec.describe AutoHtml::Image do it 'transforms an image link to image tag' do - result = subject.call('http://rors.org/images/rails.png') - expect(result).to eq('') + result = subject.call('https://example.org/images/rails.png') + expect(result).to eq('') end it 'transforms image link with a param to image tag' do @@ -30,8 +30,8 @@ end it 'transforms an image link within text to image tag' do - result = subject.call('Which do you prefer, this one http://www.lockhartfineart.com/images/Rio_Grande_Frost.JPG, or this one http://rors.org/images/rails.png?') - expect(result).to eq('Which do you prefer, this one , or this one ?') + result = subject.call('Which do you prefer, this one http://www.lockhartfineart.com/images/Rio_Grande_Frost.JPG, or this one https://example.org/images/rails.png?') + expect(result).to eq('Which do you prefer, this one , or this one ?') end it 'transforms an image link with a lot of param to image tag' do diff --git a/spec/auto_html/link_spec.rb b/spec/auto_html/link_spec.rb index 61762bf2..f5006fc2 100644 --- a/spec/auto_html/link_spec.rb +++ b/spec/auto_html/link_spec.rb @@ -40,14 +40,14 @@ it 'transforms with target options' do filter = described_class.new(target: '_blank') - result = filter.call('http://rors.org') - expect(result).to eq 'http://rors.org' + result = filter.call('https://example.org') + expect(result).to eq 'https://example.org' end it 'transforms with rel options' do filter = described_class.new(rel: 'nofollow') - result = filter.call('http://rors.org') - expect(result).to eq 'http://rors.org' + result = filter.call('https://example.org') + expect(result).to eq 'https://example.org' end it 'transforms with short_domains options' do @@ -58,7 +58,7 @@ it 'transforms with target and rel options' do filter = described_class.new(target: '_blank', rel: 'nofollow') - result = filter.call('http://rors.org') - expect(result).to eq 'http://rors.org' + result = filter.call('https://example.org') + expect(result).to eq 'https://example.org' end end diff --git a/spec/auto_html/pipeline_spec.rb b/spec/auto_html/pipeline_spec.rb index efc693c7..80ca1de2 100644 --- a/spec/auto_html/pipeline_spec.rb +++ b/spec/auto_html/pipeline_spec.rb @@ -6,14 +6,14 @@ subject { described_class.new(AutoHtml::SimpleFormat.new, AutoHtml::Image.new, AutoHtml::Link.new) } it 'does not transforms input when no filters provided' do - input = 'Hey check out my blog => http://rors.org' + input = 'Hey check out my blog => https://example.org' result = described_class.new.call(input) expect(result).to eq input end it 'transforms input using provided filters' do - result = subject.call 'Check the logo: http://rors.org/images/rails.png. Visit: http://rubyonrails.org' - expect(result).to eq '

Check the logo: . Visit: http://rubyonrails.org

' + result = subject.call 'Check the logo: https://example.org/images/rails.png. Visit: http://rubyonrails.org' + expect(result).to eq '

Check the logo: . Visit: http://rubyonrails.org

' end it 'is blank if input is blank' do diff --git a/spec/auto_html/simple_format_spec.rb b/spec/auto_html/simple_format_spec.rb index d5e69e81..880d0633 100644 --- a/spec/auto_html/simple_format_spec.rb +++ b/spec/auto_html/simple_format_spec.rb @@ -4,8 +4,8 @@ RSpec.describe AutoHtml::SimpleFormat do it 'formats input using simple rules' do - result = subject.call('Hey check out my blog => http://rors.org') - expect(result).to eq '

Hey check out my blog => http://rors.org

' + result = subject.call('Hey check out my blog => https://example.org') + expect(result).to eq '

Hey check out my blog => https://example.org

' expect(subject.call("crazy\r\n cross\r platform linebreaks")).to eq "

crazy\n
cross\n
platform linebreaks

" expect(subject.call("A paragraph\n\nand another one!")).to eq "

A paragraph

\n\n

and another one!

"