Class: Terraspace::Cloud::Vcs

Inherits:
Object
  • Object
show all
Defined in:
lib/terraspace/cloud/vcs.rb,
lib/terraspace/cloud/vcs/base.rb,
lib/terraspace/cloud/vcs/ci_env.rb,
lib/terraspace/cloud/vcs/commenter.rb,
lib/terraspace/cloud/vcs/interface.rb,
lib/terraspace/cloud/vcs/local_env.rb,
lib/terraspace/cloud/vcs/local_git.rb

Defined Under Namespace

Modules: Commenter, Interface Classes: Base, CiEnv, LocalEnv, LocalGit

Constant Summary collapse

@@name =
nil

Class Method Summary collapse

Class Method Details

.detect(options) ⇒ Object

IE: TerraspaceVcsGithub::Interface.new



10
11
12
13
# File 'lib/terraspace/cloud/vcs.rb', line 10

def detect(options)
  name = detect_name
  "TerraspaceVcs#{name.camelize}::Interface".constantize.new(options) if name
end

.detect_nameObject



15
16
17
18
# File 'lib/terraspace/cloud/vcs.rb', line 15

def detect_name
  # allow user to override vcs.name
  Terraspace.config.cloud.vcs.name || @@name
end

.register(options = {}) ⇒ Object



5
6
7
# File 'lib/terraspace/cloud/vcs.rb', line 5

def register(options={})
  @@name = options[:name]
end