Module: Kokonfig::CLI
- Defined in:
- lib/kokonfig/cli.rb
Class Method Summary collapse
Class Method Details
.start ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/kokonfig/cli.rb', line 7 def self.start current_dir = Rails.root rescue Dir.pwd data_dir = File.join(current_dir, CONFIG_DIR, DATA_DIR) templates_dir = File.join(current_dir, CONFIG_DIR, TEMPLATES_DIR) output_dir = current_dir Dir.glob("#{data_dir}/**/*.yml").each do |data_file_path| data_file = Kokonfig::DataFile.new(data_file_path, data_dir, templates_dir) data_file.generate_files(output_dir) end end |