Sha256: 6bffcc88fe6598e3fb83339de573e2f3ca403a23c72656a609e992f63440e9d5

Contents?: true

Size: 823 Bytes

Versions: 8

Compression:

Stored size: 823 Bytes

Contents

require 'rails/generators'
require 'rails/generators/migration'
require 'rails/generators/active_record/migration'

module QuoVadis
  class InstallGenerator < Rails::Generators::Base
    include Rails::Generators::Migration
    extend ActiveRecord::Generators::Migration

    source_root File.expand_path('../templates', __FILE__)

    desc 'Copies an initializer, a locale file, and a migration to your application.'


    def copy_locale_file
      copy_file '../../../../config/locales/quo_vadis.en.yml', 'config/locales/quo_vadis.en.yml'
    end

    def copy_initializer_file
      copy_file '../../../../config/initializers/quo_vadis.rb', 'config/initializers/quo_vadis.rb'
    end

    def create_migration_file
      migration_template 'migration.rb', 'db/migrate/add_authentication_to_users.rb'
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
quo_vadis-1.0.7 lib/generators/quo_vadis/install_generator.rb
quo_vadis-1.0.6 lib/generators/quo_vadis/install_generator.rb
quo_vadis-1.0.5 lib/generators/quo_vadis/install_generator.rb
quo_vadis-1.0.4 lib/generators/quo_vadis/install_generator.rb
quo_vadis-1.0.3 lib/generators/quo_vadis/install_generator.rb
quo_vadis-1.0.2 lib/generators/quo_vadis/install_generator.rb
quo_vadis-1.0.1 lib/generators/quo_vadis/install_generator.rb
quo_vadis-1.0.0 lib/generators/quo_vadis/install_generator.rb