Diff
Modified: branches/galaxy-integration/app/controllers/workflows_controller.rb (2986 => 2987)
--- branches/galaxy-integration/app/controllers/workflows_controller.rb 2012-05-11 11:28:05 UTC (rev 2986)
+++ branches/galaxy-integration/app/controllers/workflows_controller.rb 2012-05-11 11:52:28 UTC (rev 2987)
@@ -318,11 +318,11 @@
# Custom metadata provided.
elsif params[:metadata_choice] == 'custom'
- worked = set_custom_metadata(@workflow, file)
+ worked, error_message = set_custom_metadata(@workflow, file)
unless worked
respond_to do |format|
- flash.now[:error] = "The file provided isn't a workflow of the type specified. Please select a different file or set an appropriate content type."
+ flash.now[:error] = error_message
format.html { render :action ="" "new" }
end
return
@@ -429,7 +429,7 @@
# Custom metadata provided.
elsif params[:metadata_choice] == 'custom'
- worked = set_custom_metadata(@workflow, file)
+ worked, error_message = set_custom_metadata(@workflow, file)
unless worked
respond_to do |format|
@@ -970,7 +970,6 @@
# Method used in the create and create_version methods.
def set_custom_metadata(workflow_to_set, file)
- worked = true
workflow_to_set.title = params[:workflow][:title]
workflow_to_set.body = params[:new_workflow][:body]
@@ -993,6 +992,17 @@
:category => 'Workflow')
end
+ if !ct.valid?
+
+ other_ct = ContentType.find_by_mime_type(file.content_type)
+
+ if other_ct
+ return [false, "Unable to create new type because the MIME type \"#{file.content_type}\" is already used by the \"#{other_ct.title}\" type."]
+ end
+
+ return [false, "Unable to create new type."]
+ end
+
workflow_to_set.content_type = ct
else
workflow_to_set.content_type = ContentType.find_by_title(wf_type)
@@ -1001,7 +1011,9 @@
# Check that the file uploaded is valid for the content type chosen (if supported by a workflow processor).
# This is to ensure that the correct content type is being assigned to the workflow file uploaded.
- return false unless workflow_file_matches_content_type_if_supported?(file, workflow_to_set)
+ if !workflow_file_matches_content_type_if_supported?(file, workflow_to_set)
+ return [false, "The file provided isn't a workflow of the type specified. Please select a different file or set an appropriate content type."]
+ end
# Preview image
# TODO: kept getting permission denied errors from the file_column and rmagick code, so disable for windows, for now.
@@ -1024,7 +1036,7 @@
# Set the internal unique name for this particular workflow (or workflow_version).
workflow_to_set.set_unique_name
- return worked
+ return [true, nil]
end
# This method checks to to see if the file specified is a valid one for the existing workflow specified,
Modified: branches/galaxy-integration/app/models/concept.rb (2986 => 2987)
--- branches/galaxy-integration/app/models/concept.rb 2012-05-11 11:28:05 UTC (rev 2986)
+++ branches/galaxy-integration/app/models/concept.rb 2012-05-11 11:52:28 UTC (rev 2987)
@@ -5,8 +5,49 @@
class Concept < ActiveRecord::Base
- acts_as_structured_data
+ belongs_to :vocabulary
+ has_many :broader_relations, :foreign_key => :object_concept_id,
+ :conditions => "relation_type = 'broader'",
+ :class_name => "ConceptRelation"
+
+ has_many :broader_concepts, :through => :broader_relations,
+ :source => :object_concept,
+ :class_name => "Concept"
+
+ has_many :narrower_relations, :foreign_key => :subject_concept_id,
+ :conditions => "relation_type = 'broader'",
+ :class_name => "ConceptRelation"
+
+ has_many :narrower_concepts, :through => :narrower_relations,
+ :source => :subject_concept,
+ :class_name => "Concept"
+
+ has_many :related_relations, :foreign_key => :subject_concept_id,
+ :conditions => "relation_type = 'related'",
+ :class_name => "ConceptRelation"
+
+ has_many :related_concepts, :through => :related_relations,
+ :source => :object_concept,
+ :class_name => "Concept"
+
+ has_many :labels, :dependent => :destroy
+
+ has_many :preferred_labels, :foreign_key => :concept_id,
+ :dependent => :destroy,
+ :conditions => "label_type = 'preferred'",
+ :class_name => "Label"
+
+ has_many :alternate_labels, :foreign_key => :concept_id,
+ :dependent => :destroy,
+ :conditions => "label_type = 'alternate'",
+ :class_name => "Label"
+
+ has_many :hidden_labels, :foreign_key => :concept_id,
+ :dependent => :destroy,
+ :conditions => "label_type = 'hidden'",
+ :class_name => "Label"
+
format_attribute :description
def preferred_label
Copied: branches/galaxy-integration/app/models/concept_relation.rb (from rev 2986, trunk/app/models/concept_relation.rb) (0 => 2987)
--- branches/galaxy-integration/app/models/concept_relation.rb (rev 0)
+++ branches/galaxy-integration/app/models/concept_relation.rb 2012-05-11 11:52:28 UTC (rev 2987)
@@ -0,0 +1,10 @@
+# myExperiment: app/models/concept_relation.rb
+#
+# Copyright (c) 2012 University of Manchester and the University of Southampton.
+# See license.txt for details.
+
+class ConceptRelation < ActiveRecord::Base
+ belongs_to :subject_concept, :class_name => "Concept", :foreign_key => :subject_concept_id
+ belongs_to :object_concept, :class_name => "Concept", :foreign_key => :object_concept_id
+end
+
Modified: branches/galaxy-integration/app/models/content_type.rb (2986 => 2987)
--- branches/galaxy-integration/app/models/content_type.rb 2012-05-11 11:28:05 UTC (rev 2986)
+++ branches/galaxy-integration/app/models/content_type.rb 2012-05-11 11:52:28 UTC (rev 2987)
@@ -11,6 +11,10 @@
validates_presence_of :title
validates_uniqueness_of :title
+ validates_uniqueness_of :mime_type, :unless => Proc.new { |ct|
+ Conf.duplicable_mime_types.include?(ct.mime_type)
+ }
+
def label
title
end
Copied: branches/galaxy-integration/app/models/label.rb (from rev 2986, trunk/app/models/label.rb) (0 => 2987)
--- branches/galaxy-integration/app/models/label.rb (rev 0)
+++ branches/galaxy-integration/app/models/label.rb 2012-05-11 11:52:28 UTC (rev 2987)
@@ -0,0 +1,10 @@
+# myExperiment: app/models/label.rb
+#
+# Copyright (c) 2012 University of Manchester and the University of Southampton.
+# See license.txt for details.
+
+class Label < ActiveRecord::Base
+ belongs_to :vocabulary
+ belongs_to :concept
+end
+
Modified: branches/galaxy-integration/app/models/ontology.rb (2986 => 2987)
--- branches/galaxy-integration/app/models/ontology.rb 2012-05-11 11:28:05 UTC (rev 2986)
+++ branches/galaxy-integration/app/models/ontology.rb 2012-05-11 11:52:28 UTC (rev 2987)
@@ -5,8 +5,10 @@
class Ontology < ActiveRecord::Base
- acts_as_structured_data
+ belongs_to :user
+ has_many :predicates, :foreign_key => :ontology_id
+
format_attribute(:description)
validates_presence_of(:uri, :title, :prefix)
Modified: branches/galaxy-integration/app/models/pack.rb (2986 => 2987)
--- branches/galaxy-integration/app/models/pack.rb 2012-05-11 11:28:05 UTC (rev 2986)
+++ branches/galaxy-integration/app/models/pack.rb 2012-05-11 11:52:28 UTC (rev 2987)
@@ -22,7 +22,7 @@
acts_as_rateable
acts_as_taggable
- acts_as_structured_data
+ has_many :relationships, :dependent => :destroy, :as => :context
validates_presence_of :title
Modified: branches/galaxy-integration/app/models/predicate.rb (2986 => 2987)
--- branches/galaxy-integration/app/models/predicate.rb 2012-05-11 11:28:05 UTC (rev 2986)
+++ branches/galaxy-integration/app/models/predicate.rb 2012-05-11 11:52:28 UTC (rev 2987)
@@ -5,7 +5,7 @@
class Predicate < ActiveRecord::Base
- acts_as_structured_data
+ belongs_to :ontology
format_attribute(:description)
Modified: branches/galaxy-integration/app/models/preview.rb (2986 => 2987)
--- branches/galaxy-integration/app/models/preview.rb 2012-05-11 11:28:05 UTC (rev 2986)
+++ branches/galaxy-integration/app/models/preview.rb 2012-05-11 11:52:28 UTC (rev 2987)
@@ -7,8 +7,14 @@
PREFIX = "tmp/previews"
- acts_as_structured_data
+ belongs_to :image_blob, :class_name => "ContentBlob",
+ :foreign_key => :image_blob_id,
+ :dependent => :destroy
+ belongs_to :svg_blob, :class_name => "ContentBlob",
+ :foreign_key => :svg_blob_id,
+ :dependent => :destroy
+
def file_name(type)
"#{PREFIX}/#{id}/#{type}"
end
Modified: branches/galaxy-integration/app/models/relationship.rb (2986 => 2987)
--- branches/galaxy-integration/app/models/relationship.rb 2012-05-11 11:28:05 UTC (rev 2986)
+++ branches/galaxy-integration/app/models/relationship.rb 2012-05-11 11:52:28 UTC (rev 2987)
@@ -5,8 +5,14 @@
class Relationship < ActiveRecord::Base
- acts_as_structured_data
+ belongs_to :user
+ belongs_to :context, :polymorphic => true
+
+ belongs_to :subject, :polymorphic => true
+ belongs_to :predicate
+ belongs_to :objekt, :polymorphic => true
+
validates_presence_of(:subject)
validates_presence_of(:predicate)
validates_presence_of(:objekt)
Modified: branches/galaxy-integration/app/models/service.rb (2986 => 2987)
--- branches/galaxy-integration/app/models/service.rb 2012-05-11 11:28:05 UTC (rev 2986)
+++ branches/galaxy-integration/app/models/service.rb 2012-05-11 11:52:28 UTC (rev 2987)
@@ -9,8 +9,12 @@
class Service < ActiveRecord::Base
acts_as_site_entity
acts_as_contributable
- acts_as_structured_data
+ has_many :service_categories
+ has_many :service_types
+ has_many :service_tags
+ has_many :service_deployments
+
acts_as_solr(:fields => [ :submitter_label, :name, :provider_label, :endpoint,
:wsdl, :city, :country, :description, :extra_search_terms ]) if Conf.solr_enable
Copied: branches/galaxy-integration/app/models/service_category.rb (from rev 2986, trunk/app/models/service_category.rb) (0 => 2987)
--- branches/galaxy-integration/app/models/service_category.rb (rev 0)
+++ branches/galaxy-integration/app/models/service_category.rb 2012-05-11 11:52:28 UTC (rev 2987)
@@ -0,0 +1,9 @@
+# myExperiment: app/models/service_category.rb
+#
+# Copyright (c) 2012 University of Manchester and the University of Southampton.
+# See license.txt for details.
+
+class ServiceCategory < ActiveRecord::Base
+ belongs_to :service
+end
+
Copied: branches/galaxy-integration/app/models/service_deployment.rb (from rev 2986, trunk/app/models/service_deployment.rb) (0 => 2987)
--- branches/galaxy-integration/app/models/service_deployment.rb (rev 0)
+++ branches/galaxy-integration/app/models/service_deployment.rb 2012-05-11 11:52:28 UTC (rev 2987)
@@ -0,0 +1,10 @@
+# myExperiment: app/models/service_deployment.rb
+#
+# Copyright (c) 2012 University of Manchester and the University of Southampton.
+# See license.txt for details.
+
+class ServiceDeployment < ActiveRecord::Base
+ belongs_to :service_provider
+ belongs_to :service
+end
+
Copied: branches/galaxy-integration/app/models/service_provider.rb (from rev 2986, trunk/app/models/service_provider.rb) (0 => 2987)
--- branches/galaxy-integration/app/models/service_provider.rb (rev 0)
+++ branches/galaxy-integration/app/models/service_provider.rb 2012-05-11 11:52:28 UTC (rev 2987)
@@ -0,0 +1,9 @@
+# myExperiment: app/models/service_provider.rb
+#
+# Copyright (c) 2012 University of Manchester and the University of Southampton.
+# See license.txt for details.
+
+class ServiceProvider < ActiveRecord::Base
+ has_many :service_deployments, :foreign_key => :service_provider_id
+end
+
Copied: branches/galaxy-integration/app/models/service_tag.rb (from rev 2986, trunk/app/models/service_tag.rb) (0 => 2987)
--- branches/galaxy-integration/app/models/service_tag.rb (rev 0)
+++ branches/galaxy-integration/app/models/service_tag.rb 2012-05-11 11:52:28 UTC (rev 2987)
@@ -0,0 +1,9 @@
+# myExperiment: app/models/service_tag.rb
+#
+# Copyright (c) 2012 University of Manchester and the University of Southampton.
+# See license.txt for details.
+
+class ServiceTag < ActiveRecord::Base
+ belongs_to :service
+end
+
Copied: branches/galaxy-integration/app/models/service_type.rb (from rev 2986, trunk/app/models/service_type.rb) (0 => 2987)
--- branches/galaxy-integration/app/models/service_type.rb (rev 0)
+++ branches/galaxy-integration/app/models/service_type.rb 2012-05-11 11:52:28 UTC (rev 2987)
@@ -0,0 +1,9 @@
+# myExperiment: app/models/service_type.rb
+#
+# Copyright (c) 2012 University of Manchester and the University of Southampton.
+# See license.txt for details.
+
+class ServiceType < ActiveRecord::Base
+ belongs_to :service
+end
+
Copied: branches/galaxy-integration/app/models/user_report.rb (from rev 2986, trunk/app/models/user_report.rb) (0 => 2987)
--- branches/galaxy-integration/app/models/user_report.rb (rev 0)
+++ branches/galaxy-integration/app/models/user_report.rb 2012-05-11 11:52:28 UTC (rev 2987)
@@ -0,0 +1,10 @@
+# myExperiment: app/models/user_report.rb
+#
+# Copyright (c) 2012 University of Manchester and the University of Southampton.
+# See license.txt for details.
+
+class UserReport < ActiveRecord::Base
+ belongs_to :user
+ belongs_to :subject, :polymorphic => true
+end
+
Modified: branches/galaxy-integration/app/models/vocabulary.rb (2986 => 2987)
--- branches/galaxy-integration/app/models/vocabulary.rb 2012-05-11 11:28:05 UTC (rev 2986)
+++ branches/galaxy-integration/app/models/vocabulary.rb 2012-05-11 11:52:28 UTC (rev 2987)
@@ -5,10 +5,10 @@
class Vocabulary < ActiveRecord::Base
- acts_as_structured_data
-
belongs_to :user
+ has_many :concepts, :dependent => :destroy
+
validates_presence_of :title
validates_presence_of :prefix
Modified: branches/galaxy-integration/app/models/workflow.rb (2986 => 2987)
--- branches/galaxy-integration/app/models/workflow.rb 2012-05-11 11:28:05 UTC (rev 2986)
+++ branches/galaxy-integration/app/models/workflow.rb 2012-05-11 11:52:28 UTC (rev 2987)
@@ -273,7 +273,11 @@
def components
if processor_class
- processor_class.new(content_blob.data).get_components
+ begin
+ processor_class.new(content_blob.data).get_components
+ rescue
+ XML::Node.new('components')
+ end
else
XML::Node.new('components')
end
Copied: branches/galaxy-integration/app/models/workflow_processor.rb (from rev 2986, trunk/app/models/workflow_processor.rb) (0 => 2987)
--- branches/galaxy-integration/app/models/workflow_processor.rb (rev 0)
+++ branches/galaxy-integration/app/models/workflow_processor.rb 2012-05-11 11:52:28 UTC (rev 2987)
@@ -0,0 +1,9 @@
+# myExperiment: app/models/workflow_processor.rb
+#
+# Copyright (c) 2012 University of Manchester and the University of Southampton.
+# See license.txt for details.
+
+class WorkflowProcessor < ActiveRecord::Base
+ belongs_to :workflow
+end
+
Copied: branches/galaxy-integration/app/views/layouts/_biovel.rhtml (from rev 2986, trunk/app/views/layouts/_biovel.rhtml) (0 => 2987)
--- branches/galaxy-integration/app/views/layouts/_biovel.rhtml (rev 0)
+++ branches/galaxy-integration/app/views/layouts/_biovel.rhtml 2012-05-11 11:52:28 UTC (rev 2987)
@@ -0,0 +1,26 @@
+<% @logo_link_url = "http://biovel.eu/" # The URL that the logo links to when clicked
+ @logo_image_url = "/images/biovel.png" # The logo image %>
+
+<% content_for :site_info_links do %>
+
+<% end %>
+
+<% content_for :logo do %>
+ <div style="float: left; margin-bottom: 0.5em">
+ <%= link_to image_tag(@logo_image_url), @logo_link_url, :style => "float: left" -%>
+ <div style="float: left; margin-top: 1em; margin-left: 1em">
+ <div style="font-weight: bold; vertical-align: middle">
+ <a href="" @logo_link_url -%>" class="biovel_logo_link">
+ <span style="font-size: 280%"><span style="color:black;">B</span>io<span style="color:black">V</span>e<span style="color:black">L</span></span><br/>
+ <span style="font-size: 100%">Biodiversity Virtual e-Laboratory</span>
+ </a>
+ </div>
+ <div style="margin: 0.5em 0 0 1em; color: black;">
+ on <%= link_to image_tag("/images/logo_tiny.png", :style=>"-moz-border-radius: 2px; border-radius: 2px; vertical-align: middle;border: 1px solid #ccc"), "/" -%>
+ </div>
+ </div>
+ </div>
+ <br class="clearer"/>
+<% end %>
+
+<%= render :partial => "layouts/myexperiment" %>
Modified: branches/galaxy-integration/config/base_schema.xml (2986 => 2987)
--- branches/galaxy-integration/config/base_schema.xml 2012-05-11 11:28:05 UTC (rev 2986)
+++ branches/galaxy-integration/config/base_schema.xml 2012-05-11 11:52:28 UTC (rev 2987)
@@ -84,9 +84,6 @@
<column type="text" name="report"/>
<column type="datetime" name="created_at"/>
- <belongs-to target="users"/>
- <belongs-to target="subject" polymorphic="true"/>
-
</table>
<table name="previews">
@@ -95,9 +92,6 @@
<column type="integer" name="svg_blob_id"/>
<column type="datetime" name="created_at"/>
- <belongs-to target="image_blob" class_name="ContentBlob" dependent="destroy" foreign_key="image_blob_id"/>
- <belongs-to target="svg_blob" class_name="ContentBlob" dependent="destroy" foreign_key="svg_blob_id"/>
-
</table>
</schema>
Modified: branches/galaxy-integration/config/default_settings.yml (2986 => 2987)
--- branches/galaxy-integration/config/default_settings.yml 2012-05-11 11:28:05 UTC (rev 2986)
+++ branches/galaxy-integration/config/default_settings.yml 2012-05-11 11:52:28 UTC (rev 2987)
@@ -453,6 +453,22 @@
label_icons:
+# duplicable_mime_types - This is the list of mime types that can appear
+# multiple times in the content types. These are for
+# situations where the mime type is generic and is not
+# specific enough to identify a particular content
+# type.
+
+duplicable_mime_types:
+
+ - application/x-zip-compressed
+ - application/zip
+ - application/x-gzip
+ - application/xml
+ - text/xml
+ - text/plain
+ - application/octet-stream
+
# rdfgen_enable
rdfgen_enable: false
Modified: branches/galaxy-integration/config/schema.d/owl.xml (2986 => 2987)
--- branches/galaxy-integration/config/schema.d/owl.xml 2012-05-11 11:28:05 UTC (rev 2986)
+++ branches/galaxy-integration/config/schema.d/owl.xml 2012-05-11 11:52:28 UTC (rev 2987)
@@ -11,11 +11,7 @@
<column type="text" name="description_html"/>
<column type="datetime" name="created_at"/>
<column type="datetime" name="updated_at"/>
-
- <belongs-to target="users"/>
- <has-many target="predicates" foreign_key="ontology_id"/>
-
</table>
<table name="predicates">
@@ -29,8 +25,6 @@
<column type="datetime" name="created_at"/>
<column type="datetime" name="updated_at"/>
- <belongs-to target="ontology"/>
-
</table>
</schema>
Modified: branches/galaxy-integration/config/schema.d/packs.xml (2986 => 2987)
--- branches/galaxy-integration/config/schema.d/packs.xml 2012-05-11 11:28:05 UTC (rev 2986)
+++ branches/galaxy-integration/config/schema.d/packs.xml 2012-05-11 11:52:28 UTC (rev 2987)
@@ -11,8 +11,6 @@
<column type="datetime" name="created_at"/>
<column type="datetime" name="updated_at"/>
- <has-many target="relationships" as="context" dependent="destroy"/>
-
</table>
<table name="pack_contributable_entries">
@@ -53,13 +51,6 @@
<column type="integer" name="objekt_id"/>
<column type="datetime" name="created_at"/>
- <belongs-to target="users"/>
- <belongs-to target="contexts" polymorphic="true"/>
-
- <belongs-to target="subjects" polymorphic="true"/>
- <belongs-to target="predicates"/>
- <belongs-to target="objekts" polymorphic="true"/>
-
</table>
</schema>
Modified: branches/galaxy-integration/config/schema.d/services.xml (2986 => 2987)
--- branches/galaxy-integration/config/schema.d/services.xml 2012-05-11 11:28:05 UTC (rev 2986)
+++ branches/galaxy-integration/config/schema.d/services.xml 2012-05-11 11:52:28 UTC (rev 2987)
@@ -41,11 +41,6 @@
<column type="string" name="monitor_small_symbol_url"/>
<column type="datetime" name="monitor_last_checked"/>
- <has-many target="service_categories"/>
- <has-many target="service_types"/>
- <has-many target="service_tags"/>
- <has-many target="service_deployments"/>
-
</table>
<!-- BioCatalogue service categories -->
@@ -60,8 +55,6 @@
<column type="string" name="uri"/>
<column type="string" name="label"/>
- <belongs-to target="service"/>
-
</table>
<!-- BioCatalogue service types -->
@@ -75,8 +68,6 @@
<column type="integer" name="service_id"/>
<column type="string" name="label"/>
- <belongs-to target="service"/>
-
</table>
<!-- BioCatalogue service tags -->
@@ -91,8 +82,6 @@
<column type="string" name="uri"/>
<column type="string" name="label"/>
- <belongs-to target="service"/>
-
</table>
<!-- BioCatalogue service deployments -->
@@ -119,9 +108,6 @@
<column type="integer" name="service_id"/>
<column type="integer" name="service_provider_id"/>
- <belongs-to target="service_provider"/>
- <belongs-to target="service"/>
-
</table>
<!-- BioCatalogue service providers -->
@@ -138,8 +124,6 @@
<column type="datetime" name="created"/>
- <has-many target="service_deployments" foreign_key="service_provider_id"/>
-
</table>
</schema>
Modified: branches/galaxy-integration/config/schema.d/skos.xml (2986 => 2987)
--- branches/galaxy-integration/config/schema.d/skos.xml 2012-05-11 11:28:05 UTC (rev 2986)
+++ branches/galaxy-integration/config/schema.d/skos.xml 2012-05-11 11:52:28 UTC (rev 2987)
@@ -12,8 +12,6 @@
<column type="datetime" name="created_at"/>
<column type="datetime" name="updated_at"/>
- <has-many target="concepts" dependent="destroy"/>
-
</table>
<table name="concepts">
@@ -25,66 +23,6 @@
<column type="datetime" name="created_at"/>
<column type="datetime" name="updated_at"/>
- <belongs-to target="vocabularies"/>
-
- <!-- Broader relations -->
-
- <has-many target = "broader_relations"
- foreign_key = "object_concept_id"
- class_name = "ConceptRelation"
- conditions = "relation_type = 'broader'"/>
-
- <has-many target = "broader_concepts"
- class_name = "Concept"
- through = "broader_relations"
- source = "object_concept"/>
-
- <!-- Narrower relations -->
-
- <has-many target = "narrower_relations"
- foreign_key = "subject_concept_id"
- class_name = "ConceptRelation"
- conditions = "relation_type = 'broader'"/>
-
- <has-many target = "narrower_concepts"
- class_name = "Concept"
- through = "narrower_relations"
- source = "subject_concept"/>
-
- <!-- Related relations -->
-
- <has-many target = "related_relations"
- foreign_key = "subject_concept_id"
- class_name = "ConceptRelation"
- conditions = "relation_type = 'related'"/>
-
- <has-many target = "related_concepts"
- class_name = "Concept"
- through = "related_relations"
- source = "object_concept"/>
-
- <!-- Labels -->
-
- <has-many target="labels" dependent="destroy"/>
-
- <has-many target = "preferred_labels"
- dependent = "destroy"
- class_name = "Label"
- foreign_key = "concept_id"
- conditions = "label_type = 'preferred'"/>
-
- <has-many target = "alternate_labels"
- dependent = "destroy"
- class_name = "Label"
- foreign_key = "concept_id"
- conditions = "label_type = 'alternate'"/>
-
- <has-many target = "hidden_labels"
- dependent = "destroy"
- class_name = "Label"
- foreign_key = "concept_id"
- conditions = "label_type = 'hidden'"/>
-
</table>
<table name="concept_relations">
@@ -93,14 +31,6 @@
<column type="integer" name="object_concept_id"/>
<column type="string" name="relation_type"/>
- <belongs-to target = "subject_concepts"
- class_name = "Concept"
- foreign_key = "subject_concept_id"/>
-
- <belongs-to target = "object_concepts"
- class_name = "Concept"
- foreign_key = "object_concept_id"/>
-
</table>
<table name="labels">
@@ -111,9 +41,6 @@
<column type="integer" name="concept_id"/>
<column type="integer" name="vocabulary_id"/>
- <belongs-to target="vocabularies"/>
- <belongs-to target="concepts"/>
-
</table>
</schema>
Modified: branches/galaxy-integration/config/schema.d/topics.xml (2986 => 2987)
--- branches/galaxy-integration/config/schema.d/topics.xml 2012-05-11 11:28:05 UTC (rev 2986)
+++ branches/galaxy-integration/config/schema.d/topics.xml 2012-05-11 11:52:28 UTC (rev 2987)
@@ -41,8 +41,6 @@
<column type="integer" name="score"/>
<column type="datetime" name="submit_dt"/>
- <belongs-to target="users"/>
-
</table>
</schema>
Modified: branches/galaxy-integration/config/schema.d/workflows.xml (2986 => 2987)
--- branches/galaxy-integration/config/schema.d/workflows.xml 2012-05-11 11:28:05 UTC (rev 2986)
+++ branches/galaxy-integration/config/schema.d/workflows.xml 2012-05-11 11:52:28 UTC (rev 2987)
@@ -23,34 +23,6 @@
</table>
- <table name="workflow_versions">
-
- <column type="integer" name="workflow_id"/>
- <column type="integer" name="version"/>
- <column type="text" name="revision_comments"/>
- <column type="integer" name="contributor_id"/>
- <column type="string" name="contributor_type"/>
- <column type="string" name="title"/>
- <column type="string" name="unique_name"/>
- <column type="text" name="body"/>
- <column type="text" name="body_html"/>
- <column type="datetime" name="created_at"/>
- <column type="datetime" name="updated_at"/>
- <column type="string" name="image"/>
- <column type="string" name="svg"/>
- <column type="string" name="license"/>
- <column type="integer" name="content_blob_id"/>
- <column type="string" name="file_ext"/>
- <column type="string" name="last_edited_by"/>
- <column type="integer" name="content_type_id"/>
- <column type="integer" name="preview_id"/>
-
- <index>
- <column name="workflow_id"/>
- </index>
-
- </table>
-
<table name="workflow_processors">
<column type="integer" name="workflow_id"/>
@@ -59,8 +31,6 @@
<column type="string" name="wsdl"/>
<column type="string" name="wsdl_operation"/>
- <belongs-to target="workflows"/>
-
</table>
</schema>
Modified: branches/galaxy-integration/config/tables.xml
(Binary files differ)
Modified: branches/galaxy-integration/db/migrate/013_create_workflows.rb (2986 => 2987)
--- branches/galaxy-integration/db/migrate/013_create_workflows.rb 2012-05-11 11:28:05 UTC (rev 2986)
+++ branches/galaxy-integration/db/migrate/013_create_workflows.rb 2012-05-11 11:52:28 UTC (rev 2987)
@@ -27,12 +27,33 @@
# :default => "by-sa"
# end
-# Workflow.create_versioned_table
+ create_table :workflow_versions do |t|
+ t.column "workflow_id", :integer
+ t.column "version", :integer
+ t.column "contributor_id", :integer
+ t.column "contributor_type", :string
+ t.column "title", :string
+ t.column "unique_name", :string
+ t.column "body", :text
+ t.column "body_html", :text
+ t.column "created_at", :datetime
+ t.column "updated_at", :datetime
+ t.column "image", :string
+ t.column "svg", :string
+ t.column "revision_comments", :text
+ t.column "content_blob_id", :integer
+ t.column "file_ext", :string
+ t.column "last_edited_by", :string
+ t.column "content_type_id", :integer
+ t.column "license", :string
+ t.column "preview_id", :integer
+ end
+
+ add_index :workflow_versions, [ :workflow_id ]
end
def self.down
# drop_table :workflows
-
-# Workflow.drop_versioned_table
+ drop_table :workflow_versions
end
end
Modified: branches/galaxy-integration/installers/fedora/README.txt (2986 => 2987)
--- branches/galaxy-integration/installers/fedora/README.txt 2012-05-11 11:28:05 UTC (rev 2986)
+++ branches/galaxy-integration/installers/fedora/README.txt 2012-05-11 11:52:28 UTC (rev 2987)
@@ -3,54 +3,61 @@
The files in this directory are an installer for myExperiment on Fedora 13 and
consequently RedHat 6 and CentOS 6.0. The installer is designed to work on a
-freshly installed version of the operating systems, you may have problems if
-you are installing on an existing system.
+freshly installed version of these operating systems, you may have problems if
+you are installing on an existing system, which has configuration that
+conflicts with that in the installer.
-install.bash is the main install script and can be downloaded and run from
-the current working directory as follows:
+install.bash is the main installer script and can be run from the current
+working directory as follows:
/bin/bash install.bash
-This install script requires the settings file, settings.bash, which needs to be
-kept in the same directory. This can be created by copying the
+This install script requires the settings file, settings.bash, which needs to
+be kept in the same directory. This can be created by copying the
default_settings.bash to settings.bash and making the following changes
before running install.bash:
-myexp_root_password - Choose a password for the root account of MySQL. If for
-whatever reason MySQL is already installed set this to the current MySQL root
-password. MySQL mosty have a root password for the installer to suceed
+myexp_root_password -
+ Choose a password for the root account of MySQL. If for whatever reason
+ MySQL is already installed set this to the current MySQL root password.
+ MySQL must have a root password for the installer to succeed. See
+ http://forums.mysql.com/read.php?10,355736 if you want to have set no MySQL
+ password after the installer has run.
-myexp_user_password - Choose a password for the account that myExperiment uses
-to access databases it creates for storing myExperiment data.
+fq_server_name -
+ The fully-qualified server name, i.e. the A record.
+ E.g. myexperiment.example.org
-fq_server_name - The fully-qualified server name and domain for your server,
-i.e. the A record. E.g. myexperiment.example.org
+sendmail_smarthost_server -
+ The mail server you want to user as a relay for emails.
+ E.g. smtp
-exim_smarthost_server - The mail server you want to user as a relay for emails.
-E.g. smtp
+sendmail_smarthost_domain -
+ The domain of the mail server you want to user as a relay for emails.
+ E.g. example.org
-exim_smarthost_domain - The mail server you want to user as a relay for emails.
-E.g. example.org
+myexp_cname -
+ The location you intend to host the myExperiment site. This may be the
+ same as fq_server_name.
+ E.g. myexperiment.example.org
-myexp_cname - The location you intend to host the myExperiment site. This may
-be the same as fq_server_name.
-E.g. myexperiment.example.org
-
== Post-installation configuration ==
-The installer is designed to work on a freshly installed version of Fedora 13 /
-RedHat 6 / CentOS 6.0 and will do minimal configuration of myExperiment. To do
-further configuration you will need to edit settings.yml in the config directory
-of the SVN checkout of myExperiment by default this /var/rails/myexperiment/config/.
+The installer is designed to work on a freshly installed version of Fedora 13
+/ RedHat 6 / CentOS 6.0 and will do minimal configuration of myExperiment.
+To do further configuration you will need to edit settings file in the config
+directory of the SVN checkout of myExperiment by default this is:
-Some configuration may require restarting Apache using the following command:
+ /var/rails/myexperiment/config/settings.yml
-sudo service httpd restart
+Some configuration may require restarting myExperiment using the following command:
+ sudo service myexperiment restart
+
== Further Information ==
Please refer to the wiki page:
- http://wiki.myexperiment.org/index.php/Developer:FedoraInstallation
+ http://wiki.myexperiment.org/index.php/Developer:FedoraInstallation
Modified: branches/galaxy-integration/installers/fedora/default_settings.bash (2986 => 2987)
--- branches/galaxy-integration/installers/fedora/default_settings.bash 2012-05-11 11:28:05 UTC (rev 2986)
+++ branches/galaxy-integration/installers/fedora/default_settings.bash 2012-05-11 11:52:28 UTC (rev 2987)
@@ -1,20 +1,13 @@
#!/bin/bash
-install_dir="/var/rails/myexperiment" # Where to check the myExperiment SVN
+install_dir="/var/rails/myexperiment" # Where to checkout the myExperiment SVN
branch="trunk"
+ruby_version="1.8.7"
mysql_root_password="changeme"
-mysql_user_name="myexp"
-mysql_user_password="changeme"
-rdoc=1 # Set to 0 for no RDoc Ruby Gem documentation
-ri=1 # Set to 0 for no RI Ruby Gem documentation
-rake_version="0.8.7"
-rails_version="2.3.14"
-passenger_version="2.2.15"
fq_server_name="hostname.domain"
+myexp_cname="myexp.domain"
+myexp_port_no="3000"
sendmail_smarthost_server="smtp"
sendmail_smarthost_domain="domain"
-myexp_cname="myexp.domain" # Where your myexperiment will be hosted can be the same as $fq_server_name
-
-# Build fully-qualified server name for the smarthost (relay) to be used by Sendmail
sendmail_smarthost="${sendmail_smarthost_server}.${sendmail_smarthost_domain}"
# Sendmail patch for relaying email
@@ -53,7 +46,7 @@
# NOTE: No trailing slash.
-base_uri: http://www.example.com
-+base_uri: http://'${myexp_cname}'
++base_uri: http://'${myexp_cname}':'${myexp_port_no}'
# admins - Set "admins" to the list of usernames of people that are
# administrators of this installation. This is "Username" that is set
@@ -82,32 +75,59 @@
# "Queries in View" and "Query Time".
'
-# Apache config for myExperiment
-apache_config="LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-${passenger_version}/ext/apache2/mod_passenger.so
-PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-${passenger_version}
-PassengerRuby /usr/bin/ruby
-PassengerDefaultUser ${USER}
-RailsEnv development
+# init.d script so myExperiment can be easily stopped/started
+initd_script='#!/bin/bash -e
+#
+# myexperiment Starts, stops, and restarts myExperiment
+#
+# chkconfig: - 64 36
+# description: MyExperiment web application
+# processname: myexperiment
-<VirtualHost *:80>
- ServerAdmin address@hidden
- ServerName ${myexp_cname}
- DocumentRoot ${install_dir}/public
- PassengerTempDir ${install_dir}/tmp
- <Directory ${install_dir}/public/>
- AllowOverride all
- Options -MultiViews
- </Directory>
-</VirtualHost>"
+MYEXP_DIR="'${install_dir}'"
+SOLR_LOG_FILE="'${install_dir}'/log/solr.log"
+SOLR_ERR_FILE="'${install_dir}'/log/solr.err"
+MYEXP_LOG_FILE="'${install_dir}'/log/myexperiment.log"
+MYEXP_ERR_FILE="'${install_dir}'/log/myexperiment.err"
+MYEXP_PID_FILE="'${install_dir}'/log/myexperiment.pid"
-# Configure options for (Ruby) gem install
-if [ $rdoc == 0 ]; then
- nordoc="--no-rdoc"
-else
- nordoc=""
-fi
-if [ $ri == 0 ]; then
- nori="--no-ri"
-else
- nori=""
-fi
+case $1 in
+ start)
+ echo "Starting myExperiment..."
+ source /usr/local/rvm/scripts/rvm
+ rvm --default use '${ruby_version}'
+ cd $MYEXP_DIR || { exit 1; }
+ rake solr:start 2>> $SOLR_ERR_FILE 1>> $SOLR_LOG_FILE
+ ruby script/server -p '${myexp_port_no}' 2>> $MYEXP_ERR_FILE 1>> $MYEXP_LOG_FILE &
+ echo $! > $MYEXP_PID_FILE
+ echo "myExperiment started"
+ ;;
+ stop)
+ echo "Stopping myExperiment..."
+ source /usr/local/rvm/scripts/rvm
+ rvm --default use '${ruby_version}'
+ cd $MYEXP_DIR || { exit 1; }
+ rake solr:stop 2>> $SOLR_ERR_FILE 1>> $SOLR_LOG_FILE
+ if [ -s $MYEXP_PID_FILE ]; then
+ kill -9 `cat $MYEXP_PID_FILE`
+ rm $MYEXP_PID_FILE
+ else
+ echo "$MYEXP_PID_FILE does not exist or is empty"
+ if [ -f $MYEXP_PID_FILE ]; then
+ rm $MYEXP_PID_FILE
+ fi
+ exit 2
+ fi
+ echo "myExperiment stopped"
+ ;;
+ restart)
+ $0 stop
+ sleep 3
+ $0 start
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}" >&2
+ exit 1
+ ;;
+esac'
+
Modified: branches/galaxy-integration/installers/fedora/install.bash (2986 => 2987)
--- branches/galaxy-integration/installers/fedora/install.bash 2012-05-11 11:28:05 UTC (rev 2986)
+++ branches/galaxy-integration/installers/fedora/install.bash 2012-05-11 11:52:28 UTC (rev 2987)
@@ -1,7 +1,7 @@
#!/bin/bash
echo ""
echo "+----------------------------------------------------------------------------------------------+"
-echo "| Welcome to the myExperimemt Installer for Fedora 13 / Red Hat 6 / CentOS 6.0! |"
+echo "| Welcome to the myExperimemt Installer for Fedora 13 / RedHat 6 / CentOS 6.0! |"
echo "| Go to http://wiki.myexperiment.org/index.php/Developer:FedoraInstallation for more details. |"
echo "+----------------------------------------------------------------------------------------------+"
echo ""
@@ -10,118 +10,88 @@
basedir=`cd ${d}; pwd`
source ${basedir}/settings.bash || { echo "Could not find settings file at $settings_file. Aborting ..."; exit 1;}
-echo "Extending timeout for sudo commands in /etc/sudoers.d/default_timeout"
-echo "Defaults timestamp_timeout = 3600" | sudo tee -a /etc/sudoers.d/default_timeout > /dev/null || { echo "Failed to disable sudo prompt timeout. Aborting ..."; exit 2; }
-sudo chmod 440 /etc/sudoers.d/default_timeout || { echo "Failed to chmod /etc/sudoers.d/default_timeout. Aborting ..."; exit 70; }
+echo "Creating temporary directory for installation files"
+tempdir=$(mktemp -d /tmp/myexp_installer.XXXXXXXXXX) || { echo "Could not create temporary file for writing patches to. Aborting ..."; exit 2; }
+cd $tempdir || { echo "Could not find temporary directory. Aborting ..."; exit 3; }
+echo "$sendmail_patch" > sendmail.patch || { echo "Could not write sendmail config patch file. Aborting ... "; exit 4; }
+echo "$settings_patch" > settings.patch || { echo "Could not write settings patch file. Aborting ..."; exit 5; }
echo "Installing required Yum packages"
-sudo yum update || { echo "Failed to update apt-get. Aborting ..."; exit 3; }
-sudo -n yum install -y subversion make patch gcc glibc-devel gcc-c++ ruby ruby-devel rdoc irb rubygems httpd httpd-devel mysql mysql-devel mysql-server ruby-mysql java subversion mlocate libxml2-devel libcurl-devel ImageMagick-devel ruby-RMagick graphviz sendmail sendmail-cf policycoreutils-python || { echo "Failed to install required Yum packages. Aborting ..."; exit 4; }
+sudo yum update -y || { echo "Failed to update apt-get. Aborting ..."; exit 6; }
+sudo -n yum install -y subversion make patch gcc glibc-devel gcc-c++ mysql mysql-devel mysql-server java libxml2-devel libxslt-devel autoconf glibc-devel ncurses-devel automake libtool bison openssl openssl-devel curl libcurl libcurl-devel readline readline-devel ImageMagick-devel graphviz sendmail sendmail-cf policycoreutils-python || { echo "Failed to install required Yum packages. Aborting ..."; exit 7; }
-echo "Writing patch files to temporary directory"
-tempdir=$(mktemp -d /tmp/myexp_installer.XXXXXXXXXX) || { echo "Could not create temporary file for writing patches to. Aborting ..."; exit 5; }
-cd $tempdir || { echo "Could not find temporary directory. Aborting ..."; exit 6; }
-echo "$sendmail_patch" > sendmail.patch || { echo "Could not write sendmail config patch file. Aborting ... "; exit 7; }
-echo "$settings_patch" > settings.patch || { echo "Could not write settings patch file. Aborting ..."; exit 8; }
-
echo "Configuring Apache, MySQL and Sendmail"
-sudo chkconfig httpd on || { echo "Failed to Apache to applications started at boottime. Aborting ..."; exit 9; }
-sudo chkconfig mysqld on || { echo "Failed to MySQL to applications started at boottime. Aborting ..."; exit 10; }
-sudo chkconfig sendmail on || { echo "Failed to MySQL to applications started at boottime. Aborting ..."; exit 11; }
-sudo cp /etc/hosts ${tempdir}/ || { echo "Failed to copy hosts file to ${tempdir}. Aborting ..."; exit 12; }
-cat ${tempdir}/hosts | sed "s/localhost /localhost $myexp_cname /g" | sudo tee /etc/hosts >/dev/null || { echo "Failed to add myExperiment CName to /etc/hosts. Aborting ..."; exit 13; }
-sudo service mysqld start || { echo "Failed to to start MySQL. Aborting ..."; exit 14; }
-sudo patch /etc/mail/sendmail.mc $tempdir/sendmail.patch || { echo "Could not patch sendmail.mc. Aborting ..."; exit 15; }
-sudo m4 /etc/mail/sendmail.mc | sudo tee /etc/mail/sendmail.cf >/dev/null || { echo "Could not write sendmail config to sendmail.cf. Aborting ..."; exit 16; }
-sudo setsebool -P httpd_can_sendmail=1 || { echo "Could not write set httpd_can_sendmail=1. Aborting ..."; exit 17; }
-sudo service sendmail start || { echo "Failed to to start Sendmail. Aborting ..."; exit 18; }
+sudo chkconfig mysqld on || { echo "Failed to MySQL to applications started at boottime. Aborting ..."; exit 8; }
+sudo chkconfig sendmail on || { echo "Failed to MySQL to applications started at boottime. Aborting ..."; exit 9; }
+sudo cp /etc/hosts ${tempdir}/ || { echo "Failed to copy hosts file to ${tempdir}. Aborting ..."; exit 10; }
+cat ${tempdir}/hosts | sed "s/localhost /localhost $myexp_cname /g" | sudo tee /etc/hosts >/dev/null || { echo "Failed to add myExperiment CName to /etc/hosts. Aborting ..."; exit 11; }
+sudo service mysqld start || { echo "Failed to to start MySQL. Aborting ..."; exit 12; }
+sudo patch /etc/mail/sendmail.mc $tempdir/sendmail.patch || { echo "Could not patch sendmail.mc. Aborting ..."; exit 13; }
+sudo m4 /etc/mail/sendmail.mc | sudo tee /etc/mail/sendmail.cf >/dev/null || { echo "Could not write sendmail config to sendmail.cf. Aborting ..."; exit 14; }
+sudo setsebool -P httpd_can_sendmail=1 || { echo "Could not write set httpd_can_sendmail=1. Aborting ..."; exit 15; }
+sudo service sendmail start || { echo "Failed to to start Sendmail. Aborting ..."; exit 16; }
-echo "Installing Rake version $rake_version and Rails version $rails_version Ruby Gems"
-sudo gem install $nordoc $nori rake --version $rake_version || { echo "Could not install Rake Ruby Gem (version $rake_version). Aborting ..."; exit 19; }
-sudo gem install $nordoc $nori rails --version $rails_version || { echo "Failed to install Rails Ruby Gem (v$rails_version) and dependencies. Aborting ..."; exit 20; }
+echo "Installing and configuring RVM"
+sudo bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer ) || { echo "Could not install RVM. Aborting ..."; exit 17; }
-echo "Installing Ruby Gems required by myExperiment"
-sudo gem install ${nordoc} ${nori} rubyzip --version 0.9.4 || { echo "Could not install rubyzip (v0.9.4). Aborting ..."; exit 21; }
-sudo gem install ${nordoc} ${nori} libxml-ruby rmagick dsl_accessor ruby-openid openurl ruby-hmac marc || { echo "Could not install all remaining generic Ruby Gems required by myExperiment. Aborting ..."; exit 22; }
-sudo gem install ${nordoc} ${nori} curb --version 0.7.15 || { echo "Could not install rubyzip (v0.7.15).. Aborting ..."; exit 23; }
+echo "Install and configuring Ruby version ${ruby_version}"
+source "/usr/local/rvm/scripts/rvm" || { echo "Could not source /usr/local/rvm/scripts/rvm to add RVM directory to path. Aborting ..."; exit 18; }
+rvmsudo rvm install ${ruby_version} || { echo "Could not install Ruby ${ruby_version} using RVM. Aborting ..."; exit 19; }
+rvm --default use ${ruby_version} || { echo "Could not set Ruby ${ruby_version} as the default environment for RVM. Aborting ..."; exit 20; }
echo "Checking out myExperiment codebase from SVN"
-cd /
-for idir in `echo ${install_dir} | awk 'BEGIN{RS="/"}{print $1}'`; do
- if [ -n ${idir} ]; then
- if [ ! -d ${idir} ]; then
- sudo mkdir ${idir} || { echo "Could not create directory ${idir} in `pwd`. Aborting ..."; exit 24; }
- fi
- cd ${idir}
- fi
-done
-sudo chown $USER:apache $install_dir || { echo "Could not update permissions on $install_dir. Aborting ..."; exit 25; }
-svn checkout svn://rubyforge.org/var/svn/myexperiment/$branch $install_dir || { echo "Could not checkout SVN to $install_dir. Aborting ..."; exit 26; }
-cd ${install_dir}/config/ || { echo "Could not find config directory for myExperiment. Aborting ..."; exit 27; }
+sudo mkdir -p ${install_dir} || { echo "Could not create directory ${install_dir} or one of its parent directories. Aborting ..."; exit 21; }
+sudo chown ${USER}:${USER} ${install_dir} || { echo "Could not update permissions on ${install_dir}. Aborting ..."; exit 22; }
+svn checkout svn://rubyforge.org/var/svn/myexperiment/$branch $install_dir || { echo "Could not checkout SVN to $install_dir. Aborting ..."; exit 24; }
+cd ${install_dir}/config/ || { echo "Could not find config directory for myExperiment. Aborting ..."; exit 25; }
echo "Setting up config files for myExperiment"
-cat database.yml.pre | sed "s/username: root/username: $mysql_user_name/" | sed "s/password:/password: $mysql_user_password/" > database.yml || { echo "Could not create database.yml file with appropriate configuration settings. Aborting ..."; exit 28; }
-cp default_settings.yml settings.yml || { echo "Could not copy default_settings.yml to settings.yml ..."; exit 29; }
-patch settings.yml $tempdir/settings.patch || { echo "Could not patch settings.yml. Aborting ..."; exit 30; }
-cp captcha.yml.pre captcha.yml || { echo "Could not create captcha.yml file. Aborting ..."; exit 31; }
-cd ..
+cat database.yml.pre | sed "s/username: root/username: $mysql_user_name/" | sed "s/password:/password: $mysql_user_password/" > database.yml || { echo "Could not create database.yml file with appropriate configuration settings. Aborting ..."; exit 26; }
+cp default_settings.yml settings.yml || { echo "Could not copy default_settings.yml to settings.yml ..."; exit 27; }
+patch settings.yml $tempdir/settings.patch || { echo "Could not patch settings.yml. Aborting ..."; exit 28; }
-echo "Setting up myExperiment databases in MySQL"
-sudo mysqladmin -u root password $mysql_root_password || { echo "Could not set MySQL root password. Assuming this is already set."; }
-mysql -u root -p$mysql_root_password -e "CREATE USER '$mysql_user_name'@'localhost' IDENTIFIED BY '$mysql_user_password'; CREATE DATABASE m2_development; CREATE DATABASE m2_production; CREATE DATABASE m2_test; GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,INDEX,ALTER,DROP,CREATE TEMPORARY TABLES,CREATE VIEW,SHOW VIEW ON m2_development . * TO '$mysql_user_name'@'localhost';GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,INDEX,ALTER,DROP,CREATE TEMPORARY TABLES,CREATE VIEW,SHOW VIEW ON m2_production . * TO '$mysql_user_name'@'localhost';GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,INDEX,ALTER,DROP,CREATE TEMPORARY TABLES,CREATE VIEW,SHOW VIEW ON m2_test . * TO '$mysql_user_name'@'localhost';" || { echo "Could not create myExperiment databases in MySQL and set up appropriate access for the $mysql_user_name user. Aborting ..."; exit 32; }
+echo "Installing Gems required by myExperiment using bundler"
+cd ${install_dir}
+bundle install || { echo "Could not install the Gems required by myExperiment using bundler. Aborting ..."; exit 30; }
-echo "Migrating myExperiment database"
-rake db:migrate || { echo "Could not migrate myExperiment data model to a MySQL database. Aborting ..."; exit 33; }
+echo "Creating and migrating myExperiment database"
+rake db:create:all || { echo "Could not create MySQL databases for myExperiment. Aborting ..."; exit 31; }
+rake db:migrate || { echo "Could not migrate myExperiment data model to a MySQL database. Aborting ..."; exit 32; }
-echo "Starting Solr (search) server and indexing"
-rake solr:start || { echo "Could not start Solr server. Aborting ..."; exit 34; }
+echo "Creating myExperiment init.d script and deploying so myExperiment automatically starts after machine start up"
+echo "${initd_script}" > ${tempdir}/myexperiment || { echo "Could not create myExperiment init.d script. Aborting ..."; exit 33; }
+sudo mv ${tempdir}/myexperiment /etc/init.d || { echo "Could not move myExperiment init.d script to /etc/init.d. Aborting ..."; exit 34; }
+sudo chown root:root /etc/init.d/myexperiment || { echo "Could not change ownwership of /etc/init.d/myexperiment. Aborting ..."; exit 35; }
+sudo chmod +x /etc/init.d/myexperiment || { echo "Could not modify permissions of /etc/init.d/myexperiment. Aborting ..."; exit 36; }
+sudo chkconfig myexperiment on || { echo "Could not deploy /etc/init.d/myexperiment as a startup script. Aborting ..."; exit 37; }
echo "Adding Firewall rules for mongrel webserver on IPv4 and IPv6"
-sudo chkconfig iptables on || { echo "Failed to iptables to applications started at boottime. Aborting ..."; exit 35; }
-sudo iptables -D INPUT -j REJECT --reject-with icmp-host-prohibited || { echo "Could not delete rule from iptables. Aborting ..."; exit 36; }
-sudo iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT || { echo "Could not add rule from iptables. Aborting ..."; exit 37; }
-sudo iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 25 -j ACCEPT || { echo "Could not add rule from iptables. Aborting ..."; exit 38; }
-sudo iptables -A INPUT -j REJECT --reject-with icmp-host-prohibited || { echo "Could not add rule from iptables. Aborting ..."; exit 39; }
-sudo iptables-save | sudo tee /etc/sysconfig/iptables >/dev/null || { echo "Could not save new iptables rules. Aborting ..."; exit 40; }
-sudo restorecon -v /etc/sysconfig/iptables || { echo "Could not restorecon for /etc/sysconfig/iptables. Aborting ..."; exit 41; }
-sudo service iptables restart || { echo "Could not restart iptables. Aborting ..."; exit 42; }
+sudo chkconfig iptables on || { echo "Failed to iptables to applications started at boottime. Aborting ..."; exit 38; }
+sudo iptables -D INPUT -j REJECT --reject-with icmp-host-prohibited || { echo "Could not delete rule from iptables. Aborting ..."; exit 39; }
+sudo iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport ${myexp_port_no} -j ACCEPT || { echo "Could not add rule from iptables. Aborting ..."; exit 40; }
+sudo iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 25 -j ACCEPT || { echo "Could not add rule from iptables. Aborting ..."; exit 41; }
+sudo iptables -A INPUT -j REJECT --reject-with icmp-host-prohibited || { echo "Could not add rule from iptables. Aborting ..."; exit 42; }
+sudo iptables-save | sudo tee /etc/sysconfig/iptables >/dev/null || { echo "Could not save new iptables rules. Aborting ..."; exit 43; }
+sudo restorecon -v /etc/sysconfig/iptables || { echo "Could not restorecon for /etc/sysconfig/iptables. Aborting ..."; exit 44; }
+sudo service iptables restart || { echo "Could not restart iptables. Aborting ..."; exit 45; }
-sudo chkconfig ip6tables on || { echo "Failed to ip6tables to applications started at boottime. Aborting ..."; exit 43; }
-sudo ip6tables -D INPUT -j REJECT --reject-with icmp6-adm-prohibited || { echo "Could not delete rule from ip6tables. Aborting ..."; exit 44; }
-sudo ip6tables -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT || { echo "Could not add rule from ip6tables. Aborting ..."; exit 45; }
-sudo ip6tables -A INPUT -m state --state NEW -m tcp -p tcp --dport 25 -j ACCEPT || { echo "Could not add rule from ip6tables. Aborting ..."; exit 46; }
-sudo ip6tables -A INPUT -j REJECT --reject-with icmp6-adm-prohibited || { echo "Could not delete rule from ip6tables. Aborting ..."; exit 47; }
-sudo ip6tables-save | sudo tee /etc/sysconfig/ip6tables >/dev/null || { echo "Could not save new ip6tables rules. Aborting ..."; exit 48; }
-sudo restorecon -v /etc/sysconfig/ip6tables || { echo "Could not restorecon for /etc/sysconfig/ip6tables. Aborting ..."; exit 49; }
-sudo service ip6tables restart || { echo "Could not restart ip6tables. Aborting ..."; exit 50; }
+sudo chkconfig ip6tables on || { echo "Failed to ip6tables to applications started at boottime. Aborting ..."; exit 46; }
+sudo ip6tables -D INPUT -j REJECT --reject-with icmp6-adm-prohibited || { echo "Could not delete rule from ip6tables. Aborting ..."; exit 47; }
+sudo ip6tables -A INPUT -m state --state NEW -m tcp -p tcp --dport ${myexp_port_no} -j ACCEPT || { echo "Could not add rule from ip6tables. Aborting ..."; exit 48; }
+sudo ip6tables -A INPUT -m state --state NEW -m tcp -p tcp --dport 25 -j ACCEPT || { echo "Could not add rule from ip6tables. Aborting ..."; exit 49; }
+sudo ip6tables -A INPUT -j REJECT --reject-with icmp6-adm-prohibited || { echo "Could not delete rule from ip6tables. Aborting ..."; exit 50; }
+sudo ip6tables-save | sudo tee /etc/sysconfig/ip6tables >/dev/null || { echo "Could not save new ip6tables rules. Aborting ..."; exit 51; }
+sudo restorecon -v /etc/sysconfig/ip6tables || { echo "Could not restorecon for /etc/sysconfig/ip6tables. Aborting ..."; exit 52; }
+sudo service ip6tables restart || { echo "Could not restart ip6tables. Aborting ..."; exit 53; }
-echo "Installing and configuring Passenger Gem (mod_rails)";
-sudo gem install passenger --version ${passenger_version} || { echo "Could not install Passnger Gem version ${passenger_version}. Aborting ..."; exit 51; }
-sudo su -c "yes | /usr/lib/ruby/gems/1.8/gems/passenger-2.2.15/bin/passenger-install-apache2-module" || { echo "Could not install Apache2 module for Passenger. Aborting ..."; exit 52; }
-echo "${apache_config}" | sudo tee /etc/httpd/conf.d/myexp.conf > /dev/null || { echo "Could not add bespoke myExperiment Apache configuration. Aborting ..."; exit 53; }
-sudo chmod -R 755 ${install_dir}/public || { echo "Failed to chmod ${install_dir}/public and its files/subdirectories. Aborting ..."; exit 54; }
-sudo chmod 755 ${install_dir} || { echo "Failed to chmod ${install_dir}. Aborting ..."; exit 55; }
-sudo chcon -t httpd_sys_script_exec_t -R ${install_dir} || { echo "Failed to chcon (httpd_sys_script_exec_t) ${install_dir} and its files/subdirectories. Aborting ..."; exit 56; }
-sudo chcon -t httpd_sys_content_t -R ${install_dir}/public || { echo "Failed to chcon (httpd_sys_content_t) ${install_dir}/public and its files/subdirectories. Aborting ..."; exit 57; }
-sudo chcon -t httpd_log_t -R ${install_dir}/log || { echo "Failed to chcon (httpd_log_t) ${install_dir}/log and its files. Aborting ..."; exit 58; }
-sudo chcon -t httpd_tmpfs_t -R ${install_dir}/tmp || { echo "Failed to chcon (httpd_tmpfs_t) ${install_dir}/tmp and its files. Aborting ..."; exit 59; }
-sudo setsebool -P httpd_can_network_connect=1 || { echo "Could not write set httpd_can_network_connect=1. Aborting ..."; exit 60; }
-sudo setenforce 0 || { echo "Could not temporarily setenforce = 0. Aborting ..."; exit 61; }
-sudo service httpd start || { echo "Could not start Apache. Aborting ..."; exit 62; }
-sudo grep httpd /var/log/audit/audit.log | audit2allow -M passenger || { echo "Could not create policy package passenger.pp. Aborting ..."; exit 63; }
-sudo semodule -i passenger.pp || { echo "Could not add policy package passenger.pp using semodule. Aborting ..."; exit 64; }
-sudo rm passenger.pp passenger.te || { echo "Could not remove files creates by audit2allow. Aborting ..."; exit 65; }
-sudo setenforce 1 || { echo "Could not temporarily setenforce = 1. Aborting ..."; exit 66; }
-sudo service httpd restart || { echo "Could not restart Apache. Aborting ..."; exit 67; }
+sudo service myexperiment start || { echo "Could not start myExperiment. Aborting ..."; exit 54; }
-echo "Removing extended sudo timeout from /etc/sudoers"
-sudo rm /etc/sudoers.d/default_timeout || { echo "Could not remove extended timeout for sudo. Aborting ..."; exit 68; }
-
echo "Removing temporary directory created for writing patch files to"
-sudo rm -rf ${tempdir} || { echo "Could not remove temporary directory used by patch files."; exit 69; }
+sudo rm -rf ${tempdir} || { echo "Could not remove temporary directory used by patch files."; exit 55; }
echo ""
-echo "+-----------------------------------------------------------------------------------------+"
-echo "| myExperiment is now fully installed. Go to http://$myexp_cname/ to use myExperiment |"
-echo "+-----------------------------------------------------------------------------------------+"
+echo "========================================================================================================"
+echo " myExperiment is now fully installed. Go to http://${myexp_cname}:${myexp_port_no}/ to use myExperiment"
+echo " To start, stop or restart myExperiment use: sudo service myexperiment start|stop|restart"
+echo "========================================================================================================"
Modified: branches/galaxy-integration/installers/ubuntu/README.txt (2986 => 2987)
--- branches/galaxy-integration/installers/ubuntu/README.txt 2012-05-11 11:28:05 UTC (rev 2986)
+++ branches/galaxy-integration/installers/ubuntu/README.txt 2012-05-11 11:52:28 UTC (rev 2987)
@@ -1,54 +1,62 @@
myExperiment Ubuntu Installer Instructions
==========================================
-The files in this directory are an installer for myExperiment on Ubuntu 10.04
-that has had all the latest updates installed (based on updates available on
-18/10/2011). The installer is designed to work on a freshly installed version
-of Ubuntu, you may have problems if you are installing on an existing system.
+The files in this directory are an installer for myExperiment on Ubuntu 10.04.
+The installer is designed to work on a freshly installed version of Ubuntu, you
+may have problems if you are installing on an existing system, which has
+configuration that conflicts with that in the installer.
-install.bash is the main install script and can be downloaded and run as follows:
+install.bash is the main installer script and can be run as follows:
RAILS_ROOT/installers/ubuntu/install.bash
-This install script requires the settings file, settings.bash, which needs to be
-kept in the same directory. This can be created by copying the
-default_settings.bash to settings.bash and making the following changes
-before running install.bash:
+This install script requires the settings file, settings.bash, which needs to
+be kept in the same directory. This can be created by copying the
+default_settings.bash to settings.bash and making the following changes before
+running install.bash:
-myexp_root_password - Choose a password for the root account of MySQL. If for
-whatever reason MySQL is already installed set this to the current MySQL root
-password. MySQL must have a root password for the installer to suceed. See
-http://forums.mysql.com/read.php?10,355736 for how to unset a MySQL password.
+myexp_root_password -
+ Choose a password for the root account of MySQL. If for whatever reason
+ MySQL is already installed set this to the current MySQL root password.
+ MySQL must have a root password for the installer to succeed. See
+ http://forums.mysql.com/read.php?10,355736 if you want to have set no MySQL
+ password after the installer has run.
-fq_server_name - The fully-qualified server name and domain for your server,
-i.e. the A record. E.g. myexperiment.example.org
+fq_server_name -
+ The fully-qualified server name, i.e. the A record.
+ E.g. myexperiment.example.org
-exim_smarthost_server - The mail server you want to user as a relay for emails.
-E.g. smtp
+exim_smarthost_server -
+ The mail server you want to user as a relay for emails.
+ E.g. smtp
-exim_smarthost_domain - The mail server you want to user as a relay for emails.
-E.g. example.org
+exim_smarthost_domain -
+ The domain of the mail server you want to user as a relay for emails.
+ E.g. example.org
-myexp_cname - The location you intend to host the myExperiment site. This may
-be the same as fq_server_name.
-E.g. myexperiment.example.org
+myexp_cname -
+ The location you intend to host the myExperiment site. This may be the
+ same as fq_server_name.
+ E.g. myexperiment.example.org
== Post-installation configuration ==
-The installer is designed to work on a freshly installed version of Ubuntu and
-will do minimal configuration of myExperiment. To do further configuration
-you will need to edit settings.yml in the config directory of the SVN checkout
-of myExperiment by default this /var/rails/myexperiment/config/.
+The installer is designed to work on a freshly installed version of Ubuntu
+10.04 and will do minimal configuration of myExperiment. To do further
+configuration you will need to edit settings file in the config directory of
+the SVN checkout of myExperiment by default this is:
+
+ /var/rails/myexperiment/config/settings.yml
-Some configuration may require restarting myExperiment using the following command:
+Some configuration may require restarting myExperiment using the command:
-sudo service myexperiment restart
+ sudo service myexperiment restart
== Further Information ==
Please refer to the wiki page:
- http://wiki.myexperiment.org/index.php/Developer:UbuntuInstallation
+ http://wiki.myexperiment.org/index.php/Developer:UbuntuInstallation
Modified: branches/galaxy-integration/installers/ubuntu/default_settings.bash (2986 => 2987)
--- branches/galaxy-integration/installers/ubuntu/default_settings.bash 2012-05-11 11:28:05 UTC (rev 2986)
+++ branches/galaxy-integration/installers/ubuntu/default_settings.bash 2012-05-11 11:52:28 UTC (rev 2987)
@@ -5,6 +5,7 @@
mysql_root_password="changeme"
fq_server_name="server.domain"
myexp_cname="myexp.domain" # Where your myExperiment will be hosted can be the same as $fq_server_name
+myexp_port_no="3000"
exim_smarthost_server="smtp"
exim_smarthost_domain="domain"
exim_smarthost="${exim_smarthost_server}.${exim_smarthost_domain}"
@@ -16,7 +17,7 @@
# NOTE: No trailing slash.
-base_uri: http://www.example.com
-+base_uri: http://'${myexp_cname}:3000'
++base_uri: http://'${myexp_cname}':'$myexp_port_no'
# admins - Set "admins" to the list of usernames of people that are
# administrators of this installation. This is "Username" that is set
@@ -61,7 +62,15 @@
initd_script='#!/bin/bash -e
-# Starts, stops, and restarts myExperiment
+### BEGIN INIT INFO
+# Provides: myexperiment
+# Required-Start:
+# Required-Stop:
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Starts, stops, and restarts myExperiment.
+# Description: Starts, stops, and restarts myExperiment.
+### END INIT INFO
MYEXP_DIR="'${install_dir}'"
SOLR_LOG_FILE="'${install_dir}'/log/solr.log"
@@ -75,7 +84,7 @@
echo "Starting myExperiment..."
source /usr/local/rvm/scripts/rvm
rvm --default use '${ruby_version}'
- cd $MYEXP_DIR
+ cd $MYEXP_DIR || { exit 1; }
rake solr:start 2>> $SOLR_ERR_FILE 1>> $SOLR_LOG_FILE
ruby script/server 2>> $MYEXP_ERR_FILE 1>> $MYEXP_LOG_FILE &
echo $! > $MYEXP_PID_FILE
@@ -85,7 +94,7 @@
echo "Stopping myExperiment..."
source /usr/local/rvm/scripts/rvm
rvm --default use '${ruby_version}'
- cd $MYEXP_DIR
+ cd $MYEXP_DIR || { exit 1; }
rake solr:stop 2>> $SOLR_ERR_FILE 1>> $SOLR_LOG_FILE
if [ -s $MYEXP_PID_FILE ]; then
kill -9 `cat $MYEXP_PID_FILE`
Modified: branches/galaxy-integration/installers/ubuntu/install.bash (2986 => 2987)
--- branches/galaxy-integration/installers/ubuntu/install.bash 2012-05-11 11:28:05 UTC (rev 2986)
+++ branches/galaxy-integration/installers/ubuntu/install.bash 2012-05-11 11:52:28 UTC (rev 2987)
@@ -33,16 +33,8 @@
rvm --default use ${ruby_version} || { echo "Could not set Ruby ${ruby_version} as the default environment for RVM. Aborting ..."; exit 11; }
echo "Checking out myExperiment codebase from SVN"
-cd /
-for idir in `echo ${install_dir} | awk 'BEGIN{RS="/"}{print $1}'`; do
- if [ -n ${idir} ]; then
- if [ ! -d ${idir} ]; then
- sudo mkdir ${idir} || { echo "Could not create directory ${idir} in `pwd`. Aborting ..."; exit 12; }
- fi
- cd ${idir}
- fi
-done
-sudo chown ${USER}:www-data ${install_dir} || { echo "Could not update permissions on ${install_dir}. Aborting ..."; exit 13; }
+sudo mkdir -p ${install_dir} || { echo "Could not create directory ${install_dir} or one of its parent directories. Aborting ..."; exit 12; }
+sudo chown ${USER}:${USER} ${install_dir} || { echo "Could not update permissions on ${install_dir}. Aborting ..."; exit 13; }
svn checkout svn://rubyforge.org/var/svn/myexperiment/${branch} ${install_dir} || { echo "Could not checkout SVN to ${install_dir}. Aborting ..."; exit 14; }
cd ${install_dir}/config/ || { echo "Could not find config directory for myExperiment. Aborting ..."; exit 15; }
@@ -81,8 +73,8 @@
rm -r ${tempdir} || { echo "Could not delete temporary directory ${tempdir}. Aborting ..."; exit 35; }
echo ""
-echo "+----------------------------------------------------------------------------------------------+"
-echo "| myExperiment is now fully installed. Go to http://$myexp_cname:3000/ to use myExperiment |"
-echo "| To start, stop or restart myExperiment use: sudo service myexperiment start|stop|restart |"
-echo "+----------------------------------------------------------------------------------------------+"
+echo "========================================================================================================"
+echo " myExperiment is now fully installed. Go to http://${myexp_cname}:${myexp_port_no}/ to use myExperiment"
+echo " To start, stop or restart myExperiment use: sudo service myexperiment start|stop|restart"
+echo "========================================================================================================"
Modified: branches/galaxy-integration/lib/conf.rb (2986 => 2987)
--- branches/galaxy-integration/lib/conf.rb 2012-05-11 11:28:05 UTC (rev 2986)
+++ branches/galaxy-integration/lib/conf.rb 2012-05-11 11:52:28 UTC (rev 2987)
@@ -177,6 +177,10 @@
self.fetch_entry('cookie_verifier_secret')
end
+ def self.duplicable_mime_types
+ self.fetch_entry('duplicable_mime_types')
+ end
+
def self.layouts
layouts = self.fetch_entry('layouts', {})
layouts.delete_if {|k,v| v["environment"] && (v["environment"] != ENV["RAILS_ENV"])}
Modified: branches/galaxy-integration/lib/rest.rb (2986 => 2987)
--- branches/galaxy-integration/lib/rest.rb 2012-05-11 11:28:05 UTC (rev 2986)
+++ branches/galaxy-integration/lib/rest.rb 2012-05-11 11:52:28 UTC (rev 2987)
@@ -234,7 +234,7 @@
end
if list_item_select_elements.nil? || list_item_select_elements.empty?
- el << list_element_item.label if list_element_item.respond_to?(:label)
+ el << rest_object_label_text(list_element_item)
end
list_element << el
@@ -327,6 +327,7 @@
end
def find_entity_name_from_object(ob)
+ ob = ob.versioned_resource if ob.respond_to?(:version)
OBJECT_CLASS_TO_ENTITY_NAME[ob.class.name.underscore]
end
@@ -340,6 +341,8 @@
resource = rest_resource_uri(ob)
version = ob.current_version.to_s if ob.respond_to?('versions')
+ version = ob.version.to_s if ob.respond_to?(:versioned_resource)
+
entity['uri' ] = uri if uri && query["show-uri"] != "no"
entity['resource'] = resource if resource && query["show-resource"] != "no"
entity['version' ] = version if version && query["show-version"] != "no"
@@ -776,6 +779,10 @@
when 'Ontology'; return ob.title
when 'Predicate'; return ob.title
when 'Relationship'; return ''
+ when 'Comment'; return ob.comment
+ when 'Review'; return ob.title
+ when 'Job'; return ob.title
+ when 'TavernaEnactor'; return ob.title
end
return ''
@@ -918,15 +925,16 @@
share_mode = 7
update_mode = 6
- # clear out any permission records for this contributable
+ # process permission elements
- ob.contribution.policy.permissions.each do |p|
- p.destroy
- end
+ if permissions
- # process permission elements
+ # clear out any permission records for this contributable
- if permissions
+ ob.contribution.policy.permissions.each do |p|
+ p.destroy
+ end
+
permissions.find('permission').each do |permission|
# handle public privileges
@@ -948,10 +956,10 @@
end
end
end
+
+ ob.contribution.policy.update_attributes(:share_mode => share_mode,
+ :update_mode => update_mode)
end
-
- ob.contribution.policy.update_attributes(:share_mode => share_mode,
- :update_mode => update_mode)
end
def workflow_aux(action, opts = {})
Copied: branches/galaxy-integration/public/images/biovel.png (from rev 2986, trunk/public/images/biovel.png)
(Binary files differ)
Copied: branches/galaxy-integration/public/stylesheets/biovel.css (from rev 2986, trunk/public/stylesheets/biovel.css) (0 => 2987)
--- branches/galaxy-integration/public/stylesheets/biovel.css (rev 0)
+++ branches/galaxy-integration/public/stylesheets/biovel.css 2012-05-11 11:52:28 UTC (rev 2987)
@@ -0,0 +1,49 @@
+/* Stylesheet for the e-LICO layout. Requires main myExperiment stylesheet. */
+
+body {
+ background: #EEEB99;
+}
+
+#myexp_searchbar, #myexp_sidebar, .pagination a, .tabnav li a:hover, .tabnav li#selected_tabnav a {
+ background-color: #99cc33;
+}
+
+#myexp_searchbar {
+ background-image: url('/images/searchfade_alpha.png');
+}
+#myexp_sidebar {
+ background-image: url('/images/sidebar_alpha.png');
+}
+
+
+.logo a {
+ color: #99cc33;
+}#
+
+.logo a:hover {
+ text-decoration: none;
+ color: #99cc33;
+ }
+
+.links {
+ color: #608509
+}
+
+/* To add a white margin around the content */
+
+#doc2 {
+ padding: 0 1em;
+ border-color: #DFD96D;
+ border-style: solid;
+ border-width: 0 4px;
+}
+
+#myexp_header {
+ margin: 0em 0.5em;
+}
+
+#hd
+{
+ padding-top: 1em;
+}
+