myexperiment-hackers
[Top][All Lists]
Advanced

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

[myexperiment-hackers] [3167] branches/events: cd branches/events ; svn


From: noreply
Subject: [myexperiment-hackers] [3167] branches/events: cd branches/events ; svn merge -r 3098:3166 ^/trunk
Date: Sat, 20 Oct 2012 06:19:42 +0000 (UTC)

Revision
3167
Author
dgc
Date
2012-10-20 06:19:39 +0000 (Sat, 20 Oct 2012)

Log Message

cd branches/events ; svn merge -r 3098:3166 ^/trunk

Modified Paths

Added Paths

Removed Paths

Diff

Modified: branches/events/Gemfile (3166 => 3167)


--- branches/events/Gemfile	2012-10-19 14:48:14 UTC (rev 3166)
+++ branches/events/Gemfile	2012-10-20 06:19:39 UTC (rev 3167)
@@ -2,18 +2,21 @@
 
 gem "rails", "2.3.14"
 gem "mysql", "~> 2.8.1"
-gem "mongrel", "~> 1.2.0.pre2"
+gem "mongrel", "~> 1.1.5"
 gem "mongrel_cluster", "~> 1.0.5"
 gem "rubyzip", "~> 0.9.4"
 gem "oauth", "~> 0.4.3"
-gem "libxml-ruby", "~> 1.1.4"
-gem "rmagick", "~> 2.13.1"
+gem "libxml-ruby", "2.2.2"
+gem "rmagick", "2.13.1"
 gem "dsl_accessor", "~> 0.4.0"
 gem "ruby-openid", "~> 2.1.8"
-gem "openurl", "~> 0.1.0"
+gem "openurl", "~> 0.2.0"
 gem "curb", "~> 0.7.8"
-gem "marc", "~> 0.4.1"
+gem "marc", "~> 0.4.3"
 gem "ruby-hmac", "~> 0.4.0"
 gem "passenger", "~> 2.2.15"
 gem "htmlentities", "~> 4.3.1"
+gem "taverna-scufl", "~> 0.7.2"
+gem "taverna-t2flow", "~> 0.3.0"
+gem "workflow-to-galaxy", "~> 0.3.4"
 

Modified: branches/events/Rakefile (3166 => 3167)


--- branches/events/Rakefile	2012-10-19 14:48:14 UTC (rev 3166)
+++ branches/events/Rakefile	2012-10-20 06:19:39 UTC (rev 3167)
@@ -446,3 +446,12 @@
   end
 end
 
+desc 'Rebuild checksums in the content blob store'
+task "myexp:blobstore:checksum:rebuild" do
+  require File.dirname(__FILE__) + '/config/environment'
+
+  conn = ActiveRecord::Base.connection
+
+  conn.execute('UPDATE content_blobs SET sha1 = SHA1(data), md5 = MD5(data)')
+end
+

Modified: branches/events/app/controllers/application_controller.rb (3166 => 3167)


--- branches/events/app/controllers/application_controller.rb	2012-10-19 14:48:14 UTC (rev 3166)
+++ branches/events/app/controllers/application_controller.rb	2012-10-20 06:19:39 UTC (rev 3167)
@@ -29,8 +29,12 @@
   def check_for_sleeper
     if request.method != :get && logged_in?
       if current_user.account_status == "sleep"
-        current_user.update_attribute(:account_status, "recheck")
+        current_user.update_attribute(:account_status, "sleep recheck")
       end
+
+      if current_user.account_status == "suspect"
+        current_user.update_attribute(:account_status, "suspect recheck")
+      end
     end
   end
 

Modified: branches/events/app/controllers/oauth_controller.rb (3166 => 3167)


--- branches/events/app/controllers/oauth_controller.rb	2012-10-19 14:48:14 UTC (rev 3166)
+++ branches/events/app/controllers/oauth_controller.rb	2012-10-20 06:19:39 UTC (rev 3167)
@@ -167,7 +167,8 @@
       "authorize"     => "view",
       "index"         => "view",
       "request_token" => "view",
-      "test_request"  => "view" 
+      "test_request"  => "view",
+      "show"          => "view"
     }
 
     if action_name == 'update'

Modified: branches/events/app/controllers/packs_controller.rb (3166 => 3167)


