Sha256: 829ec9e280ba93092ab3388e1ea513d210ef9ecf5765e01baa5ccddedd78e54b

Contents?: true

Size: 651 Bytes

Versions: 6

Compression:

Stored size: 651 Bytes

Contents

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

module Traka
  module Generators
    class InstallGenerator < ::Rails::Generators::Base
      include Rails::Generators::Migration

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

      desc "Installs Traka into the app."

      def create_migration
        migration_template 'migration.rb', 'db/migrate/create_traka_changes.rb'
      end

      def create_version_file
        directory "public/system"
      end

      def self.next_migration_number dirname
        ActiveRecord::Generators::Base.next_migration_number dirname
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
traka-0.0.7 lib/generators/traka/install_generator.rb
traka-0.0.6 lib/generators/traka/install_generator.rb
traka-0.0.5 lib/generators/traka/install_generator.rb
traka-0.0.4 lib/generators/traka/install_generator.rb
traka-0.0.3 lib/generators/traka/install_generator.rb
traka-0.0.2 lib/generators/traka/install_generator.rb