lib/robotkit/cli.rb in robotkit-0.1.5 vs lib/robotkit/cli.rb in robotkit-0.1.6
- old
+ new
@@ -37,11 +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_package}")
# create sample package dir
sample_package_src = "#{output_dir}/#{sample_module}/src/main/java/#{sample_package_name.gsub('.','/')}"
FileUtils.mkdir_p(sample_package_src)
sample_files = %w(MainActivity SampleApplication)
@@ -49,10 +49,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_package}")
#eval erb
Dir.glob("#{output_dir}/**/*").select{|it| it.end_with?("erb")}.each do |path|
result = ERB.new(File.open(path).read).result(binding)
File.open(path.sub(".erb", ""), "w") do |file|