diff options
Diffstat (limited to 'tool/update-bundled_gems.rb')
-rwxr-xr-x[-rw-r--r--] | tool/update-bundled_gems.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tool/update-bundled_gems.rb b/tool/update-bundled_gems.rb index cef31e2f13..48dcaa9f2c 100644..100755 --- a/tool/update-bundled_gems.rb +++ b/tool/update-bundled_gems.rb @@ -9,6 +9,12 @@ unless /^[^#]/ !~ (gem = $F[0]) gem = src.fetch_spec(gem) uri = gem.metadata["source_code_uri"] || gem.homepage uri = uri.sub(%r[\Ahttps://github\.com/[^/]+/[^/]+\K/tree/.*], "").chomp(".git") - $F[3][$F[1]] = gem.version.to_s if $F[3] && $F[3].include?($F[1]) + if $F[3] + if $F[3].include?($F[1]) + $F[3][$F[1]] = gem.version.to_s + elsif $F[2] != gem.version and /\A\h+\z/ =~ $F[3] + $F[3..-1] = [] + end + end $_ = [gem.name, gem.version, uri, *$F[3..-1]].join(" ") end |