I was wondering when is it safe to update gems in a rails project and I came across Semantic Versioning.
Semantic versioning is a way to convey messages about the changes made on software by just comparing old to new version. It is generic, not related to ruby gems only.
On each release, software is tagged with a version. There are three parts X.Y.Z also called versions:
- X: Major version, Incompatible changes
- Y: Minor version, New functionality with backwards compatibility
- Z: Patch version, Bug fix with backwards compatibility
An example, if your current version is 4.1.6, which of following would be safe updates?
Rule of thumb, update only when the 2nd or 3rd digit are changed.
Why? Because there's backwards compatibility and your application won't break.