lib/beaker/options/parser.rb
#Converts array of paths into array of fully qualified git repo URLS with expanded keywords
#
#Supports the following keywords
#  PUPPET
#  FACTER
#  HIERA
#  HIERA-PUPPET
#@example
#  opts = ["PUPPET/3.1"]
#  parse_git_repos(opts) == ["#{GITREPO}/puppet.git#3.1"]
#@param [Array] git_opts An array of paths
#@return [Array] An array of fully qualified git repo URLs with expanded keywords
Converts array of paths into array of fully qualified git repo URLS with expanded keywords
Supports the following keywords
PUPPET
FACTER
HIERA
HIERA-PUPPET
Converts array of paths into array of fully qualified git repo URLS with expanded keywords Supports the following keywords PUPPET FACTER HIERA HIERA - PUPPET
def parse_git_repos(git_opts)
        git_opts.map! { |opt|
          case opt
            when /^PUPPET\//
              opt = "#{GITREPO}/puppet.git##{opt.split('/', 2)[1]}"
            when /^FACTER\//
              opt = "#{GITREPO}/facter.git##{opt.split('/', 2)[1]}"
            when /^HIERA\//
              opt = "#{GITREPO}/hiera.git##{opt.split('/', 2)[1]}"
            when /^HIERA-PUPPET\//
              opt = "#{GITREPO}/hiera-puppet.git##{opt.split('/', 2)[1]}"
          end
          opt
        }
        git_opts
      end
def parse_git_repos ( git_opts ) git_opts . map! { | opt | case opt when / ^PUPPET \/ / opt = "#{GITREPO}/puppet.git##{opt.split('/', 2)[1]}" when / ^FACTER \/ / opt = "#{GITREPO}/facter.git##{opt.split('/', 2)[1]}" when / ^HIERA \/ / opt = "#{GITREPO}/hiera.git##{opt.split('/', 2)[1]}" when / ^HIERA-PUPPET \/ / opt = "#{GITREPO}/hiera-puppet.git##{opt.split('/', 2)[1]}" end opt } git_opts end
Converts array of paths into array of fully qualified git repo URLS with expanded keywords
Supports the following keywords
PUPPET
FACTER
HIERA
HIERA-PUPPET
Converts array of paths into array of fully qualified git repo URLS with expanded keywords Supports the following keywords PUPPET FACTER HIERA HIERA - PUPPET
An array of fully qualified git repo URLs with expanded keywords
An array of fully qualified git repo URLs with expanded keywords
Array
git_opts
<not_specific>
<not_specific>
git_opts An array of paths
git_opts An array of paths
example
None