Sha256: da94de7338161ed053d6ea030e9352e8e66097d6bf75f055a9ad66c91884752c

Contents?: true

Size: 486 Bytes

Versions: 26

Compression:

Stored size: 486 Bytes

Contents

module Terraspace::Cloud
  class Vcs
    class << self
      @@name = nil
      def register(options={})
        @@name = options[:name]
      end

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

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

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
terraspace-2.2.17 lib/terraspace/cloud/vcs.rb
terraspace-2.2.16 lib/terraspace/cloud/vcs.rb
terraspace-2.2.15 lib/terraspace/cloud/vcs.rb
terraspace-2.2.14 lib/terraspace/cloud/vcs.rb
terraspace-2.2.13 lib/terraspace/cloud/vcs.rb
terraspace-2.2.12 lib/terraspace/cloud/vcs.rb
terraspace-2.2.11 lib/terraspace/cloud/vcs.rb
terraspace-2.2.10 lib/terraspace/cloud/vcs.rb
terraspace-2.2.9 lib/terraspace/cloud/vcs.rb
terraspace-2.2.8 lib/terraspace/cloud/vcs.rb
terraspace-2.2.7 lib/terraspace/cloud/vcs.rb
terraspace-2.2.6 lib/terraspace/cloud/vcs.rb
terraspace-2.2.5 lib/terraspace/cloud/vcs.rb
terraspace-2.2.4 lib/terraspace/cloud/vcs.rb
terraspace-2.2.3 lib/terraspace/cloud/vcs.rb
terraspace-2.2.2 lib/terraspace/cloud/vcs.rb
terraspace-2.2.1 lib/terraspace/cloud/vcs.rb
terraspace-2.2.0 lib/terraspace/cloud/vcs.rb
terraspace-2.1.7 lib/terraspace/cloud/vcs.rb
terraspace-2.1.6 lib/terraspace/cloud/vcs.rb