<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 10 May 2017 at 13:50, Asfand Qazi <span dir="ltr"><<a href="mailto:ayqazi@gmail.com" target="_blank">ayqazi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I do not think a Gemfile.lock has any effect on a gem when it is being used. I think the point of not checking in your Gemfile.lock is to force the gem to be run against different minor versions of dependencies while it is being developed; different developers will probably have slight variations of dependencies (or as much is allowed by your gemspec) installed, or you will at different times of your life, thus forcing the gem to be more resilient when it comes to dealing with varying dependency versions.<div><br></div><div>To quote the above Yehuda Katz article:</div><div><br></div><div>"... when doing gem development, you want to know immediately when some change in the overall ecosystem breaks your setup ... you do not want to hardcode your development to a very specific set of gems, only to find out later that a gem released after you ran bundle install, but compatible with your version range, doesn't work with your code".<br><div><br></div><div>It's not a very reliable way of doing this, perhaps someone should create a tool that checks out every combination of every valid version of your gem's dependencies and runs your tests against each combination.</div></div></div></blockquote><div><br></div><div>It's common for gem authors to use either <a href="https://github.com/thoughtbot/appraisal">https://github.com/thoughtbot/appraisal</a> to achieve this or a essentially the same thing with different `Gemfile`s a la the `gemfile` stanza here: <a href="https://github.com/roidrage/lograge/blob/master/.travis.yml">https://github.com/roidrage/lograge/blob/master/.travis.yml</a></div><div><br></div><div>Cheers,</div><div>Ben</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><br clear="all"><div><div class="gmail-m_-534881403505860356gmail_signature">Regards,<br> Asfand</div></div><div><div class="gmail-h5">
<br><div class="gmail_quote">On 10 May 2017 at 13:01, Najaf Ali <span dir="ltr"><<a href="mailto:ali@happybearsoftware.com" target="_blank">ali@happybearsoftware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <u></u> <div style="word-wrap:normal;word-break:break-word"> <table class="gmail-m_-534881403505860356m_-1613790372247987446container" lang="container" dir="ltr" border="0" cellpadding="0" cellspacing="0" valign="top" style="width:100%;margin-top:6px"> <tbody><tr> <td valign="top" class="gmail-m_-534881403505860356m_-1613790372247987446message-wrapper" style="line-height:1.31;color:rgb(34,34,34);font-family:arial,sans-serif"> <div style="max-width:590px"><i><font color="#222222">> I guess it doesn't matter a huge amount: as I understand it, the Gemfile.lock has no effect on an application that your gem is included in, and is only used for developing and testing the gem in isolation. I can see how it would make sense to lock your dependencies (e.g. RSpec) to specific versions.</font>development </i></div><div style="max-width:590px"><i><br></i></div><div style="max-width:590px">Yep, this is the bit I was confused about as well i.e. even if you do commit your Gemfile.lock when creating a gem, does it even do anything?</div><div style="max-width:590px"><br></div><div class="gmail-m_-534881403505860356m_-1613790372247987446mixmax_signature" style="max-width:590px"><div style="max-width:590px"><font color="#666666" style="background-color:rgb(255,255,255)">Najaf Ali - Founder at <a href="https://links5.mixmaxusercontent.com/rSxCBSBNkaSyYEvDv/l/0hwoH3nHCguJwZ6ah?messageId=zThlHJEOJKfAaQYlX&rn=gIwV3bydEIzJXZzVFI5JWdSBibvRmbvxkI&re=icmcv5yZ1JHbuMHdzlGbARXYoNmI" target="_blank">Happy Bear Software</a></font></div><div style="max-width:590px"><font color="#666666">Phone: <a href="tel:07590%20073977" value="+447590073977" target="_blank">07590 073 977</a></font></div><div style="max-width:590px"><font color="#666666">Skype: alinajaf85</font></div><div style="max-width:590px"><font color="#666666">Timezone: <a href="https://links6.mixmaxusercontent.com/rSxCBSBNkaSyYEvDv/l/Zm84nAWnarmhOlHKl?messageId=zThlHJEOJKfAaQYlX&rn=gIwV3bydEIzJXZzVFI5JWdSBibvRmbvxkI&re=icmcv5yZ1JHbuMHdzlGbARXYoNmI" target="_blank">London, UTC + 1</a></font></div><div style="max-width:590px"><font color="#666666"><a href="https://links9.mixmaxusercontent.com/rSxCBSBNkaSyYEvDv/l/8R4Qlo498iH9T03xG?messageId=zThlHJEOJKfAaQYlX&rn=gIwV3bydEIzJXZzVFI5JWdSBibvRmbvxkI&re=icmcv5yZ1JHbuMHdzlGbARXYoNmI" target="_blank">LinkedIn</a> | <a href="https://links8.mixmaxusercontent.com/rSxCBSBNkaSyYEvDv/l/42d191qOG0e9cuoem?messageId=zThlHJEOJKfAaQYlX&rn=gIwV3bydEIzJXZzVFI5JWdSBibvRmbvxkI&re=icmcv5yZ1JHbuMHdzlGbARXYoNmI" target="_blank">Twitter</a> | <a href="https://links10.mixmaxusercontent.com/rSxCBSBNkaSyYEvDv/l/S4rJO5LpCmp01J1oI?messageId=zThlHJEOJKfAaQYlX&rn=gIwV3bydEIzJXZzVFI5JWdSBibvRmbvxkI&re=icmcv5yZ1JHbuMHdzlGbARXYoNmI" target="_blank">Medium</a> | <a href="https://links7.mixmaxusercontent.com/rSxCBSBNkaSyYEvDv/l/69tqwmKY5R8Anqof6?messageId=zThlHJEOJKfAaQYlX&rn=gIwV3bydEIzJXZzVFI5JWdSBibvRmbvxkI&re=icmcv5yZ1JHbuMHdzlGbARXYoNmI" target="_blank"><wbr>GitHub</a><br></font></div><div style="max-width:590px"><font color="#666666"><br></font></div><div style="max-width:590px"><font color="#666666">I run a technical consultancy specialising in Ruby on Rails. Have a look at <a href="https://links3.mixmaxusercontent.com/rSxCBSBNkaSyYEvDv/l/s5jEI76TvZ9MHczlF?messageId=zThlHJEOJKfAaQYlX&rn=gIwV3bydEIzJXZzVFI5JWdSBibvRmbvxkI&re=icmcv5yZ1JHbuMHdzlGbARXYoNmI" target="_blank">this one-page info sheet</a> for a summary of the services we provide. We're always happy to meet people building software, so if you think of anyone appropriate for us we would appreciate being put in touch :-)</font></div></div><img align="left" width="0" height="0" style="border: 0px; width: 0px; height: 0px;" src="https://track.mixmax.com/api/track/v2/zThlHJEOJKfAaQYlX/i02bj5SZyF2d0Z2bzJXYlJWewBXYoBUasFmI/icmcv5yZ1JHbuMHdzlGbARXYoNmI/gIwV3bydEIzJXZzVFI5JWdSBibvRmbvxkI?sc=false" alt=""> </td> </tr> </tbody></table><div><div class="gmail-m_-534881403505860356h5"> <div style="max-width:590px"> <div style="max-width:590px"> <p><br></p> <div class="gmail_extra"> <p><br></p> <div class="gmail_quote"> On Wed, May 10, 2017 12:06 PM, Asfand Qazi <span dir="ltr"> <a href="mailto:ayqazi@gmail.com" target="_blank">ayqazi@gmail.com</a></span> wrote:<br> <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <u></u> <div dir="ltr">Thank you all for the input. I'm going to continue following the 'check it in for apps, do not check it in for gems' advice. I might even ping the documentation owners to tell them to update their docs.<div><br></div><div><div><div>Regards,<br> Asfand</div></div> <br><div>On 10 May 2017 at 11:38, Duncan Stuart <span dir="ltr"><<a href="mailto:dgmstuart@gmail.com" target="_blank">dgmstuart@gmail.com</a>></span> wrote:<br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">That documentation is indeed confusing. I would always always always commit the Gemfile.lock for an application, but ignore it for a gem, but that documentation does indeed seem to say "commit your lockfile for gem development as well"<div><br><div>I guess it doesn't matter a huge amount: as I understand it, the Gemfile.lock has no effect on an application that your gem is included in, and is only used for developing and testing the gem in isolation. I can see how it would make sense to lock your <i>development </i>dependencies (e.g. RSpec) to specific versions.</div></div></div><div><br><div><span>On 10 May 2017 at 11:25, Stuart Harrison <span dir="ltr"><<a href="mailto:pezholio@gmail.com" target="_blank">pezholio@gmail.com</a>></span> wrote:<br></span><div><div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div id="gmail-m_-534881403505860356m_-1613790372247987446m_3819477515345046046m_5379514788275393327bloop_customfont" style="font-family:helvetica,arial;font-size:13px;color:rgb(0,0,0);margin:0px">I think the `bundle gem` command adds the lockfile to `.gitignore` by default.</div><div><div> <br> <div id="gmail-m_-534881403505860356m_-1613790372247987446m_3819477515345046046m_5379514788275393327bloop_sign_1494411875488637952"></div> <br><p>On 10 May 2017 at 11:24:12, Sam Phillips (<a href="mailto:sam@samsworldofno.com" target="_blank">sam@samsworldofno.com</a>) wrote:</p> <blockquote type="cite" style="margin:0px 0px 0px 40px"><span><div><div></div><div> <div dir="ltr">Yes, always check it in. Once the dependency tree is resolved, you want everyone using the same gems until it's actively changed.</div> <div><br> <div>On 10 May 2017 at 11:22, Garry Shutler <span dir="ltr"><<a href="mailto:garry@robustsoftware.co.uk" target="_blank">garry@robustsoftware.co.uk</a>></span> wrote:<br> <blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <div dir="ltr">+1 to what Kerry said. If you deploy the same commit of your website tomorrow, you don't want it bringing in different, potentially breaking, versions of gems.</div> <div><span><font color="#888888"><br clear="all"></font></span> <div> <div> <div dir="ltr"><span><font color="#888888"><b>Garry Shutler</b></font></span> <div> <div><span><font color="#888888"><a href="http://twitter.com/gshutler" target="_blank">@gshutler</a></font></span></div> <span><font color="#888888"><a href="http://gshutler.com/" target="_blank">gshutler.com</a></font></span></div> </div> </div> </div> <div> <div><br> <div>On 10 May 2017 at 11:12, Kerry Buckley <span dir="ltr"><<a href="mailto:kerryjbuckley@gmail.com" target="_blank">kerryjbuckley@gmail.com</a>></span> wrote:<br> <blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <div dir="ltr">The advice I've always followed is that if you're building an application you check it in (so you can guarantee that everyone's developing/testing/running against the same set of dependencies), but if you're building a library you don't, as you don't get to control what versions users of your library are running (other than through the dependency specifications in your gemspec). <div><br></div> <div>Kerry</div> </div> <div><br> <div> <div> <div>On Wed, May 10, 2017 at 11:08 AM, Asfand Qazi <span dir="ltr"><<a href="mailto:ayqazi@gmail.com" target="_blank">ayqazi@gmail.com</a>></span> wrote:<br></div> </div> <blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <div> <div> <div dir="ltr">Hello, <div><br></div> <div>I have a question regarding Bundler, developing gems, and Gemfile.lock . It is a question I thought I had the answer to, but apparently not.</div> <div><br></div> <div>I USED to believe that you do not check in Gemfile.lock, so as to allow situations during development to occur where your gem is used with a version of a dependency that you did not expect, therefore allowing possibly breaking interface changes to dependencies to be made apparent. This is what Mr. Katz says here, in 2010: <a href="http://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/" target="_blank">http://yehudakatz.com/2010/12/<wbr>16/clarifying-the-roles-of-the<wbr>-gemspec-and-gemfile/</a>.</div> <div><br></div> <div>However, checking the latest bundler docs, here we read something different: <a href="http://bundler.io/v1.14/guides/creating_gem.html" target="_blank">http://bundler.io/v<wbr>1.14/guides/creating_gem.html</a></div> <div><br></div> <div>"By running bundle install, Bundler will generate the extremely important Gemfile.lock file. This file is responsible for ensuring that every system this library is developed on has the exact same gems so it should always be checked into version control. For more information on this file read “THE GEMFILE.LOCK” section of the bundle install manpage."</div> <div><br></div> <div>Que?</div> <div><br></div> <div>What do y'all think? Follow the old advice, or the new advice?</div> <div><br></div> <div>Thanks</div> <div><br> Regards,<br> Asfand Qazi<br> The DevOps Doctors<br> <br> E: <a href="mailto:asfand@thedevopsdoctors.com" target="_blank">asfand@thedevopsdoctors.com</a><br> W: <a href="https://www.thedevopsdoctors.com/" target="_blank">https://www.thedevopsdoctor<wbr>s.com/</a><br></div> </div> <br></div> </div> ______________________________<wbr>_________________<br> Chat mailing list<br> <a href="mailto:Chat@lists.lrug.org" target="_blank">Chat@lists.lrug.org</a><br> Archives: <a href="http://lists.lrug.org/pipermail/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/pipermai<wbr>l/chat-lrug.org</a><br> Manage your subscription: <a href="http://lists.lrug.org/options.cgi/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/options.<wbr>cgi/chat-lrug.org</a><br> List info: <a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/listinfo<wbr>.cgi/chat-lrug.org</a><br> <br></blockquote> </div> <br></div> <br> ______________________________<wbr>_________________<br> Chat mailing list<br> <a href="mailto:Chat@lists.lrug.org" target="_blank">Chat@lists.lrug.org</a><br> Archives: <a href="http://lists.lrug.org/pipermail/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/pipermai<wbr>l/chat-lrug.org</a><br> Manage your subscription: <a href="http://lists.lrug.org/options.cgi/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/options.<wbr>cgi/chat-lrug.org</a><br> List info: <a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/listinfo<wbr>.cgi/chat-lrug.org</a><br> <br></blockquote> </div> <br></div> </div> </div> <br> ______________________________<wbr>_________________<br> Chat mailing list<br> <a href="mailto:Chat@lists.lrug.org" target="_blank">Chat@lists.lrug.org</a><br> Archives: <a href="http://lists.lrug.org/pipermail/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/pipermai<wbr>l/chat-lrug.org</a><br> Manage your subscription: <a href="http://lists.lrug.org/options.cgi/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/options.<wbr>cgi/chat-lrug.org</a><br> List info: <a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/listinfo<wbr>.cgi/chat-lrug.org</a><br> <br></blockquote> </div> <br></div> ______________________________<wbr>_________________ <br>Chat mailing list <br><a href="mailto:Chat@lists.lrug.org" target="_blank">Chat@lists.lrug.org</a> <br>Archives: <a href="http://lists.lrug.org/pipermail/chat-lrug.org" target="_blank">http://lists.lrug.org/pipermai<wbr>l/chat-lrug.org</a> <br>Manage your subscription: <a href="http://lists.lrug.org/options.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/options.<wbr>cgi/chat-lrug.org</a> <br>List info: <a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo<wbr>.cgi/chat-lrug.org</a> <br></div></div></span></blockquote></div></div></div> <br>______________________________<wbr>_________________<br> Chat mailing list<br> <a href="mailto:Chat@lists.lrug.org" target="_blank">Chat@lists.lrug.org</a><br> Archives: <a href="http://lists.lrug.org/pipermail/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/pipermai<wbr>l/chat-lrug.org</a><br> Manage your subscription: <a href="http://lists.lrug.org/options.cgi/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/options.<wbr>cgi/chat-lrug.org</a><br> List info: <a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/listinfo<wbr>.cgi/chat-lrug.org</a><br> <br></blockquote></div></div></div><br></div> <br>______________________________<wbr>_________________<br> Chat mailing list<br> <a href="mailto:Chat@lists.lrug.org" target="_blank">Chat@lists.lrug.org</a><br> Archives: <a href="http://lists.lrug.org/pipermail/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/pipermai<wbr>l/chat-lrug.org</a><br> Manage your subscription: <a href="http://lists.lrug.org/options.cgi/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/options.<wbr>cgi/chat-lrug.org</a><br> List info: <a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/listinfo<wbr>.cgi/chat-lrug.org</a><br> <br></blockquote></div><br></div></div> </blockquote> </div> </div> </div> </div> </div></div></div> <br>______________________________<wbr>_________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org" target="_blank">Chat@lists.lrug.org</a><br>
Archives: <a href="http://lists.lrug.org/pipermail/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/pipermai<wbr>l/chat-lrug.org</a><br>
Manage your subscription: <a href="http://lists.lrug.org/options.cgi/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/options.<wbr>cgi/chat-lrug.org</a><br>
List info: <a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/listinfo<wbr>.cgi/chat-lrug.org</a><br>
<br></blockquote></div><br></div></div></div></div>
<br>______________________________<wbr>_________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
Archives: <a href="http://lists.lrug.org/pipermail/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/<wbr>pipermail/chat-lrug.org</a><br>
Manage your subscription: <a href="http://lists.lrug.org/options.cgi/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/options.<wbr>cgi/chat-lrug.org</a><br>
List info: <a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" rel="noreferrer" target="_blank">http://lists.lrug.org/<wbr>listinfo.cgi/chat-lrug.org</a><br>
<br></blockquote></div><br></div></div>