它在gemspec中。见https://github.com/acrmp/foodcritic/blob/master/foodcritic.gemspec
...
s.add_dependency('nokogiri', '= 1.5.0')
...
编辑...它在gem文件中...如果您提取它,您将看到metadata.gz。其中包含 gemspec 信息...\
$ ll
total 56
-rw-r--r--@ 1 philip staff 28160 Nov 13 12:54 foodcritic-1.6.1.gem
philip@Philips-MacBook-Pro:~/Downloads
$ file foodcritic-1.6.1.gem
foodcritic-1.6.1.gem: POSIX tar archive
philip@Philips-MacBook-Pro:~/Downloads
$ tar xvf foodcritic-1.6.1.gem
x data.tar.gz
x metadata.gz
philip@Philips-MacBook-Pro:~/Downloads
$ zmore metadata.gz
------> metadata.gz <------
--- !ruby/object:Gem::Specification
name: foodcritic
version: !ruby/object:Gem::Version
version: 1.6.1
prerelease:
platform: ruby
authors:
- Andrew Crump
autorequire:
bindir: bin
cert_chain: []
date: 2012-08-30 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: gherkin
requirement: !ruby/object:Gem::Requirement
none: false
requirements:
- - ~>
- !ruby/object:Gem::Version
version: 2.11.1
type: :runtime
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
none: false
requirements:
- - ~>
- !ruby/object:Gem::Version
version: 2.11.1
- !ruby/object:Gem::Dependency
name: gist
requirement: !ruby/object:Gem::Requirement
none: false
requirements:
- - ~>
- !ruby/object:Gem::Version
version: 3.1.0
type: :runtime
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
none: false
requirements:
- - ~>
- !ruby/object:Gem::Version
version: 3.1.0
- !ruby/object:Gem::Dependency
name: nokogiri
requirement: !ruby/object:Gem::Requirement
none: false
requirements:
philip@Philips-MacBook-Pro:~/Downloads