Skip to content
This repository has been archived by the owner on Mar 1, 2019. It is now read-only.

Commit

Permalink
Replacing explicitly typed domains with what's provided by site_url
Browse files Browse the repository at this point in the history
  • Loading branch information
Brett Buddin committed Aug 27, 2010
1 parent 5069231 commit 58f3478
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/models/comics/a_softer_world.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def map_routine(xml)
self.description = "#{number}: #{real_title}"
self.posted_on = Date.parse(latest.pubDate.to_s)
date = self.posted_on.strftime('%Y%m%d')
self.permalink = "http://#{site_url.host}/index.php?id=#{number}"
self.permalink = "#{site_url}/index.php?id=#{number}"
self.image_url = latest.description.match(/http:\/\/www\.asofterworld\.com\/clean\/[^\/]+\.jpg/).to_s
end
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/comics/ctrl_alt_del.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def map_routine(xml)
self.description = latest.title.match(/Ctrl\+Alt\+Del: (.*)/)[1]
self.posted_on = Date.parse(latest.pubDate.to_s)
date = self.posted_on.strftime('%Y%m%d')
self.permalink = "http://#{site_url.host}/cad/#{date}"
self.permalink = "#{site_url}/#{date}"

content = ''
open(site_url) { |s| content = s.read }
Expand Down
2 changes: 1 addition & 1 deletion app/models/comics/lol_bots.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def map_routine(xml)
self.permalink = latest.link

date = latest.link.match(/[0-9]+/)[0]
self.image_url = "http://www.lolbots.com/strips/#{date}.png"
self.image_url = "#{site_url}/strips/#{date}.png"
end
end
end
4 changes: 2 additions & 2 deletions app/models/comics/penny_arcade.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ def map_routine(xml)

url_parts = latest.guid.to_s.match(/comic\/([0-9]+)\/([0-9]+)\/([0-9]+)\/([^\/]*)/)

self.permalink = "http://www.penny-arcade.com/#{url_parts[0]}"
self.permalink = "#{site_url}/#{url_parts[0]}"

content = ''
open("http://www.penny-arcade.com/#{url_parts[0]}") { |s| content = s.read }
open("#{site_url}/#{url_parts[0]}") { |s| content = s.read }
img_url = content.match(/<img src="(http:\/\/art\.penny-arcade\.com\/photos\/.+\.jpg)" alt=".+"( )+\/>/)
self.image_url = img_url[1]
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/comics/wondermark.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def map_routine(xml)
self.description = title_parts[2]
self.posted_on = Date.parse(latest.pubDate.to_s)
self.image_url = latest.description.match(/http:\/\/wondermark.com\/c\/.*\.gif/).to_s
self.permalink = "http://wondermark.com/#{title_parts[1]}/"
self.permalink = "#{site_url}/#{title_parts[1]}/"
end
end
end

0 comments on commit 58f3478

Please sign in to comment.