myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2979] branches/galaxy-integration: Added 'defaul


From: noreply
Subject: [myexperiment-hackers] [2979] branches/galaxy-integration: Added 'default_file_extension' method to workflow processors to be used when no file extension available (i.e.
Date: Wed, 28 Mar 2012 09:06:47 +0000 (UTC)

Revision
2979
Author
fbacall
Date
2012-03-28 09:06:47 +0000 (Wed, 28 Mar 2012)

Log Message

Added 'default_file_extension' method to workflow processors to be used when no file extension available (i.e. when uploading through API)

Modified Paths

Diff

Modified: branches/galaxy-integration/app/models/workflow.rb (2978 => 2979)


--- branches/galaxy-integration/app/models/workflow.rb	2012-03-28 09:05:38 UTC (rev 2978)
+++ branches/galaxy-integration/app/models/workflow.rb	2012-03-28 09:06:47 UTC (rev 2979)
@@ -227,11 +227,12 @@
   # End acts_as_runnable overridden methods
 
   def filename(version=nil)
+
     if version.blank?
-      return "#{unique_name}.#{file_ext}"
+      return "#{unique_name}.#{file_ext || self.processor_class.default_file_extension}"
     else
       return nil unless (workflow_version = self.find_version(version))
-      return "#{workflow_version.unique_name}.#{workflow_version.file_ext}"
+      return "#{workflow_version.unique_name}.#{workflow_version.file_ext || workflow_version.processor_class.default_file_extension}"
     end
   end
   

Modified: branches/galaxy-integration/lib/workflow_processors/galaxy.rb (2978 => 2979)


--- branches/galaxy-integration/lib/workflow_processors/galaxy.rb	2012-03-28 09:05:38 UTC (rev 2978)
+++ branches/galaxy-integration/lib/workflow_processors/galaxy.rb	2012-03-28 09:06:47 UTC (rev 2979)
@@ -36,6 +36,10 @@
     def self.file_extensions_supported
       ["ga"]
     end
+
+    def self.default_file_extension
+      "ga"
+    end
     
     def self.can_determine_type_from_file?
       true

Modified: branches/galaxy-integration/lib/workflow_processors/interface.rb (2978 => 2979)


--- branches/galaxy-integration/lib/workflow_processors/interface.rb	2012-03-28 09:05:38 UTC (rev 2978)
+++ branches/galaxy-integration/lib/workflow_processors/interface.rb	2012-03-28 09:06:47 UTC (rev 2979)
@@ -32,6 +32,10 @@
     def self.file_extensions_supported
       []
     end
+
+    def self.default_file_extension
+      nil
+    end
     
     def self.can_determine_type_from_file?
       false

Modified: branches/galaxy-integration/lib/workflow_processors/taverna2.rb (2978 => 2979)


--- branches/galaxy-integration/lib/workflow_processors/taverna2.rb	2012-03-28 09:05:38 UTC (rev 2978)
+++ branches/galaxy-integration/lib/workflow_processors/taverna2.rb	2012-03-28 09:06:47 UTC (rev 2979)
@@ -41,6 +41,10 @@
     def self.file_extensions_supported
       [ "t2flow" ]
     end
+
+    def self.default_file_extension
+      "t2flow"
+    end
     
     def self.can_determine_type_from_file?
       true
@@ -81,7 +85,7 @@
 
     # End Object Initializer
     
-    
+
     # Begin Instance Methods
     
     # These provide more specific functionality for a given workflow definition, such as parsing for metadata and image generation.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]