--- branches/events/app/controllers/packs_controller.rb	2012-10-19 14:48:14 UTC (rev 3166)
+++ branches/events/app/controllers/packs_controller.rb	2012-10-20 06:19:39 UTC (rev 3167)
@@ -378,7 +378,7 @@
         errors, type, entry = @pack.resolve_link(uri, request.host, request.port.to_s, current_user)
 
         entry.comment = params[:comment]
-        @contributable = entry.contributable
+        @contributable = entry.contributable if type == 'contributable'
 
         # By this point, we either have errors, or have an entry that needs saving.
         if errors.empty? && entry.save

Modified: branches/events/app/controllers/previews_controller.rb (3166 => 3167)


--- branches/events/app/controllers/previews_controller.rb	2012-10-19 14:48:14 UTC (rev 3166)
+++ branches/events/app/controllers/previews_controller.rb	2012-10-20 06:19:39 UTC (rev 3167)
@@ -69,6 +69,11 @@
       when 'svg';   content_blob = @context.preview.svg_blob
     end
 
+    if content_blob.nil?
+      render :nothing => true, :status => "404 Not Found"
+      return
+    end
+
     file_name = @context.preview.file_name(type)
 
     send_cached_data(file_name, :type => mime_type, :disposition => 'inline') {

Modified: branches/events/app/controllers/users_controller.rb (3166 => 3167)


--- branches/events/app/controllers/users_controller.rb	2012-10-19 14:48:14 UTC (rev 3166)
+++ branches/events/app/controllers/users_controller.rb	2012-10-20 06:19:39 UTC (rev 3167)
@@ -602,7 +602,7 @@
 
     if @to > 0
 
-      users = User.find(:all, :conditions => ["activated_at IS NOT NULL AND id >= ? AND id <= ? AND (account_status IS NULL OR (account_status != 'sleep' AND account_status != 'whitelist'))", @from, @to])
+      users = User.find(:all, :conditions => ["activated_at IS NOT NULL AND id >= ? AND id <= ? AND (account_status IS NULL OR (account_status != 'sleep' AND account_status != 'suspect' AND account_status != 'whitelist'))", @from, @to])
 
       @userlist = users.map do |user|
 
@@ -708,6 +708,8 @@
             user.update_attributes(:account_status => "whitelist")
           when "sleep"
             user.update_attributes(:account_status => "sleep")
+          when "suspect"
+            user.update_attributes(:account_status => "suspect")
           when "delete"
 
             # build an "all elements" user.xml record

Modified: branches/events/app/controllers/workflows_controller.rb (3166 => 3167)


--- branches/events/app/controllers/workflows_controller.rb	2012-10-19 14:48:14 UTC (rev 3166)
+++ branches/events/app/controllers/workflows_controller.rb	2012-10-20 06:19:39 UTC (rev 3167)
@@ -574,24 +574,35 @@
   # PUT /workflows/1;update_version
   def update_version
 
+    original_title = @workflow.title
+
     success = false
 
-    if params[:version]
+    if params[:version] && params[:workflow]
 
-      original_title = @workflow.title
-      version        = @workflow.find_version(params[:version])
-      do_preview     = !params[:workflow][:preview].blank? && params[:workflow][:preview].size > 0
+      version    = @workflow.find_version(params[:version])
       
-      attributes_to_update = {
-        :title          => params[:workflow][:title], 
-        :body           => params[:workflow][:body],
-        :last_edited_by => current_user.id
-      }
+      attributes_to_update = { :last_edited_by => current_user.id }
 
-      # only set the preview to update if one was provided
+      # only update title if the title isn't provided from the workflow processor
 
-      attributes_to_update[:image] = params[:workflow][:preview] if do_preview
+      unless version.can_infer_title?
+        attributes_to_update[:title] = params[:workflow][:title] if params[:workflow][:title]
+      end
 
+      # only update description if the description isn't provided by the workflow processor
+
+      unless version.can_infer_description?
+        attributes_to_update[:body]  = params[:workflow][:body]  if params[:workflow][:body]
+      end
+
+      # only set the preview to update if one was provided and it can't be
+      # generated from the workflow processer
+
+      if !version.can_generate_preview_image? && !params[:workflow][:preview].blank? && params[:workflow][:preview].size > 0
+        attributes_to_update[:image] = params[:workflow][:preview]
+      end
+
       success = version.update_attributes(attributes_to_update)
     end
 
@@ -1020,8 +1031,8 @@
           # Rewind the file, just in case
           file.rewind
           
-          workflow_to_set.title = processor_instance.get_title
-          workflow_to_set.body = processor_instance.get_description
+          workflow_to_set.title = processor_instance.get_title      if processor_instance.get_title
+          workflow_to_set.body = processor_instance.get_description if processor_instance.get_description
           
           workflow_to_set.content_type = ContentType.find_by_title(processor_class.display_name)
           

Modified: branches/events/app/models/content_blob.rb (3166 => 3167)


--- branches/events/app/models/content_blob.rb	2012-10-19 14:48:14 UTC (rev 3166)
+++ branches/events/app/models/content_blob.rb	2012-10-20 06:19:39 UTC (rev 3167)
@@ -3,6 +3,19 @@
 # Copyright (c) 2009 University of Manchester and the University of Southampton.
 # See license.txt for details.
 
+require 'digest/md5'
+require 'digest/sha1'
+
 class ContentBlob < ActiveRecord::Base
   validates_presence_of :data
+
+  before_save do |blob|
+    blob.update_checksums
+  end
+
+  def update_checksums
+    self.md5  = Digest::MD5.hexdigest(data)
+    self.sha1 = Digest::SHA1.hexdigest(data)
+  end
+
 end

Modified: branches/events/app/models/pack.rb (3166 => 3167)


--- branches/events/app/models/pack.rb	2012-10-19 14:48:14 UTC (rev 3166)
+++ branches/events/app/models/pack.rb	2012-10-20 06:19:39 UTC (rev 3167)
@@ -503,88 +503,75 @@
     errors_here = Pack.new.errors
     type = nil
     entry = nil
-    
     is_remote = false
-    
+
     begin
-      
       uri = URI.parse(link)
-      
-      if uri.absolute?
-        if is_internal_uri?(uri, host_name, host_port)
-          # Attempt to initialise a pack_contributable_entry
-          
-          expr = /^\/(workflows|files|packs)\/(\d+)$/   # e.g: "\workflows\45"
-          if uri.path =~ expr
-            arr = uri.path.scan(expr)
-            c_type, id = arr[0][0], arr[0][1]
-            
-            # Try to find the contributable item being pointed at
-            case c_type.downcase
-            when 'workflows'
-              contributable = Workflow.find(:first, :conditions => ["id = ?", id])
-            when 'files'
-              contributable = Blob.find(:first, :conditions => ["id = ?", id])
-            when 'packs'
-              contributable = Pack.find(:first, :conditions => ["id = ?", id])
-            else
-              contributable = nil
+
+      if uri.relative? || (uri.absolute? && is_internal_uri?(uri, host_name, host_port))
+        # Attempt to initialise a pack_contributable_entry
+        contributable = nil
+
+        # Use Rails' routing to figure out the URL
+        begin
+          request = ActionController::Routing::Routes.recognize_path(uri.path, :method => :get)
+          model_name = request[:controller].classify
+        rescue Exception => exc
+          raise URI::InvalidURIError
+        end
+
+        if Conf.contributable_models.include?(model_name) && request[:action] == "show"
+          contributable = eval(model_name).find_by_id(request[:id])
+        else
+          is_remote = true # Treat as a remote entry
+        end
+
+        if !is_remote
+          if contributable && errors_here.empty?
+            entry = PackContributableEntry.new
+            entry.contributable = contributable
+  
+            type = 'contributable'
+  
+            # check if the 'contributable' is a pack, then that it's not the same pack,
+            # to which we are trying to add something at the moment
+            if contributable == self.id
+              errors_here.add_to_base('Cannot add the pack to itself')
             end
-            
-            if contributable
-              entry = PackContributableEntry.new
-              entry.contributable = contributable
-              
-              type = 'contributable'
-              
-              # check if the 'contributable' is a pack, then that it's not the same pack,
-              # to which we are trying to add something at the moment
-              if c_type.downcase == 'packs' && contributable.id == self.id
-                errors_here.add_to_base('Cannot add the pack to itself')
-              end
-              
-              # Check if version was specified in the uri
-              unless uri.query.blank?
-                expr2 = /version=(\d+)/
-                if uri.query =~ expr2
-                  entry.contributable_version = uri.query.scan(expr2)[0][0] 
-                end
-              end
-            else
-              errors_here.add_to_base('The item the link points to does not exist.')
+  
+            # Check if version was specified in the uri
+            entry.contributable_version = request[:version]
+  
+            # maybe it was as a query instead?
+            if uri.query
+              entry.contributable_version = CGI.parse(uri.query)["version"].first.try(:to_i)
             end
           else
-            # Treat as a remote entry
-            is_remote = true
+            errors_here.add_to_base('The item the link points to does not exist.')
           end
-          
-        else
-          # Treat as a remote entry
-          is_remote = true
         end
       else
-        errors_here.add_to_base('Please provide a valid link.')  
+        is_remote = true # Treat as a remote entry
       end
-      
+
       if is_remote
         entry = PackRemoteEntry.new(:title => "Link", :uri => link)
         type = 'remote'
       end
-      
+
       if entry
         entry.pack = self
         entry.user = current_user
       end
-      
+
     rescue URI::InvalidURIError
       errors_here.add_to_base('Really struggled to parse this link. Please could you check if it is valid.')
     end
-    
+
     return [errors_here, type, entry]
   end
   
   
-  
   # Checks if the uri provided points to something internally to the host site. 
   # Note: assumes that the host site runs on HTTP.
   def is_internal_uri?(uri, host_name, host_port)

Modified: branches/events/app/models/workflow.rb (3166 => 3167)


--- branches/events/app/models/workflow.rb	2012-10-19 14:48:14 UTC (rev 3166)
+++ branches/events/app/models/workflow.rb	2012-10-20 06:19:39 UTC (rev 3167)
@@ -57,7 +57,7 @@
     :mutable => [ :contributor, :title, :unique_name, :body, :body_html,
                   :file_ext, :last_edited_by, :content_type_id, :image, :svg ]
 
-  acts_as_solr(:fields => [ :title, :body, :tag_list, :contributor_name, :kind, :get_all_search_terms ],
+  acts_as_solr(:fields => [ :title, :body, :filename, :tag_list, :contributor_name, :kind, :get_all_search_terms ],
                :boost => "rank",
                :include => [ :comments ]) if Conf.solr_enable
 
@@ -160,6 +160,30 @@
     return proc_class.can_infer_metadata?
   end
   
+  def can_infer_title?
+    if processor_class
+      processor_class.can_infer_title?
+    else
+      false
+    end
+  end
+
+  def can_infer_description?
+    if processor_class
+      processor_class.can_infer_description?
+    else
+      false
+    end
+  end
+
+  def can_generate_preview_image?
+    if processor_class
+      processor_class.can_generate_preview_image?
+    else
+      false
+    end
+  end
+
   def type_display_name
     content_type.title
   end

Modified: branches/events/app/models/workflow_version.rb (3166 => 3167)


--- branches/events/app/models/workflow_version.rb	2012-10-19 14:48:14 UTC (rev 3166)
+++ branches/events/app/models/workflow_version.rb	2012-10-20 06:19:39 UTC (rev 3167)
@@ -3,6 +3,8 @@
 # Copyright (c) 2012 University of Manchester and the University of Southampton.
 # See license.txt for details.
 
+require 'lib/previews'
+
 class WorkflowVersion < ActiveRecord::Base
 
   is_version_of :workflow
@@ -33,7 +35,7 @@
 
   def processor_class
     if self.content_type
-        @processor_class ||= WorkflowTypesHandler.processor_class_for_type_display_name(self.content_type.title)
+      @processor_class ||= WorkflowTypesHandler.processor_class_for_type_display_name(self.content_type.title)
     end
   end
 
@@ -42,5 +44,28 @@
     @display_data_format = (klass.nil? ? self.file_ext : klass.display_data_format)
   end
 
+  def can_infer_title?
+    if processor_class
+      processor_class.can_infer_title?
+    else
+      false
+    end
+  end
+
+  def can_infer_description?
+    if processor_class
+      processor_class.can_infer_description?
+    else
+      false
+    end
+  end
+
+  def can_generate_preview_image?
+    if processor_class
+      processor_class.can_generate_preview_image?
+    else
+      false
+    end
+  end
 end
 

Modified: branches/events/app/views/activities/_list.rhtml (3166 => 3167)


--- branches/events/app/views/activities/_list.rhtml	2012-10-19 14:48:14 UTC (rev 3166)
+++ branches/events/app/views/activities/_list.rhtml	2012-10-20 06:19:39 UTC (rev 3167)
@@ -1,4 +1,4 @@
-<% if Authorization.check('create', Comment, current_user, context) %>
+<% if defined?(context) && Authorization.check('create', Comment, current_user, context) %>
   <div class="addCommentBox">
     <% form_remote_tag(
         :url =""      polymorphic_path(context) + "/comments",

Modified: branches/events/app/views/sessions/new.rhtml (3166 => 3167)


--- branches/events/app/views/sessions/new.rhtml	2012-10-19 14:48:14 UTC (rev 3166)
+++ branches/events/app/views/sessions/new.rhtml	2012-10-20 06:19:39 UTC (rev 3167)
@@ -6,7 +6,7 @@
 <% else %>
 	<br/>
 	<center>
-		<div style="width: 190px;">
+		<div class="new-session-sign-in">
 			<%= render :partial => "gadgets/sign_in" %>
 		</div>
 	</center>

Modified: branches/events/app/views/users/check.rhtml (3166 => 3167)


--- branches/events/app/views/users/check.rhtml	2012-10-19 14:48:14 UTC (rev 3166)
+++ branches/events/app/views/users/check.rhtml	2012-10-20 06:19:39 UTC (rev 3167)
@@ -148,11 +148,16 @@
         changeSelectedKSE("whitelist");
         break;
 
-      case 115: /* 's' key */
+      case 111: /* 'o' key */
 
         changeSelectedKSE("sleep");
         break;
 
+      case 115: /* 's' key */
+
+        changeSelectedKSE("suspect");
+        break;
+
       case 120: /* 'x' key */
 
         changeSelectedKSE("delete");
@@ -209,6 +214,10 @@
                 <label for="" input_name -%>-sleep">Sleep</label>
               </div>
               <div>
+                <input name="<%= input_name -%>" id="<%= input_name -%>-suspect" value="suspect" type="radio"  user[:ob].id -%>').className = 'suspect';"/>
+                <label for="" input_name -%>-suspect">Suspect</label>
+              </div>
+              <div>
                 <input name="<%= input_name -%>" id="<%= input_name -%>-delete" value="delete" type="radio"  user[:ob].id -%>').className = 'delete';"/>
                 <label for="" input_name -%>-delete">Delete</label>
               </div>

Modified: branches/events/app/views/workflows/edit_version.rhtml (3166 => 3167)


--- branches/events/app/views/workflows/edit_version.rhtml	2012-10-19 14:48:14 UTC (rev 3166)
+++ branches/events/app/views/workflows/edit_version.rhtml	2012-10-20 06:19:39 UTC (rev 3167)
@@ -1,5 +1,11 @@
 <% t "Edit Version" -%>
 
+<% title_edit       = address@hidden %>
+<% preview_edit     = address@hidden %>
+<% description_edit = address@hidden %>
+
+<% can_edit_anything = title_edit || preview_edit || description_edit %>
+
 <%= _javascript__include_tag "fckeditor/fckeditor.js" %>
 
 <h1>
@@ -25,29 +31,50 @@
 	    <!-- Title -->
 			<p>
 				<b>Title</b>
-				<span class="required">*</span>
+        <% if title_edit %>
+          <span class="required">*</span>
+        <% end %>
 			</p>
-		  <%= text_field_tag 'workflow[title]', @viewing_version.title, :size => '60' %>
+
+      <% if title_edit %>
+        <%= text_field_tag 'workflow[title]', @viewing_version.title, :size => '60' %>
+      <% else %>
+        <p class="derived_annotation_notice">The title is derived from the workflow file.  Please edit the workflow directly and upload a new version to change the title of this workflow.</p>
+      <% end %>
 			
 			<br/>
 			
 			<!-- Preview Image -->
 			<p><b>Preview Image</b></p>
-			<input id="workflow_preview" name="workflow[preview]" size="50" type="file" />
-			<p style="font-size: 77%; color: #666666; font-style: italic; padding-top: 0;">
-					Leave this blank to keep the existing preview image
-			</p>
+
+      <% if preview_edit %>
+        <input id="workflow_preview" name="workflow[preview]" size="50" type="file" />
+        <p style="font-size: 77%; color: #666666; font-style: italic; padding-top: 0;">
+            Leave this blank to keep the existing preview image
+        </p>
+      <% else %>
+        <p class="derived_annotation_notice">The preview image is derived from the workflow file.  Please edit the workflow directly and upload a new version to change the appearance of this workflow.</p>
+      <% end %>
 				
 			<br/>
 			
 			<!-- Description -->
 			<p><b>Description</b></p>
-			<%= fckeditor_textarea(:workflow, :body, :toolbarSet => 'Simple', :width => '500px', :height => '500px') %>
-	
-	  	<br />
+      <% if description_edit %>
+        <%= fckeditor_textarea(:workflow, :body, :toolbarSet => 'Simple', :width => '500px', :height => '500px') %>
+    
+        <br />
+      <% else %>
+        <p class="derived_annotation_notice">The description is derived from the workflow file.  Please edit the workflow directly and upload a new version to change the description of this workflow.</p>
+      <% end %>
+
 			<br />
 	
-	  	<center><%= submit_tag "Update", :disable_with => "Updating..." %></center>
+      <center>
+        <% if can_edit_anything %>
+          <%= submit_tag "Update", :disable_with => "Updating..." %>
+        <% end %>
+      </center>
 	
 		</div>
 	</center>

Modified: branches/events/app/views/workflows/taverna2/_internals.rhtml (3166 => 3167)


--- branches/events/app/views/workflows/taverna2/_internals.rhtml	2012-10-19 14:48:14 UTC (rev 3166)
+++ branches/events/app/views/workflows/taverna2/_internals.rhtml	2012-10-20 06:19:39 UTC (rev 3167)
@@ -67,6 +67,28 @@
       </div>
     </div>
         
+    <!-- Dependencies -->
+    <% dependencies = model.dependencies -%>
+    <div class="fold">
+      <div class="foldTitle">
+        <%= info_icon_with_tooltip "These are the listed dependencies of the workflow" %>
+        Dependencies (<%= dependencies.length -%>)
+      </div>
+      <div class="foldContent" style="display: none;">
+        <% unless dependencies.empty? -%>
+          <table class="simple">
+            <% dependencies.each do |dep| -%>
+              <tr>
+                <td><%= h dep -%></td>
+              </tr>
+            <% end %>
+          </table>
+        <% else %>
+          <p class="none_text">None</p>
+        <% end %>
+      </div>
+    </div>
+        
     <!-- Sources -->
     <% sources = model.sources -%>
     <div class="fold">

Modified: branches/events/config/environment.rb (3166 => 3167)


--- branches/events/config/environment.rb	2012-10-19 14:48:14 UTC (rev 3166)
+++ branches/events/config/environment.rb	2012-10-20 06:19:39 UTC (rev 3167)
@@ -36,20 +36,14 @@
     :acts_as_rateable,
     :acts_as_solr,
     :acts_as_taggable_redux,
-    :acts_as_versioned,
     :auto_complete,
-    :browser_filters,
     :encrypted_attributes,
-    :exception_notification,
     :fckeditor,
     :headliner,
-    :mannie_taverna_scufl,
-    :mannie_taverna_t2flow,
     :oauth,
     :oauth_plugin,
     :open_id_authentication,
     :paginating_find,
-    :qrcode,
     :query_stats,
     :recaptcha,
     :simile_timeline,
@@ -112,17 +106,3 @@
 
 load 'config/environment_private.rb' if FileTest.exist?('config/environment_private.rb')
 
-# Fix for Ruby 1.8.7 when using Rails < 2.2
-if RUBY_VERSION == "1.8.7" && ((Rails::VERSION::MAJOR == 1) || (Rails::VERSION::MAJOR == 2 && Rails::VERSION::MINOR < 2))
-  module ActionView
-    module Helpers
-      module TextHelper
-        def truncate(text, length = 30, truncate_string = "...")
-          if text.nil? then return end
-          l = length - truncate_string.chars.to_a.size
-          (text.chars.to_a.size > length ? text.chars.to_a[0...l].join + truncate_string : text).to_s
-        end
-      end
-    end
-  end
-end

Copied: branches/events/db/migrate/097_add_checksums_to_content_blobs.rb (from rev 3166, trunk/db/migrate/097_add_checksums_to_content_blobs.rb) (0 => 3167)


--- branches/events/db/migrate/097_add_checksums_to_content_blobs.rb	                        (rev 0)
+++ branches/events/db/migrate/097_add_checksums_to_content_blobs.rb	2012-10-20 06:19:39 UTC (rev 3167)
@@ -0,0 +1,19 @@
+# myExperiment: db/migrate/097_add_checksums_to_content_blobs.rb
+# 
+# Copyright (c) 2012 University of Manchester and the University of Southampton.
+# See license.txt for details.
+
+class AddChecksumsToContentBlobs < ActiveRecord::Migration
+  def self.up
+    add_column :content_blobs, :md5,  :string, :limit => 32
+    add_column :content_blobs, :sha1, :string, :limit => 40
+
+    add_index :content_blobs, :md5
+    add_index :content_blobs, :sha1
+  end
+
+  def self.down
+    remove_column :content_blobs, :md5
+    remove_column :content_blobs, :sha1
+  end
+end

Modified: branches/events/db/schema.rb (3166 => 3167)


--- branches/events/db/schema.rb	2012-10-19 14:48:14 UTC (rev 3166)
+++ branches/events/db/schema.rb	2012-10-20 06:19:39 UTC (rev 3167)
@@ -174,8 +174,13 @@
 
   create_table "content_blobs", :force => true do |t|
     t.binary "data", :limit => 2147483647
+    t.string "md5",  :limit => 32
+    t.string "sha1", :limit => 40
   end
 
+  add_index "content_blobs", ["md5"], :name => "index_content_blobs_on_md5"
+  add_index "content_blobs", ["sha1"], :name => "index_content_blobs_on_sha1"
+
   create_table "content_types", :force => true do |t|
     t.integer  "user_id"
     t.string   "title"

Deleted: branches/events/lib/tasks/qrcode_tasks.rake (3166 => 3167)


--- branches/events/lib/tasks/qrcode_tasks.rake	2012-10-19 14:48:14 UTC (rev 3166)
+++ branches/events/lib/tasks/qrcode_tasks.rake	2012-10-20 06:19:39 UTC (rev 3167)
@@ -1,4 +0,0 @@
-# desc "Explaining what the task does"
-# task :qrcode do
-#   # Task goes here
-# end
\ No newline at end of file

Modified: branches/events/lib/workflow_processors/interface.rb (3166 => 3167)


--- branches/events/lib/workflow_processors/interface.rb	2012-10-19 14:48:14 UTC (rev 3166)
+++ branches/events/lib/workflow_processors/interface.rb	2012-10-20 06:19:39 UTC (rev 3167)
@@ -6,23 +6,23 @@
 # Defines an interface that all workflow type processors need to adhere to.
 module WorkflowProcessors
   class Interface
-    
+
     # Begin Class Methods
-    
-    # These: 
+
+    # These:
     # - provide information about the Workflow Type supported by this processor,
     # - provide information about the processor's capabilites, and
     # - provide any general functionality.
-    
+
     # MUST be unique across all processors
     def self.display_name
       ""
     end
-    
+
     def self.display_data_format
       ""
     end
-    
+
     def self.mime_type
       "application/octet-stream"
     end
@@ -36,27 +36,35 @@
     def self.default_file_extension
       nil
     end
-    
+
     def self.can_determine_type_from_file?
       false
     end
-    
+
     def self.recognised?(file)
       false
     end
-    
+
     def self.can_infer_metadata?
       false
     end
-    
+
+    def self.can_infer_title?
+      false
+    end
+
+    def self.can_infer_description?
+      false
+    end
+
     def self.can_generate_preview_image?
       false
     end
-    
+
     def self.can_generate_preview_svg?
       false
     end
-    
+
     def self.show_download_section?
       true
     end
@@ -71,36 +79,36 @@
     end
 
     # End Object Initializer
-    
-    
+
+
     # Begin Instance Methods
-    
+
     # These provide more specific functionality for a given workflow definition, such as parsing for metadata and image generation.
-    
+
     def get_title
       nil
     end
-    
+
     def get_description
       nil
     end
-    
+
     def get_preview_image
       nil
     end
-    
+
     def get_preview_svg
       nil
     end
-    
+
     def get_workflow_model_object
       nil
     end
-    
+
     def get_workflow_model_input_ports
-      
+
     end
-    
+
     def get_search_terms
       ""
     end
@@ -113,6 +121,6 @@
     end
 
     # End Instance Methods
-    
+
   end
 end

Modified: branches/events/lib/workflow_processors/taverna2.rb (3166 => 3167)


--- branches/events/lib/workflow_processors/taverna2.rb	2012-10-19 14:48:14 UTC (rev 3166)
+++ branches/events/lib/workflow_processors/taverna2.rb	2012-10-20 06:19:39 UTC (rev 3167)
@@ -64,6 +64,14 @@
     def self.can_infer_metadata?
       true
     end
+
+    def self.can_infer_title?
+      true
+    end
+
+    def self.can_infer_description?
+      true
+    end
     
     def self.can_generate_preview_image?
       true

Modified: branches/events/lib/workflow_processors/taverna_scufl.rb (3166 => 3167)


--- branches/events/lib/workflow_processors/taverna_scufl.rb	2012-10-19 14:48:14 UTC (rev 3166)
+++ branches/events/lib/workflow_processors/taverna_scufl.rb	2012-10-20 06:19:39 UTC (rev 3167)
@@ -62,6 +62,14 @@
     def self.can_infer_metadata?
       true
     end
+
+    def self.can_infer_title?
+      true
+    end
+
+    def self.can_infer_description?
+      true
+    end
     
     def self.can_generate_preview_image?
       true

Modified: branches/events/public/stylesheets/biovel.css (3166 => 3167)


--- branches/events/public/stylesheets/biovel.css	2012-10-19 14:48:14 UTC (rev 3166)
+++ branches/events/public/stylesheets/biovel.css	2012-10-20 06:19:39 UTC (rev 3167)
@@ -1,4 +1,4 @@
-/* Stylesheet for the e-LICO layout. Requires main myExperiment stylesheet. */
+/* Stylesheet for the BioVeL group's skin, based on the e-LICO layout. Requires main myExperiment stylesheet. */
 
 body  {
 	background: #EEEB99;
@@ -8,6 +8,9 @@
   background-color: #99cc33;
 }
 
+.pagination a, .tabnav li a:hover, .tabnav li#selected_tabnav a  {
+  background-image: none;
+}
 #myexp_searchbar {
   background-image: url('/images/searchfade_alpha.png');
 }

Modified: branches/events/public/stylesheets/skin_template.css (3166 => 3167)


--- branches/events/public/stylesheets/skin_template.css	2012-10-19 14:48:14 UTC (rev 3166)
+++ branches/events/public/stylesheets/skin_template.css	2012-10-20 06:19:39 UTC (rev 3167)
@@ -5,6 +5,9 @@
   background-color: #317EFF;
 }
 
