Aar*_*ron 12 ruby gem rubygems gemspecs
我不清楚.gemspec文件中的某些规范是做什么的.特别,
spec.files = `git ls-files -z`.split("\x0")
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]
Run Code Online (Sandbox Code Playgroud)
有人可以解释这些与Ruby Gem的功能有何关系以及为什么它们是必要的?
Jak*_*b S 11
宝石中包含的可执行文件.例如,rake gem将rake作为可执行文件.这些文件必须是可执行的Ruby文件.
宝石中包含的文件.这些是构建时将包含在gem中的文件.
包含Array应添加到$LOAD_PATHon gem激活的目录和文件.默认情况下是["lib"].
测试文件包含在gem中.
| 归档时间: |
|
| 查看次数: |
2719 次 |
| 最近记录: |