Ultrafast X-ray spectroscopy as a probe of nonequilibrium dynamics in ruthenium complexes