Skip to content

Commit 0ff11f2

Browse files
committed
Remove rors.org references
1 parent 056535f commit 0ff11f2

File tree

5 files changed

+21
-21
lines changed

5 files changed

+21
-21
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,23 @@ AutoHtml uses concepts found in "Pipes and Filters" processing design pattern:
3333

3434
```ruby
3535
link_filter = AutoHtml::Link.new(target: '_blank')
36-
link_filter.call('Checkout out my blog: http://rors.org')
37-
# => 'Checkout out my blog: <a target="blank" href="http://rors.org">http://rors.org</a>'
36+
link_filter.call('Checkout out auto_html: https://github.com/dejan/auto_html')
37+
# => 'Checkout out my blog: <a target="blank" href="https://github.com/dejan/auto_html">https://github.com/dejan/auto_html</a>'
3838

3939
emoji_filter = AutoHtml::Emoji.new
4040
emoji_filter.call(':point_left: yo!')
4141
# => '<img src="/images/emoji/unicode/1f448.png" class="emoji" title=":point_left:" alt=":point_left:" height="20" witdh="20" align="absmiddle" /> yo!'
4242

4343
# Use Pipeline to combine filters
4444
base_format = AutoHtml::Pipeline.new(link_filter, emoji_filter)
45-
base_format.call('Checkout out my blog: http://rors.org :point_left: yo!')
46-
# => 'Checkout out my blog: <a href="http://rors.org">http://rors.org</a> <img src="/images/emoji/unicode/1f448.png" class="emoji" title=":point_left:" alt=":point_left:" height="20" witdh="20" align="absmiddle" /> yo!'
45+
base_format.call('Checkout out auto_html: https://github.com/dejan/auto_html :point_left: yo!')
46+
# => 'Checkout out my blog: <a href="https://github.com/dejan/auto_html">https://github.com/dejan/auto_html</a> <img src="/images/emoji/unicode/1f448.png" class="emoji" title=":point_left:" alt=":point_left:" height="20" witdh="20" align="absmiddle" /> yo!'
4747

4848
# A pipeline can be reused in another pipeline. Note that the order of filters is important - ie you want
4949
# `Image` before `Link` filter so that URL of the image gets transformed to `img` tag and not `a` tag.
5050
comment_format = AutoHtml::Pipeline.new(AutoHtml::Markdown.new, AutoHtml::Image.new, base_format)
51-
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")
52-
# => "<p>Hello!</p>\n\n<p>Checkout out my blog: <a href="<img src="http://rors.org" target="_blank">http://rors.org</a> <img src="/images/emoji/unicode/1f448.png" />" class="emoji" title=":point_left:" alt=":point_left:" height="20" witdh="20" align="absmiddle" /> yo! </p>\n\n<p><a href="<img src="http://gifs.joelglovier.com/boom/booyah.gif" />" target="_blank"><img src="http://gifs.joelglovier.com/boom/booyah.gif" /></a></p>\n"
51+
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")
52+
# => "<p>Hello!</p>\n\n<p>Checkout out my blog: <a href="<img src="https://github.com/dejan/auto_html" target="_blank">https://github.com/dejan/auto_html</a> <img src="/images/emoji/unicode/1f448.png" />" class="emoji" title=":point_left:" alt=":point_left:" height="20" witdh="20" align="absmiddle" /> yo! </p>\n\n<p><a href="<img src="http://gifs.joelglovier.com/boom/booyah.gif" />" target="_blank"><img src="http://gifs.joelglovier.com/boom/booyah.gif" /></a></p>\n"
5353
```
5454

5555
## Bundled filters

spec/auto_html/image_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
RSpec.describe AutoHtml::Image do
66
it 'transforms an image link to image tag' do
7-
result = subject.call('http://rors.org/images/rails.png')
8-
expect(result).to eq('<img src="http://rors.org/images/rails.png" />')
7+
result = subject.call('https://example.org/images/rails.png')
8+
expect(result).to eq('<img src="https://example.org/images/rails.png" />')
99
end
1010

