mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Adjusted default gems paths
* sync_default_gems.rb (sync_lib): sync from the same directory as sync_default_gems.
This commit is contained in:
parent
0406898a3f
commit
ef4ba517e4
1 changed files with 7 additions and 7 deletions
|
@ -306,7 +306,7 @@ def sync_default_gems(gem)
|
||||||
cp_r("#{upstream}/bigdecimal.gemspec", "ext/bigdecimal")
|
cp_r("#{upstream}/bigdecimal.gemspec", "ext/bigdecimal")
|
||||||
`git checkout ext/bigdecimal/depend`
|
`git checkout ext/bigdecimal/depend`
|
||||||
else
|
else
|
||||||
sync_lib gem
|
sync_lib gem, upstream
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -412,24 +412,24 @@ def sync_default_gems_with_commits(gem, ranges, edit: nil)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def sync_lib(repo)
|
def sync_lib(repo, upstream = nil)
|
||||||
unless File.directory?("../#{repo}")
|
unless upstream and File.directory?(upstream) or File.directory?(upstream = "../#{repo}")
|
||||||
abort %[Expected '../#{repo}' \(#{File.expand_path("../#{repo}")}\) to be a directory, but it wasn't.]
|
abort %[Expected '#{upstream}' \(#{File.expand_path("#{upstream}")}\) to be a directory, but it wasn't.]
|
||||||
end
|
end
|
||||||
rm_rf(["lib/#{repo}.rb", "lib/#{repo}/*", "test/test_#{repo}.rb"])
|
rm_rf(["lib/#{repo}.rb", "lib/#{repo}/*", "test/test_#{repo}.rb"])
|
||||||
cp_r(Dir.glob("../#{repo}/lib/*"), "lib")
|
cp_r(Dir.glob("#{upstream}/lib/*"), "lib")
|
||||||
tests = if File.directory?("test/#{repo}")
|
tests = if File.directory?("test/#{repo}")
|
||||||
"test/#{repo}"
|
"test/#{repo}"
|
||||||
else
|
else
|
||||||
"test/test_#{repo}.rb"
|
"test/test_#{repo}.rb"
|
||||||
end
|
end
|
||||||
cp_r("../#{repo}/#{tests}", "test") if File.exist?("../#{repo}/#{tests}")
|
cp_r("#{upstream}/#{tests}", "test") if File.exist?("#{upstream}/#{tests}")
|
||||||
gemspec = if File.directory?("lib/#{repo}")
|
gemspec = if File.directory?("lib/#{repo}")
|
||||||
"lib/#{repo}/#{repo}.gemspec"
|
"lib/#{repo}/#{repo}.gemspec"
|
||||||
else
|
else
|
||||||
"lib/#{repo}.gemspec"
|
"lib/#{repo}.gemspec"
|
||||||
end
|
end
|
||||||
cp_r("../#{repo}/#{repo}.gemspec", "#{gemspec}")
|
cp_r("#{upstream}/#{repo}.gemspec", "#{gemspec}")
|
||||||
end
|
end
|
||||||
|
|
||||||
def update_default_gems(gem)
|
def update_default_gems(gem)
|
||||||
|
|
Loading…
Add table
Reference in a new issue