Sha256: fb2d28b0af98c9eebef933e4c7427c4a9e51ac67e3abc543dd002ca4340bbd0a

Contents?: true

Size: 532 Bytes

Versions: 2

Compression:

Stored size: 532 Bytes

Contents

require 'rails/generators'

module Gretel
  class InstallGenerator < Rails::Generators::Base
    source_root File.expand_path('../templates', __FILE__)
    
    desc "Creates a sample configuration file in config/breadcrumbs.rb"
    def create_config_file
      copy_file "breadcrumbs.rb", "config/breadcrumbs.rb"
    end

    desc "Creates an initializer with trail secret"
    def create_initializer
      initializer "gretel.rb" do
        %{Gretel::Trail::UrlStore.secret = '#{SecureRandom.hex(64)}'}
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gretel-3.0.0.beta4 lib/generators/gretel/install_generator.rb
gretel-3.0.0.beta3 lib/generators/gretel/install_generator.rb