Sha256: ef4eaabd2e5818674b8764a54ed131a2b4fd611b0cb68a4423f7e92711268815

Contents?: true

Size: 565 Bytes

Versions: 9

Compression:

Stored size: 565 Bytes

Contents

# frozen_string_literal: true

require "rails/generators/active_record"

module RailsServerMonitor
  module Generators
    class InstallGenerator < Rails::Generators::Base
      include ActiveRecord::Generators::Migration
      source_root File.join(__dir__, "templates")

      def copy_migration
        migration_template "install.rb", "db/migrate/rails_server_monitor_install.rb", migration_version: migration_version
      end

      def migration_version
        "[#{ActiveRecord::VERSION::MAJOR}.#{ActiveRecord::VERSION::MINOR}]"
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rails-server-monitor-0.2.1 lib/generators/rails_server_monitor/install_generator.rb
rails-server-monitor-0.2.0 lib/generators/rails_server_monitor/install_generator.rb
rails-server-monitor-0.1.10 lib/generators/rails_server_monitor/install_generator.rb
rails-server-monitor-0.1.9 lib/generators/rails_server_monitor/install_generator.rb
rails-server-monitor-0.1.8 lib/generators/rails_server_monitor/install_generator.rb
rails-server-monitor-0.1.7 lib/generators/rails_server_monitor/install_generator.rb
rails-server-monitor-0.1.6 lib/generators/rails_server_monitor/install_generator.rb
rails-server-monitor-0.1.5 lib/generators/rails_server_monitor/install_generator.rb
rails-server-monitor-0.1.4 lib/generators/rails_server_monitor/install_generator.rb