mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-12-03 05:41:52 +09:00
OS - Ubuntu 12.04 PHP - 5.4 with cli intl mcrypt curl gd imagick mbstring MySQL IP - 10.20.30.12 target folder - /var/www/boxbilling servername - boxbilling.test XDEBUG
28 lines
737 B
Ruby
Executable File
28 lines
737 B
Ruby
Executable File
#! /usr/bin/env ruby -S rspec
|
|
module PuppetSpec::Modules
|
|
class << self
|
|
def create(name, dir, options = {})
|
|
module_dir = File.join(dir, name)
|
|
FileUtils.mkdir_p(module_dir)
|
|
|
|
environment = options[:environment]
|
|
|
|
if metadata = options[:metadata]
|
|
metadata[:source] ||= 'github'
|
|
metadata[:author] ||= 'puppetlabs'
|
|
metadata[:version] ||= '9.9.9'
|
|
metadata[:license] ||= 'to kill'
|
|
metadata[:dependencies] ||= []
|
|
|
|
metadata[:name] = "#{metadata[:author]}/#{name}"
|
|
|
|
File.open(File.join(module_dir, 'metadata.json'), 'w') do |f|
|
|
f.write(metadata.to_pson)
|
|
end
|
|
end
|
|
|
|
Puppet::Module.new(name, module_dir, environment)
|
|
end
|
|
end
|
|
end
|