Sha256: 00248cdc0a722c35b764f4dcebf0c9a1ccde35620eb99ab928f3f05a077c06cd

Contents?: true

Size: 634 Bytes

Versions: 4

Compression:

Stored size: 634 Bytes

Contents

# -*- encoding : utf-8 -*-

require 'rails/generators/guacamole_generator'

module Guacamole
  module Generators
    class ConfigGenerator < Rails::Generators::Base
      desc 'Creates a Guacamole configuration file at config/guacamole.yml'

      argument :database_name, type: :string, optional: true

      def self.source_root
        @_guacamole_source_root ||= File.expand_path('../templates', __FILE__)
      end

      def app_name
        Rails.application.class.parent.to_s.underscore
      end

      def create_config_file
        template 'guacamole.yml', File.join('config', 'guacamole.yml')
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
guacamole-0.4.0 lib/rails/generators/guacamole/config/config_generator.rb
guacamole-0.3.0 lib/rails/generators/guacamole/config/config_generator.rb
guacamole-0.2.0 lib/rails/generators/guacamole/config/config_generator.rb
guacamole-0.1.0 lib/rails/generators/guacamole/config/config_generator.rb