-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
61 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,6 @@ storage | |
tmp | ||
|
||
public/sitemap.xml.gz | ||
|
||
app/assets/builds | ||
public/assets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
class RailsReleasesController < ApplicationController | ||
def show | ||
@gemmy = Gemmy.find_by!(name: params[:gemmy_id]) | ||
@gemmy = Gemmy.find_by_name!(params[:gemmy_id]) | ||
@rails_release = RailsRelease.find_by!(version: params[:id].gsub("rails-", "").gsub("-", ".")) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,42 @@ | ||
require "fog-aws" | ||
unless Rails.env.local? | ||
require "fog-aws" | ||
|
||
SitemapGenerator::Sitemap.default_host = "https://www.railsbump.org" | ||
SitemapGenerator::Sitemap.public_path = "tmp/sitemaps/" # Temporary storage before uploading to S3 | ||
SitemapGenerator::Sitemap.adapter = SitemapGenerator::S3Adapter.new( | ||
fog_provider: "AWS", | ||
fog_directory: "railsbump.org", | ||
fog_region: ENV["AWS_REGION"], | ||
aws_bucket: "railsbump.org", | ||
aws_access_key_id: ENV["AWS_ACCESS_KEY_ID"], | ||
aws_secret_access_key: ENV["AWS_SECRET_ACCESS_KEY"], | ||
aws_region: ENV["AWS_REGION"] | ||
) | ||
SitemapGenerator::Sitemap.default_host = "https://www.railsbump.org" | ||
SitemapGenerator::Sitemap.public_path = "tmp/sitemaps/" # Temporary storage before uploading to S3 | ||
SitemapGenerator::Sitemap.adapter = SitemapGenerator::S3Adapter.new( | ||
fog_provider: "AWS", | ||
fog_directory: "railsbump.org", | ||
fog_region: ENV["AWS_REGION"], | ||
aws_bucket: "railsbump.org", | ||
aws_access_key_id: ENV["AWS_ACCESS_KEY_ID"], | ||
aws_secret_access_key: ENV["AWS_SECRET_ACCESS_KEY"], | ||
aws_region: ENV["AWS_REGION"] | ||
) | ||
|
||
opts = { | ||
create_index: true, | ||
default_host: "https://www.railsbump.org", | ||
compress: false, | ||
public_path: "/tmp", | ||
sitemaps_host: ENV["FOG_URL"], | ||
sitemaps_path: "" | ||
} | ||
opts = { | ||
create_index: true, | ||
default_host: "https://www.railsbump.org", | ||
compress: false, | ||
public_path: "/tmp", | ||
sitemaps_host: ENV["FOG_URL"], | ||
sitemaps_path: "" | ||
} | ||
|
||
rails_releases = RailsRelease.order(:version).to_a | ||
rails_releases = RailsRelease.order(:version).to_a | ||
|
||
SitemapGenerator::Sitemap.create opts do | ||
# Add static paths | ||
add root_path, changefreq: "daily", priority: 1.0 | ||
add new_gemmy_path, changefreq: "monthly" | ||
add new_lockfile_path, changefreq: "monthly" | ||
SitemapGenerator::Sitemap.create opts do | ||
# Add static paths | ||
add root_path, changefreq: "daily", priority: 1.0 | ||
add new_gemmy_path, changefreq: "monthly" | ||
add new_lockfile_path, changefreq: "monthly" | ||
|
||
# Add dynamic paths for all gemmies | ||
Gemmy.find_each do |gemmy| | ||
add gemmy_path(gemmy), lastmod: gemmy.last_checked_at, changefreq: "weekly", priority: 0.8 | ||
# Add dynamic paths for all gemmies | ||
Gemmy.find_each do |gemmy| | ||
add gemmy_path(gemmy), lastmod: gemmy.last_checked_at, changefreq: "weekly", priority: 0.8 | ||
|
||
rails_releases.each do |rails_release| | ||
add gemmy_rails_release_path(gemmy, rails_release) | ||
rails_releases.each do |rails_release| | ||
add gemmy_rails_release_path(gemmy, rails_release) | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters