Sha256: e35ee54e6896c6d718790afc6cf150a6b4c56e7423588ac430356e5ade6dba95

Contents?: true

Size: 443 Bytes

Versions: 3

Compression:

Stored size: 443 Bytes

Contents

require 'securerandom'

module LpTokenAuth
  module Generators
    class InstallGenerator < Rails::Generators::Base
      source_root File.expand_path('../templates', __FILE__)

      desc 'Creates a LpTokenAuth initializer in your application.'

      def create_initializer
        template 'initializer.rb.erb', 'config/initializers/lp_token_auth.rb'
      end

      def secret_key
        SecureRandom.hex(64)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
lp_token_auth-2.0.0 lib/generators/lp_token_auth/install_generator.rb
lp_token_auth-1.0.0 lib/generators/lp_token_auth/install_generator.rb
lp_token_auth-0.3.0 lib/generators/lp_token_auth/install_generator.rb