On Thu, Jun 1, 2017 at 11:47 AM, sebb <[email protected]> wrote: > Should the Gemfile.lock files be added to Git? > > I've seen articles that say they should be added, but that may not > always be a good idea. > > At present, these files are listed in .gitignore.
It is a valid project choice to do so. And in the case of Whimsy, we could chose to make that that choice differently for every directory. The two relevant commands here are (1) "bundle install" which will install the versions specified in the Gemfile.lock file if present, otherwise it will do the equivalent of a "bundle update". And (2) "bundle update" which will install the latest version of Gems that match the criteria specified in Gemfile. At the moment, we are not checking in the Gemfile.log files, and the 'update' task in the Rakefile runs "bundle update". This means that any time any code is deployed, a scan is made to determine if there are any newer versions of dependencies that meet the criteria in the Gemfile, and if so, install them. The upside is that we pick up bugfixes automatically. The downside is that we pick up bugfixes automatically, which may cause breakage. The alternative is for whimsy developers to do a bundle install any time a Gemfile changes, and to do a bundle update plus commit plus push every time there is a desire to pick up a new version of a dependency. This update+commit+push will need to be redone for every Gemfile. - Sam Ruby
