summaryrefslogtreecommitdiff
path: root/tool/lib/bundled_gem.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2025-06-07 18:43:56 +0900
committerNobuyoshi Nakada <[email protected]>2025-06-07 18:43:56 +0900
commit7a56c316418980b8a41fcbdc94067b2bda2ad112 ()
treed30d2a46c005759dd9dd7be5f1b7f22536183b86 /tool/lib/bundled_gem.rb
parente90282be7ba1bc8e3119f6e1a2c80356ceb3f80a (diff)
Revert "[Bug #21388] Make snapshots of gems"
This reverts commit e90282be7ba1bc8e3119f6e1a2c80356ceb3f80a, a commit miss.
-rw-r--r--tool/lib/bundled_gem.rb27
1 files changed, 0 insertions, 27 deletions
@@ -16,24 +16,6 @@ module BundledGem
"psych" # rdoc
]
- def self.each(release: true, snapshot: false)
- File.foreach(File.join(__dir__, "../../gems/bundled_gems")) do |line|
- line.chomp!
- next if /^\s*(?:#|$)/ =~ line
- gem, ver, uri, rev = line.split
- if !rev
- next unless release
- elsif snapshot
- # Assume a version ending with digits only segment is a release
- # version, and append suffix to make prerelase version.
- # Bump up because "X.Y.Z.snapshot" < "X.Y.Z" as versions.
- ver = ver.succ if /\.\d+\z/.match?(ver)
- ver += ".snapshot"
- end
- yield gem, ver, uri, rev
- end
- end
-
module_function
def unpack(file, *rest)
@@ -54,15 +36,6 @@ module BundledGem
Dir.chdir(gemdir) do
spec = Gem::Specification.load(gemfile)
abort "Failed to load #{gemspec}" unless spec
- spec.version = version
- spec.files.delete_if do |f|
- case f
- when 'Gemfile', 'Rakefile', gemfile
- true
- else
- f.start_with?('bin/', 'test/', '.git')
- end
- end
output = File.join(outdir, spec.file_name)
FileUtils.rm_rf(output)
package = Gem::Package.new(output)