As far as I know, there is no definitive way to automate this. There is no flag concept in Ruby gems, which indicates that they are security updates, etc. Most gem keepers are pretty good at complying with the major.minor.patch agreement for version numbers. The main obstacles are API hacking, minor added functionality, but backward compatible, and a fix for patches or very minor changes. Nothing is provided there, and some gems do not even use three-part version numbers. The rails themselves are particularly egregious of the absence here; The disadvantages of Rails rails are universally incompatible, breaking changes. Rails patch bumps are usually security fixes.
If this is enough for your needs, you can use the Bundler to indicate that you need updates at the patch level:
gem 'foo', '~> 2.2.0'
... will install the latest fix level version 2.2.x of the gem (for example, you can get 2.2.12, but not 2.3.0).
See the Rubygems document for more information on versions (used by the Bundler) and how to be conservative (โpessimisticโ in their terminology). Also see Their Numbering Guidelines . Again, keep in mind that they are not strictly enforced, and when Rails himself creates such a terrible example of violation of the agreement, other gem authors do not always do the right thing.
source share