Small error I think, the jewelery damage should be added with OH and other sources of min/max damage, before applying the weapon APS, not after.
Yes, this is correct, my bad.
Also, the ruby damage is increased by the bonus damage on weapons, with the max of 50%.
This isn't true though. Blizzard stated in the PTR update a few weeks ago: "The new buffed Rubies will do exactly what the tooltip claims. If a tooltip says +80 to Minimum Damage and +80 to Maximum Damage, then the damage on the weapon will go up by those amounts when the Ruby is socketed."
Edit: by the way, looking at the formula you've gotten, we can actually exclude weapon base aps from the factors that make ruby better than emerald.
The lower the value of "weapon base damage + jewelry damage + offhand damage + ele damage / (1 + %ED)" the better for ruby. This also shows that %ED affects the effectiveness of ruby compared to emerald, but very insignificantly and only if ele damage is high (Chantodo).
All this makes Chantodo a good thing to put ruby in tbh. In fact, even if dps stays roughly the same, ruby means that damage will be less crit dependant, or, in other words, less spiky (better for low hp trash mobs).