Setting UserAgent for Ruby/RubyGems/Bundler

I’d like to set the useragent to something else when calling bundler, or
downloading/updating gems from anywhere w/in Ruby/Rails.

Is the rubygems/remote_fetcher.rb the proper place to override the
default ua? Could this be done in some other place? For example can
“Gem::RemoteFetcher.new.user_agent” be set globally?

I’m a neophyte and still learning Ruby, so I appreciate any help/info to
get up and running.

Also asked here:

Regarding Bundler, it looks like it’s using Net::HTTP and there may be a
commit coming to set the UA.