Module: Repomen

Defined in:
lib/repomen.rb,
lib/repomen/repo.rb,
lib/repomen/config.rb,
lib/repomen/version.rb,
lib/repomen/repo/url.rb,
lib/repomen/retriever.rb,
lib/repomen/repo/handler.rb,
lib/repomen/repo/service.rb,
lib/repomen/repo/handler/git.rb,
lib/repomen/repo/handler/base.rb,
lib/repomen/repo/service/base.rb,
lib/repomen/repo/service/git_hub.rb,
lib/repomen/repo/service/bit_bucket.rb

Overview

The Repomen are retrieving repos and can discard them at will.

url = "[email protected]:atlassian_tutorial/helloworld.git"
Repomen.retrieve(url)

When called with a block, the repo is automatically deleted afterwards

Repomen.retrieve(url) do |local_path|
  # repo is cloned in +local_path+
end
# repo is gone

Defined Under Namespace

Modules: Repo, WithDefaultConfig Classes: Config, Retriever

Constant Summary collapse

ROOT =
File.join(File.dirname(__FILE__), "..")
VERSION =
"0.1.0"

Class Method Summary collapse

Class Method Details

.Config(config) ⇒ Config

Parameters:

Returns:



18
19
20
21
22
23
24
# File 'lib/repomen/config.rb', line 18

def Config(config)
  if config.is_a?(Hash)
    Config.new(config)
  else
    config
  end
end

.configConfig

Returns the global config.

Returns:

  • (Config)

    the global config



12
13
14
# File 'lib/repomen/config.rb', line 12

def config
  @config ||= Config.new({}, false)
end

.retrieve(url, &block) ⇒ Object



18
19
20
# File 'lib/repomen.rb', line 18

def self.retrieve(url, &block)
  Retriever.new(url, &block)
end