зеркало из https://github.com/github/ruby.git
Try to find bundled gem version from lib/*/version.rb
This commit is contained in:
Родитель
cf5b965897
Коммит
f090d1fa59
|
@ -91,7 +91,10 @@ module BundledGem
|
|||
Dir.chdir(gemdir) do
|
||||
spec = Gem::Specification.new do |s|
|
||||
s.name = gemfile.chomp(".gemspec")
|
||||
s.version = File.read("lib/#{s.name}.rb")[/VERSION = "(.+?)"/, 1]
|
||||
s.version =
|
||||
File.read("lib/#{s.name}.rb")[/VERSION = "(.+?)"/, 1] ||
|
||||
begin File.read("lib/#{s.name}/version.rb")[/VERSION = "(.+?)"/, 1]; rescue; nil; end ||
|
||||
raise("cannot find the version of #{ s.name } gem")
|
||||
s.authors = ["DUMMY"]
|
||||
s.email = ["dummy@ruby-lang.org"]
|
||||
s.files = Dir.glob("{lib,ext}/**/*").select {|f| File.file?(f)}
|
||||
|
|
Загрузка…
Ссылка в новой задаче