lib/caramelize/cli.rb in caramelize-0.1.2 vs lib/caramelize/cli.rb in caramelize-0.2.0

- old
+ new

@@ -37,28 +37,30 @@ KNOWN_CONFIG_LOCATIONS = ['config/caramel.rb', "config/caramel.config", "caramel.rb", "src/caramel.rb"] # Finds the configuration file, if it exists in a known location. def detect_configuration_file(config_path = nil) - possible_files = KNOWN_CONFIG_LOCATIONS + possible_files = [] possible_files << config_path if config_path + possible_files |= KNOWN_CONFIG_LOCATIONS possible_files.detect{|f| File.exists?(f)} end # Utility method for sub-commands to transfer wiki contents def transfer_content config_file = "" time_start = Time.now file = detect_configuration_file config_file puts "Read config file: #{file}" if @verbosity == :verbose if file && File.exists?(file) - instance_eval(File.read(file), file || '<eval>') + instance_eval(File.read(file)) original_wiki = input_wiki - ContentTransferer.execute(original_wiki, {:verbosity => @verbosity}) + options = original_wiki.options + options[:verbosity] = @verbosity + ContentTransferer.execute(original_wiki, options) time_end = Time.now - puts "Time required: #{time_end - time_start} s" if @verbosity == :verbose else puts "No config file found." end \ No newline at end of file