summaryrefslogtreecommitdiff
path: root/tool/rbinstall.rb
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-12 09:12:15 +0000
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-04-12 09:12:15 +0000
commit9829e91d34af2f71758410e53f5d0cea0a7558a8 (patch)
treef95d50f4cf70fe05705f69a076d6aa6308e693e3 /tool/rbinstall.rb
parent4cab5c0cfdcd34ed60b8e2bffc52b297bee02131 (diff)
* ext/json/json.gemspec, lib/rdoc/rdoc.gemspec: added gemspec directly.
* defs/default_gems, tool/rbinstall.rb: removed default_gems definition. it make simple installation for default gems. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'tool/rbinstall.rb')
-rwxr-xr-xtool/rbinstall.rb47
1 files changed, 0 insertions, 47 deletions
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb
index 3102b92..fab8a7b 100755
--- a/tool/rbinstall.rb
+++ b/tool/rbinstall.rb
@@ -620,37 +620,6 @@ module RbInstall
@gemspec.to_ruby
end
end
-
- class Generator < Struct.new(:name, :base_dir, :src, :execs)
- def gemspec
- @gemspec ||= eval spec_source
- end
-
- def spec_source
- <<-GEMSPEC
-Gem::Specification.new do |s|
- s.name = #{name.dump}
- s.version = #{version.dump}
- s.summary = "This #{name} is bundled with Ruby"
- s.executables = #{execs.inspect}
- s.files = #{files.inspect}
-end
- GEMSPEC
- end
-
- private
- def version
- version = open(src) { |f|
- f.find { |s| /^\s*\w*VERSION\s*=(?!=)/ =~ s }
- } or return
- version.split(%r"=\s*", 2)[1].strip[/\A([\'\"])(.*?)\1/, 2]
- end
-
- def files
- file_collector = FileCollector.new(base_dir)
- file_collector.collect
- end
- end
end
class UnpackedInstaller < Gem::Installer
@@ -704,22 +673,6 @@ install?(:ext, :comm, :gem) do
makedirs(default_spec_dir)
gems = {}
- File.foreach(File.join(srcdir, "defs/default_gems")) do |line|
- line.chomp!
- line.sub!(/\s*#.*/, '')
- next if line.empty?
- words = []
- line.scan(/\G\s*([^\[\]\s]+|\[([^\[\]]*)\])/) do
- words << ($2 ? $2.split : $1)
- end
- name, base_dir, src, execs = *words
- next unless name and base_dir and src
-
- src = File.join(srcdir, src)
- base_dir = File.join(srcdir, base_dir)
- specgen = RbInstall::Specs::Generator.new(name, base_dir, src, execs || [])
- gems[name] ||= specgen
- end
Dir.glob(srcdir+"/{lib,ext}/**/*.gemspec").each do |src|
specgen = RbInstall::Specs::Reader.new(src)