Sha256: 551f12306401b47fb44b10dd56bfce7feb044e3608b5910ff0113dac1a584d62
Contents?: true
Size: 797 Bytes
Versions: 8
Compression:
Stored size: 797 Bytes
Contents
# frozen_string_literal: true require_relative 'base' module Bankai module Generators HOST_TEMPLATE = <<-RUBY if Rails.env.production? "https://\#{ENV['APPLICATION_HOST']}" else "http://\#{ENV['APPLICATION_HOST']}" end RUBY # :nodoc: class SitemapGenerator < Base def add_sitemap_generator gem 'sitemap_generator' in_root { run 'bundle install' } end def init_sitemap in_root { run 'bundle exec rake sitemap:install' } end def generate_sitmap_config gsub_file 'config/sitemap.rb', %r{"http://www.example.com"}, HOST_TEMPLATE in_root do run 'bundle exec rubocop -a config/sitemap.rb' end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems