문제

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.

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top