12
13
14
15
16
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
|
# File 'lib/splunk/pickaxe/cli.rb', line 12
def init
puts 'Creating Splunk Object directories...'
[
Alerts::DIR,
Dashboards::DIR,
EventTypes::DIR,
Reports::DIR,
Tags::DIR,
::DIR
].each do |dir|
Dir.mkdir dir unless Dir.exist? dir
end
puts 'Writing Gemfile ...'
File.open('Gemfile', 'w') do |f|
f.puts 'source "https://rubygems.org"'
f.puts
f.puts 'gem "splunk-pickaxe"'
end
puts 'Writing .pickaxe.yml ...'
File.open('.pickaxe.yml', 'w') do |f|
f.puts 'namespace:'
f.puts ' app: TODO'
f.puts 'environments:'
f.puts ' MY_ENV: SPLUNK_API_URL'
f.puts 'emails:'
f.puts ' - [email protected]'
end
end
|