You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by va...@apache.org on 2013/05/14 02:04:43 UTC

[2/6] git commit: fixing tempfile generation.

fixing tempfile generation.


Project: http://git-wip-us.apache.org/repos/asf/ode/repo
Commit: http://git-wip-us.apache.org/repos/asf/ode/commit/d56304b7
Tree: http://git-wip-us.apache.org/repos/asf/ode/tree/d56304b7
Diff: http://git-wip-us.apache.org/repos/asf/ode/diff/d56304b7

Branch: refs/heads/ode-1.3.6.x
Commit: d56304b79fbe04027c7a1fa74a285cdfd0d27162
Parents: 3754933
Author: Tammo van Lessen <tv...@gmail.com>
Authored: Tue May 14 01:52:20 2013 +0200
Committer: Tammo van Lessen <tv...@gmail.com>
Committed: Tue May 14 01:54:27 2013 +0200

----------------------------------------------------------------------
 tasks/jbi.rake |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ode/blob/d56304b7/tasks/jbi.rake
----------------------------------------------------------------------
diff --git a/tasks/jbi.rake b/tasks/jbi.rake
index eed6505..a29f429 100644
--- a/tasks/jbi.rake
+++ b/tasks/jbi.rake
@@ -76,10 +76,14 @@ class JBITask < Buildr::ZipTask
       when nil, true
         # Tempfiles gets deleted on garbage collection, so we're going to hold on to it
         # through instance variable not closure variable.
-        Tempfile.open("MANIFEST.MF") { |@jbi_xml_tmp| @jbi_xml_tmp.write descriptor }
+        @jbi_xml_tmp = Tempfile.new('MANIFEST.MF')
+        @jbi_xml_tmp.write descriptor
+        @jbi_xml_tmp.close
         path("META-INF").include @jbi_xml_tmp.path, :as=>"jbi.xml" 
       when Proc, Method
-        Tempfile.open("MANIFEST.MF") { |@jbi_xml_tmp| @jbi_xml_tmp.write jbi_xml.call.to_s }
+        @jbi_xml_tmp = Tempfile.new('MANIFEST.MF')
+        @jbi_xml_tmp.write jbi_xml.call.to_s
+        @jbi_xml_tmp.close
         path("META-INF").include @jbi_xml_tmp.path, :as=>"jbi.xml" 
       end
     end