From 19108680b52989b8f1e0d0d0f3fd1b68d4ecb289 Mon Sep 17 00:00:00 2001 From: Harald Eilertsen Date: Mon, 18 May 2015 22:16:31 +0200 Subject: Add generator for config file template, and include template in gem. --- .../capistrano/refinerycms/template_generator.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lib/generators/capistrano/refinerycms/template_generator.rb (limited to 'lib') diff --git a/lib/generators/capistrano/refinerycms/template_generator.rb b/lib/generators/capistrano/refinerycms/template_generator.rb new file mode 100644 index 0000000..6198461 --- /dev/null +++ b/lib/generators/capistrano/refinerycms/template_generator.rb @@ -0,0 +1,18 @@ +module Capistrano + module RefineryCMS + module Generators + class TemplateGenerator < Rails::Generators::Base + desc "Create local template for RefineryCMS core config file." + source_root File.expand_path('../templates', __FILE__) + argument :templates_path, :type => :string, + :default => "config/deploy/templates", + :banner => "Path to templates" + + def copy_template + filename = "config_initializers_refinery_core.rb.erb" + copy_file File.join('templates', filename), File.join(templates_path, filename) + end + end + end + end +end \ No newline at end of file -- cgit v1.2.3