From: Ryan Davis Date: 2013-02-06T20:44:17+09:00 Subject: Re: Expanding gemspecs On Feb 6, 2013, at 02:53 , Jon Cairns wrote: > That doesn't seem to be the case, at least for my gems! It appears that > it's down to the author. Here's a random example I picked from my gem > home, highline-1.6.15: > > --------- > SPEC = Gem::Specification.new do |spec| > spec.name = "highline" > spec.version = GEM_VERSION > spec.platform = Gem::Platform::RUBY > spec.summary = "HighLine is a high-level command-line IO library." > spec.files = `git ls-files`.split("\n") > > spec.test_files = `git ls-files -- test/*.rb`.split("\n") You're looking at a plain old file sitting in the gem bundle. While that's used for packaging, it isn't the gem's specification. Look in $(gem env gemdir)/specifications: % gem i -i xxx highline Fetching: highline-1.6.15.gem (100%) Successfully installed highline-1.6.15 1 gem installed % cat xxx/specifications/highline-1.6.15.gemspec # -*- encoding: utf-8 -*- Gem::Specification.new do |s| s.name = "highline" s.version = "1.6.15" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["James Edward Gray II"] s.date = "2012-09-13" s.description = "A high-level IO library that provides validation, type conversion, and more for\ncommand-line interfaces. HighLine also includes a complete menu system that can\ncrank out anything from simple list selection to complete shells with just\nminutes of work.\n" s.email = "james@graysoftinc.com" s.extra_rdoc_files = ["README.rdoc", "INSTALL", "TODO", "CHANGELOG", "LICENSE"] s.files = ["README.rdoc", "INSTALL", "TODO", "CHANGELOG", "LICENSE"] s.homepage = "http://highline.rubyforge.org" s.rdoc_options = ["--title", "HighLine Documentation", "--main", "README"] s.require_paths = ["lib"] s.rubyforge_project = "highline" s.rubygems_version = "1.8.25" s.summary = "HighLine is a high-level command-line IO library." if s.respond_to? :specification_version then s.specification_version = 3 if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then else end else end end