src/DataDock.CsvWeb.Tests/data/test-suite/mk_manifest.rb
def create_files
    tests.each do |test|
      FileUtils.mkdir(test.id.to_s) unless Dir.exist?(test.id.to_s) if test.option[:dir]
      files = []
      files << test.action.split('?').first
      files += test.option[:implicit]
      files << test.result_rdf  if test.result_rdf
      files << test.result_json if test.result_json
      files.compact.select {|f| !File.exist?(f)}.each do |f|
        File.open(f, "w") {|io| io.puts( f.end_with?('.json') ? "{}" : "")}
      end
    end
  end
# Create files referenced in the manifest
Create files referenced in the manifest
Create files referenced in the manifest
def create_files
    tests.each do |test|
      FileUtils.mkdir(test.id.to_s) unless Dir.exist?(test.id.to_s) if test.option[:dir]
      files = []
      files << test.action.split('?').first
      files += test.option[:implicit]
      files << test.result_rdf  if test.result_rdf
      files << test.result_json if test.result_json
      files.compact.select {|f| !File.exist?(f)}.each do |f|
        File.open(f, "w") {|io| io.puts( f.end_with?('.json') ? "{}" : "")}
      end
    end
  end
def create_files tests . each do | test | FileUtils . mkdir ( test . id . to_s ) unless Dir . exist? ( test . id . to_s ) if test . option [ :dir ] files = [ ] files << test . action . split ( '?' ) . first files += test . option [ :implicit ] files << test . result_rdf if test . result_rdf files << test . result_json if test . result_json files . compact . select { | f | ! File . exist? ( f ) } . each do | f | File . open ( f , "w" ) { | io | io . puts ( f . end_with? ( '.json' ) ? "{}" : "" ) } end end end
Create files referenced in the manifest
Create files referenced in the manifest