1111
it 'transforms image link with a param to image tag' do
@@ -30,8 +30,8 @@
3030
end
3131

3232
it 'transforms an image link within text to image tag' do
33-
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?')
34-
expect(result).to eq('Which do you prefer, this one <img src="http://www.lockhartfineart.com/images/Rio_Grande_Frost.JPG" />, or this one <img src="http://rors.org/images/rails.png" />?')
33+
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?')
34+
expect(result).to eq('Which do you prefer, this one <img src="http://www.lockhartfineart.com/images/Rio_Grande_Frost.JPG" />, or this one <img src="https://example.org/images/rails.png" />?')
3535
end
3636

3737
it 'transforms an image link with a lot of param to image tag' do

spec/auto_html/link_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@
4040

4141
it 'transforms with target options' do
4242
filter = described_class.new(target: '_blank')
43-
result = filter.call('http://rors.org')
44-
expect(result).to eq '<a href="http://rors.org" target="_blank">http://rors.org</a>'
43+
result = filter.call('https://example.org')
44+
expect(result).to eq '<a href="https://example.org" target="_blank">https://example.org</a>'
4545
end
4646

4747
it 'transforms with rel options' do
4848
filter = described_class.new(rel: 'nofollow')
49-
result = filter.call('http://rors.org')
50-
expect(result).to eq '<a href="http://rors.org" rel="nofollow">http://rors.org</a>'
49+
result = filter.call('https://example.org')
50+
expect(result).to eq '<a href="https://example.org" rel="nofollow">https://example.org</a>'
5151
end
5252

5353
it 'transforms with short_domains options' do
@@ -58,7 +58,7 @@
5858

5959
it 'transforms with target and rel options' do
6060
filter = described_class.new(target: '_blank', rel: 'nofollow')
61-
result = filter.call('http://rors.org')
62-
expect(result).to eq '<a href="http://rors.org" target="_blank" rel="nofollow">http://rors.org</a>'
61+
result = filter.call('https://example.org')
62+
expect(result).to eq '<a href="https://example.org" target="_blank" rel="nofollow">https://example.org</a>'
6363
end
6464
end

spec/auto_html/pipeline_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
subject { described_class.new(AutoHtml::SimpleFormat.new, AutoHtml::Image.new, AutoHtml::Link.new) }
77

88
it 'does not transforms input when no filters provided' do
9-
input = 'Hey check out my blog => http://rors.org'
9+
input = 'Hey check out my blog => https://example.org'
1010
result = described_class.new.call(input)
1111
expect(result).to eq input
1212
end
1313

1414
it 'transforms input using provided filters' do
15-
result = subject.call 'Check the logo: http://rors.org/images/rails.png. Visit: http://rubyonrails.org'
16-
expect(result).to eq '<p>Check the logo: <img src="http://rors.org/images/rails.png" />. Visit: <a href="http://rubyonrails.org">http://rubyonrails.org</a></p>'
15+
result = subject.call 'Check the logo: https://example.org/images/rails.png. Visit: http://rubyonrails.org'
16+
expect(result).to eq '<p>Check the logo: <img src="https://example.org/images/rails.png" />. Visit: <a href="http://rubyonrails.org">http://rubyonrails.org</a></p>'
1717
end
1818

1919
it 'is blank if input is blank' do

spec/auto_html/simple_format_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
RSpec.describe AutoHtml::SimpleFormat do
66
it 'formats input using simple rules' do
7-
result = subject.call('Hey check out my blog => http://rors.org')
8-
expect(result).to eq '<p>Hey check out my blog => http://rors.org</p>'
7+
result = subject.call('Hey check out my blog => https://example.org')
8+
expect(result).to eq '<p>Hey check out my blog => https://example.org</p>'
99

1010
expect(subject.call("crazy\r\n cross\r platform linebreaks")).to eq "<p>crazy\n<br /> cross\n<br /> platform linebreaks</p>"
1111
expect(subject.call("A paragraph\n\nand another one!")).to eq "<p>A paragraph</p>\n\n<p>and another one!</p>"

0 commit comments

Comments
 (0)