Sha256: d07265a25884d1b8444406329b6f585484164d8a596f8e0486ac19af5bb9d5ed

Contents?: true

Size: 799 Bytes

Versions: 8

Compression:

Stored size: 799 Bytes

Contents

module StandaloneMigrations
  class Tasks
    class << self
      def configure
        Deprecations.new.call
        config_database_file = Configurator.new.config
        paths = Rails.application.config.paths
        paths.add "config/database", :with => config_database_file
      end

      def load_tasks
        configure

        MinimalRailtieConfig.load_tasks
        %w(
          connection
          environment
          db/new_migration
        ).each do
          |task| load "standalone_migrations/tasks/#{task}.rake"
        end
        load "active_record/railties/databases.rake"
      end
    end
  end

  class Tasks::Deprecations
    def call
      if File.directory?('db/migrations')
        puts "DEPRECATED move your migrations into db/migrate"
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
standalone_migrations-2.1.0 lib/standalone_migrations/tasks.rb
standalone_migrations-2.0.6 lib/standalone_migrations/tasks.rb
standalone_migrations-2.0.5 lib/standalone_migrations/tasks.rb
standalone_migrations-2.0.4 lib/standalone_migrations/tasks.rb
standalone_migrations-2.0.3 lib/standalone_migrations/tasks.rb
standalone_migrations-2.0.2 lib/standalone_migrations/tasks.rb
standalone_migrations-2.0.1 lib/standalone_migrations/tasks.rb
standalone_migrations-2.0.0 lib/standalone_migrations/tasks.rb