17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# File 'lib/norad_cli/cli/secrepo.rb', line 17
def create(repo_name)
say 'Initializing a new norad security test repository'
Git.init(repo_name)
%w[base spec sectests].each do |dirrepo_name|
empty_directory "#{repo_name}/#{dirrepo_name}"
end
if yes?('License the repo under Apache 2?')
options[:year] = Date.today.year
options[:company] = ask('Who is the copyright holder (Default: Cisco Systems, Inc.)?')
options[:company] = 'Cisco Systems, Inc.' if options[:company].empty?
template 'LICENSE.erb', "#{repo_name}/LICENSE"
end
copy_file 'ci/.gitlab.ci.yml', "#{repo_name}/.gitlab.ci.yml"
copy_file '.gitignore', "#{repo_name}/.gitignore"
copy_file 'CONTRIBUTING.md', "#{repo_name}/CONTRIBUTING.md"
copy_file 'README.md', "#{repo_name}/README.md"
copy_file 'spec/spec_helper.rb', "#{repo_name}/spec/spec_helper.rb"
end
|