Sha256: 0f994dc1f2da19e7788e3c9949a4729c48af47365750a2377d08ed66f3f38e8b

Contents?: true

Size: 648 Bytes

Versions: 23

Compression:

Stored size: 648 Bytes

Contents

module StrongMigrations
  module DatabaseTasks
    # Active Record 7 adds version argument
    def migrate(*args)
      super
    rescue => e
      if e.cause.is_a?(StrongMigrations::Error)
        # strip cause and clean backtrace
        def e.cause
          nil
        end

        def e.message
          super.sub("\n\n\n", "\n\n") + "\n"
        end

        unless Rake.application.options.trace
          def e.backtrace
            bc = ActiveSupport::BacktraceCleaner.new
            bc.add_silencer { |line| line =~ /strong_migrations/ }
            bc.clean(super)
          end
        end
      end

      raise e
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
strong_migrations-2.0.1 lib/strong_migrations/database_tasks.rb
strong_migrations-2.0.0 lib/strong_migrations/database_tasks.rb
strong_migrations-1.8.0 lib/strong_migrations/database_tasks.rb
strong_migrations-1.7.0 lib/strong_migrations/database_tasks.rb
strong_migrations-1.6.4 lib/strong_migrations/database_tasks.rb
strong_migrations-1.6.3 lib/strong_migrations/database_tasks.rb
strong_migrations-1.6.2 lib/strong_migrations/database_tasks.rb
strong_migrations-1.6.1 lib/strong_migrations/database_tasks.rb
strong_migrations-1.6.0 lib/strong_migrations/database_tasks.rb
strong_migrations-1.5.0 lib/strong_migrations/database_tasks.rb
strong_migrations-1.4.4 lib/strong_migrations/database_tasks.rb
strong_migrations-1.4.3 lib/strong_migrations/database_tasks.rb
strong_migrations-1.4.2 lib/strong_migrations/database_tasks.rb
strong_migrations-1.4.1 lib/strong_migrations/database_tasks.rb
strong_migrations-1.4.0 lib/strong_migrations/database_tasks.rb
strong_migrations-1.3.2 lib/strong_migrations/database_tasks.rb
strong_migrations-1.3.1 lib/strong_migrations/database_tasks.rb
strong_migrations-1.3.0 lib/strong_migrations/database_tasks.rb
strong_migrations-1.2.0 lib/strong_migrations/database_tasks.rb
strong_migrations-1.1.0 lib/strong_migrations/database_tasks.rb