Sha256: 6b21bb5daa0a7d20e10af490842426ad98acf62bc37e996e7b3b7b8df61ceaaf

Contents?: true

Size: 597 Bytes

Versions: 18

Compression:

Stored size: 597 Bytes

Contents

module StrongMigrations
  module DatabaseTasks
    def migrate
      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

18 entries across 18 versions & 1 rubygems

Version Path
strong_migrations-0.7.8 lib/strong_migrations/database_tasks.rb
strong_migrations-0.7.7 lib/strong_migrations/database_tasks.rb
strong_migrations-0.7.6 lib/strong_migrations/database_tasks.rb
strong_migrations-0.7.5 lib/strong_migrations/database_tasks.rb
strong_migrations-0.7.4 lib/strong_migrations/database_tasks.rb
strong_migrations-0.7.3 lib/strong_migrations/database_tasks.rb
strong_migrations-0.7.2 lib/strong_migrations/database_tasks.rb
strong_migrations-0.7.1 lib/strong_migrations/database_tasks.rb
strong_migrations-0.7.0 lib/strong_migrations/database_tasks.rb
strong_migrations-0.6.8 lib/strong_migrations/database_tasks.rb
strong_migrations-0.6.7 lib/strong_migrations/database_tasks.rb
strong_migrations-0.6.6 lib/strong_migrations/database_tasks.rb
strong_migrations-0.6.5 lib/strong_migrations/database_tasks.rb
strong_migrations-0.6.4 lib/strong_migrations/database_tasks.rb
strong_migrations-0.6.3 lib/strong_migrations/database_tasks.rb
strong_migrations-0.6.2 lib/strong_migrations/database_tasks.rb
strong_migrations-0.6.1 lib/strong_migrations/database_tasks.rb
strong_migrations-0.6.0 lib/strong_migrations/database_tasks.rb