File: rspec-puppet-init

package info (click to toggle)
ruby-rspec-puppet 4.0.2%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,444 kB
  • sloc: ruby: 6,377; makefile: 6
file content (21 lines) | stat: -rwxr-xr-x 461 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env ruby
# frozen_string_literal: true

$LOAD_PATH.unshift File.join(File.dirname(__FILE__), *%w[.. lib])

require 'rspec-puppet'
require 'optparse'

options = {
  module_name: nil
}

OptionParser.new do |opts|
  opts.banner = 'Usage: rspec-puppet-init [options]'

  opts.on('-n', '--name NAME', 'The name of the module (override autodetection)') do |v|
    options[:module_name] = v
  end
end.parse!

RSpec::Puppet::Setup.run(options[:module_name])