Module: UcbDeployer

Defined in:
lib/ucb_deployer.rb,
lib/ucb_deployer/version.rb,
lib/ucb_deployer/deployer.rb,
lib/ucb_deployer/jira_deployer.rb,
lib/ucb_deployer/confluence_deployer.rb

Defined Under Namespace

Modules: ConfigTasks Classes: ConfigError, ConfluenceDeployer, Deployer, JiraDeployer

Constant Summary collapse

DEPLOYER_HOME =
File.expand_path(File.dirname(__FILE__) + '/..')
RESOURCES_DIR =
File.expand_path("#{DEPLOYER_HOME}/resources")
VERSION =
"1.1.1"

Class Method Summary collapse

Class Method Details

.debug(str) ⇒ Object



43
44
45
46
47
# File 'lib/ucb_deployer.rb', line 43

def self.debug(str)
  if debug_mode
    $stdout.puts(str)
  end
end

.debug_modeObject



53
54
55
# File 'lib/ucb_deployer.rb', line 53

def self.debug_mode()
  @debug_mode || false
end

.debug_mode=(bool) ⇒ Object



57
58
59
# File 'lib/ucb_deployer.rb', line 57

def self.debug_mode=(bool)
  @debug_mode = bool
end

.factory(app_name) ⇒ UcbDeployer::Deployer

Valid options are

Parameters:

  • valid (Symbol|String)

    app_name values are: “confluence”, “jira”

Returns:

Raises:



29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/ucb_deployer.rb', line 29

def self.factory(app_name)
  begin
    if app_name == :confluence
      return UcbDeployer::ConfluenceDeployer.new()
    elsif app_name == :jira
      return UcbDeployer::JiraDeployer.new()
    end
  rescue => e
    raise(UcbDeployer::ConfigError, e)
  end
  
  raise(ConfigError, "Unrecognized app_name: #{app_name}")
end

.info(str) ⇒ Object



49
50
51
# File 'lib/ucb_deployer.rb', line 49

def self.info(str)
  $stdout.puts(str)
end