Sha256: 05162957568dbd202a905c746eb6639b3090b60ae444f5e52db776f14c5fed3c

Contents?: true

Size: 302 Bytes

Versions: 9

Compression:

Stored size: 302 Bytes

Contents

module Terraspace
  class Autodetect
    def plugin
      plugins = Terraspace::Plugin.meta.keys
      if plugins.size == 1
        plugins.first
      else
        precedence = %w[aws azurerm google]
        precedence.find do |p|
          plugins.include?(p)
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
terraspace-1.0.5 lib/terraspace/autodetect.rb
terraspace-1.0.4 lib/terraspace/autodetect.rb
terraspace-1.0.3 lib/terraspace/autodetect.rb
terraspace-1.0.2 lib/terraspace/autodetect.rb
terraspace-1.0.1 lib/terraspace/autodetect.rb
terraspace-1.0.0 lib/terraspace/autodetect.rb
terraspace-0.7.2 lib/terraspace/autodetect.rb
terraspace-0.7.1 lib/terraspace/autodetect.rb
terraspace-0.7.0 lib/terraspace/autodetect.rb