+.pagination a, .tabnav li a:hover, .tabnav li#selected_tabnav a  {
+  background-image: none;
+}
 #myexp_searchbar {
   background-image: url('/images/searchfade_alpha.png');
 }

Modified: branches/events/public/stylesheets/styles.css (3166 => 3167)


--- branches/events/public/stylesheets/styles.css	2012-10-19 14:48:14 UTC (rev 3166)
+++ branches/events/public/stylesheets/styles.css	2012-10-20 06:19:39 UTC (rev 3167)
@@ -1529,6 +1529,7 @@
 	line-height: 1.4;
 }
 
+.derived_annotation_notice,
 .none_text {
 	font-style: italic;
 	color: #666666;
@@ -2306,10 +2307,15 @@
 }
 
 #user-check-list .sleep TD {
-	border: 1px solid #808080;
-  background: #c0c0c0;
+	border: 1px solid #c0e0c0;
+  background: #e0ffe0;
 }
 
+#user-check-list .suspect TD {
+	border: 1px solid #e0c0c0;
+  background: #ffe0e0;
+}
+
 #user-check-list .delete TD {
 	border: 1px solid #c08080;
   background: #ffc0c0;
@@ -2452,3 +2458,12 @@
   font-size: 8pt;
 }
 
+.new-session-sign-in {
+  width: 190px;
+  border: 1px solid #CCCCCC;
+  border-radius: 6px 6px 6px 6px;
+  -moz-border-radius: 6px 6px 6px 6px;
+  -webkit-border-bottom-left-radius: 6px;
+  -webkit-border-bottom-right-radius: 6px;
+}
+

reply via email to

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