lib/robotkit/cli.rb in robotkit-0.1.7 vs lib/robotkit/cli.rb in robotkit-0.1.8

- old
+ new

@@ -37,10 +37,11 @@ # change lib module dir File.rename("#{output_dir}/{library_module}", "#{output_dir}/#{library_module}") # create lib package dir FileUtils.mkdir_p("#{output_dir}/#{library_module}/src/main/java/#{library_package_name.gsub('.','/')}") + FileUtils.rm_rf("#{output_dir}/#{library_module}/src/main/java/{library_package}") FileUtils.rm_rf("#{output_dir}/#{library_module}/{library_module}") # create sample package dir sample_package_src = "#{output_dir}/#{sample_module}/src/main/java/#{sample_package_name.gsub('.','/')}" FileUtils.mkdir_p(sample_package_src) @@ -49,9 +50,10 @@ File.open("#{sample_package_src}/#{file_name}.java", "w") do |file| result = ERB.new(File.open("#{output_dir}/#{sample_module}/src/main/java/{sample_package}/#{file_name}.java.erb").read).result(binding) file.write(result) end end + FileUtils.rm_rf("#{output_dir}/#{sample_module}/src/main/java/{sample_package}") FileUtils.rm_rf("#{output_dir}/#{sample_module}/{sample_module}") #eval erb Dir.glob("#{output_dir}/**/*").select{|it| it.end_with?("erb")}.each do |path| result = ERB.new(File.open(path).read).result(binding)