47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# File 'lib/stevenson/application.rb', line 47
def new(output_directory, config_path)
if options[:private_template]
template_url, git_username, git_password = options[:private_template]
git_username ||= ENV["GITHUB_SERVICE_ACCOUNT_USERNAME"]
git_password ||= ENV["GITHUB_SERVICE_ACCOUNT_PASSWORD"]
template = template_url.gsub("github", "#{git_username}:#{git_password}@github")
else
template = options[:template]
end
template = Stevenson::Template.load(template, options)
template.place_config(config_path)
template.place_files(options[:data], '_data') if options[:data]
directory = Stevenson::OutputFilter.generate!(template, options)
Stevenson::Deployer.deploy(directory, options)
rescue Stevenson::Error => e
say e.message
ensure
template.close if template
end
|