Sha256: 6350b7ff74cf4e77f5fdf84d812af22d1bace1467a9a098d4a9bf9942a7d1955
Contents?: true
Size: 761 Bytes
Versions: 1
Compression:
Stored size: 761 Bytes
Contents
# frozen_string_literal: true module Webhookr module Generators class InitGenerator < Rails::Generators::NamedBase desc "This generator creates an initializer file 'config/initializers/NAME.rb'" def init initializer("#{file_name}.rb") do file_contents.strip_heredoc end end def file_contents <<-eos # Webhookr Initializer ## Turn on http basic authentication for all plugins # Webhookr.config.basic_auth.username = "admin" # Webhookr.config.basic_auth.password = "password" ## Plugin Initializers go here ## eos end private def generate_security_token SecureRandom.hex(32) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
webhookr-0.3.0 | lib/generators/webhookr/init_generator.rb |