Search code examples
iosrubyrubygemsbundlergemspecs

Bundler: Create Gem - Default Contact Info Source?


I followed this guide to build my first Ruby Gem:

http://bundler.io/v1.12/guides/creating_gem.html

Everything worked as expected, but I have one question: I noticed that Bundler auto-magically pulled my personal contact info from somewhere (I'm on a Mac) and used that to build the gem. An example of a file containing this info:

gem_name.gemspec

I don't want it to default to using my personal contact info (such as my personal email address, etc.) as I build more gems. I want it to use my company's info by default. I'm guessing/hoping that there is some data file somewhere that I can set this default info, to be used on all further new gem builds? Or maybe some other way to set these default values???

I realize that I can edit this info after the scaffold builds, but I want to automate it as much as possible.


Solution

  • Bundler pulls that info from git so just set your name in your ~/.gitconfig globally:

    [user]
      email = [email protected]
      name = MyName
    

    or you could set it locally to that repo via ./git/config.