Sha256: 46f63b3e9f7a1eeb3a9cd0c267cb1bc0faa38a04d25c77c1bbca77084ae5b459

Contents?: true

Size: 798 Bytes

Versions: 9

Compression:

Stored size: 798 Bytes

Contents

require 'construct'

def with_sample_projects(&block)
  Construct::within_construct do |c|
    # given files	
    c.directory('src/A')
    c.directory('src/B')
    c.directory('src/C')
    c.file('src/A/A.csproj') do |f|
      f.puts "cs proj file ... xml in here"
    end

    c.file('src/C/HelloWorld.vbproj')
    block.call(c)
  end
end

def abc_projects(in_folder)
  #puts "creating projects A, B and C in #{in_folder}"
  Dir.mkdir(File.join(in_folder, 'src/A'))
  File.open(File.join(in_folder, 'src/A/A.csproj'), "w") do |f|
    f.puts "cs proj file ... xml in here"
  end
  Dir.mkdir(File.join(in_folder, 'src/B'))
  Dir.mkdir(File.join(in_folder, 'src/C'))
  File.open(File.join(in_folder, 'src/C/HelloWorld.vbproj'), "w") do |f|
    f.puts "vb-things"
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
logirel-0.1.6 spec/support/with_sample_projects.rb
logirel-0.1.5 spec/support/with_sample_projects.rb
logirel-0.1.4 spec/support/with_sample_projects.rb
logirel-0.1.3 spec/support/with_sample_projects.rb
logirel-0.1.2 spec/support/with_sample_projects.rb
logirel-0.1.1 spec/support/with_sample_projects.rb
logirel-0.1.0 spec/support/with_sample_projects.rb
logirel-0.0.18 spec/support/with_sample_projects.rb
logirel-0.0.17 spec/support/with_sample_projects.rb