class RebuildConfFile
  def initialize
    require 'ptools'
    require 'pathname'

    @path_name = File.join( Dir.home, '.rbld', 'rebuild.conf' )
  end

  attr_reader :path_name

  def fill(content)
    open(@path_name, 'w') { |f| f.write(content) }
  end

  def set_registry(url)
    fill %Q{
        REMOTE_NAME=origin
        REMOTE_origin="#{url}"
      }
  end
end

class RebuildConfFile
  def initialize
    require 'ptools'
    require 'pathname'

    @conf_dir = File.join( Dir.home, '.rbld')
    @path_name = File.join( @conf_dir, 'rebuild.conf' )
  end

  attr_reader :path_name

  def fill(content)
    FileUtils.mkdir_p( @conf_dir )
    open(@path_name, 'w') { |f| f.write(content) }
  end

  def set_registry(url)
    fill %Q{
        REMOTE_NAME=origin
        REMOTE_origin="#{url}"
      }
  end
end

Create ~/.rbld dir if it does not exist
tests: Create ~/.rbld dir if it does not exist

Signed-off-by: Dmitry Fleytman <a8cf97adadec4e1b734a39bc5aea71b5741cfca1@daynix.com>
