lib/furoshiki/jar_app.rb in furoshiki-0.3.0 vs lib/furoshiki/jar_app.rb in furoshiki-0.3.1
- old
+ new
@@ -84,15 +84,15 @@
def template_extension
'.zip'
end
def template_filename
- "#{template_basename}#{template_extension}"
+ "#{template_basename}-#{latest_template_version}#{template_extension}"
end
def latest_template_version
- '0.0.1'
+ '0.0.2'
end
def download_template
download remote_template_url, template_path
end
@@ -156,10 +156,10 @@
# JAR, the "first" one gets run, which may not be what we want.
#
# @param [Pathname, String] jar_path the location of the JAR to inject
def inject_jar(jar_path)
jar_dir = tmp_app_path.join('Contents/Java')
- jar_dir.rmtree
+ jar_dir.rmtree if File.exist?(jar_dir)
jar_dir.mkdir
cp Pathname.new(jar_path), jar_dir
end
def extract_template