Question

I'm developing a gem locally. It's a command-line utility that only has test dependencies, and my Gemfile looks like this:

source :rubygems
gemspec

group :test do
  gem "cucumber"
  gem "aruba"
  gem "rspec"
end

My gemspec looks like this:

Gem::Specification.new do |s|
  # authorship stuff...
  s.files = `git ls-files`.split("\n")
end

That's the default gemspec created by Bundler. I know we're supposed to keep Gemfile and Gemfile.lock in source control, but I'm wondering about including them in the packaged gem through the Gem::Specification#files attribute. Are there arguments for/against including Gemfile and Gemfile.lock in the distributed gem? It seems weird or at least unnecessary to me.

Was it helpful?

Solution

Yehuda Katz just blogged on this topic! : Clarifying the Roles of the .gemspec and Gemfile

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top