class Gem::Tasks::Project

def initialize(root=Dir.pwd)

Parameters:
  • root (String) --
def initialize(root=Dir.pwd)
  @root = root
  @name = File.basename(@root)
  @scm, _ = SCM_DIRS.find do |scm,dir|
              File.directory?(File.join(@root,dir))
            end
  Dir.chdir(@root) do
    @gemspecs = Hash[Dir['*.gemspec'].map { |path|
      [File.basename(path).chomp('.gemspec'), Specification.load(path)]
    }]
  end
  @primary_gemspec = if @gemspecs.has_key?(@name)
                       @name
                     else
                       @gemspecs.keys.sort.first
                     end
  @builds = {}
  @gemspecs.each do |name,gemspec|
    @builds[name] = Hash.new do |packages,format|
      packages[format] = File.join(PKG_DIR,"#{gemspec.full_name}.#{format}")
    end
  end
  @bundler = File.file?(File.join(@root,'Gemfile'))
end