Diff
Modified: branches/authorization_new/app/controllers/application.rb (2082 => 2083)
--- branches/authorization_new/app/controllers/application.rb 2009-02-03 18:00:33 UTC (rev 2082)
+++ branches/authorization_new/app/controllers/application.rb 2009-02-04 12:12:49 UTC (rev 2083)
@@ -69,21 +69,11 @@
# the version of it (currently only workflows are versioned)
def allow_statistics_logging(contributable_or_version)
- # ************************************************************************
- # NB! THIS METHOD IS SUSPENDED UNTIL THE STATS ARE RECALCULATED FROM LOGS
- # REMOVE THIS COMMENT AND THE LINE BELOW WHEN EVERYTHING'S DONE;
- #
- # FOR NOW THE NEXT LINE ENSURES THAT OVERALL BEHAVIOUR IS IDENTICAL TO
- # WHAT HAPPENED BEFORE THIS METHOD WAS ADDED
- return true
- # END OF END OF WARNING
- # ************************************************************************
-
# check if the current viewing/download is to be logged
# (i.e. request is sent not by a bot and is legitimate)
allow_logging = true
BOT_IGNORE_LIST.each do |pattern|
- if request.env['HTTP_USER_AGENT'].match(pattern)
+ if request.env['HTTP_USER_AGENT'] and request.env['HTTP_USER_AGENT'].match(pattern)
allow_logging = false
break
end
@@ -296,13 +286,13 @@
end
end
- puts "------ Workflow create summary ------------------------------------"
- puts "current_user = #{current_user.id}"
- puts "updating_class = #{updating_class}"
- puts "sharing_class = #{sharing_class}"
- puts "policy = #{policy}"
- puts "group_sharing = #{params[:group_sharing]}"
- puts "-------------------------------------------------------------------"
+ logger.debug("------ Workflow create summary ------------------------------------")
+ logger.debug("current_user = #{current_user.id}")
+ logger.debug("updating_class = #{updating_class}")
+ logger.debug("sharing_class = #{sharing_class}")
+ logger.debug("policy = #{policy}")
+ logger.debug("group_sharing = #{params[:group_sharing]}")
+ logger.debug("-------------------------------------------------------------------")
# returns some message in case of errors (or empty string in case of success)
return error_msg
Modified: branches/authorization_new/app/controllers/friendships_controller.rb (2082 => 2083)
--- branches/authorization_new/app/controllers/friendships_controller.rb 2009-02-03 18:00:33 UTC (rev 2082)
+++ branches/authorization_new/app/controllers/friendships_controller.rb 2009-02-04 12:12:49 UTC (rev 2083)
@@ -104,8 +104,6 @@
friend = @friendship.friend
Notifier.deliver_friendship_request(friend, @friendship.user.name, @friendship, base_host) if friend.send_notifications?
rescue Exception => e
- puts "ERROR: failed to send Friendship Request email notification. Friendship ID: address@hidden"
- puts "EXCEPTION:" + e
logger.error("ERROR: failed to send Friendship Request email notification. Friendship ID: address@hidden")
logger.error("EXCEPTION:" + e)
end
Modified: branches/authorization_new/app/controllers/jobs_controller.rb (2082 => 2083)
--- branches/authorization_new/app/controllers/jobs_controller.rb 2009-02-03 18:00:33 UTC (rev 2082)
+++ branches/authorization_new/app/controllers/jobs_controller.rb 2009-02-04 12:12:49 UTC (rev 2083)
@@ -247,7 +247,7 @@
def refresh_status
@job.refresh_status!
@stop_timer = (@job.allow_run? or @job.completed?)
- puts "Stop timer? - address@hidden"
+ logger.debug("Stop timer? - address@hidden")
respond_to do |format|
format.html { render :partial => "status_info", :locals => { :job => @job, :experiment => @experiment } }
end
Modified: branches/authorization_new/app/controllers/memberships_controller.rb (2082 => 2083)
--- branches/authorization_new/app/controllers/memberships_controller.rb 2009-02-03 18:00:33 UTC (rev 2082)
+++ branches/authorization_new/app/controllers/memberships_controller.rb 2009-02-04 12:12:49 UTC (rev 2083)
@@ -111,7 +111,6 @@
network = @membership.network
Notifier.deliver_auto_join_group(user, network, base_host) if network.owner.send_notifications?
rescue
- puts "ERROR: failed to send email notification for auto join group. Membership ID: address@hidden"
logger.error("ERROR: failed to send email notification for auto join group. Membership ID: address@hidden")
end
@@ -124,8 +123,6 @@
network = @membership.network
Notifier.deliver_membership_request(user, network, @membership, base_host) if network.owner.send_notifications?
rescue Exception => e
- puts "ERROR: failed to send Membership Request email notification. Membership ID: address@hidden"
- puts "EXCEPTION:" + e
logger.error("ERROR: failed to send Membership Request email notification. Membership ID: address@hidden")
logger.error("EXCEPTION:" + e)
end
Modified: branches/authorization_new/app/controllers/messages_controller.rb (2082 => 2083)
--- branches/authorization_new/app/controllers/messages_controller.rb 2009-02-03 18:00:33 UTC (rev 2082)
+++ branches/authorization_new/app/controllers/messages_controller.rb 2009-02-04 12:12:49 UTC (rev 2083)
@@ -153,8 +153,6 @@
begin
Notifier.deliver_new_message(@message, base_host) if @message.u_to.send_notifications?
rescue Exception => e
- puts "ERROR: failed to send New Message email notification. Message ID: address@hidden"
- puts "EXCEPTION: " + e
logger.error("ERROR: failed to send New Message email notification. Message ID: address@hidden")
logger.error("EXCEPTION: " + e)
end
Modified: branches/authorization_new/app/controllers/networks_controller.rb (2082 => 2083)
--- branches/authorization_new/app/controllers/networks_controller.rb 2009-02-03 18:00:33 UTC (rev 2082)
+++ branches/authorization_new/app/controllers/networks_controller.rb 2009-02-04 12:12:49 UTC (rev 2083)
@@ -71,8 +71,6 @@
user = @membership.user
Notifier.deliver_membership_invite(user, @membership.network, @membership, base_host) if user.send_notifications?
rescue Exception => e
- puts "ERROR: failed to send Membership Invite email notification. Membership ID: address@hidden"
- puts "EXCEPTION:" + e
logger.error("ERROR: failed to send Membership Invite email notification. Membership ID: address@hidden")
logger.error("EXCEPTION:" + e)
end
Modified: branches/authorization_new/app/controllers/users_controller.rb (2082 => 2083)
--- branches/authorization_new/app/controllers/users_controller.rb 2009-02-03 18:00:33 UTC (rev 2082)
+++ branches/authorization_new/app/controllers/users_controller.rb 2009-02-04 12:12:49 UTC (rev 2083)
@@ -268,8 +268,8 @@
if confirmation_hash(user.unconfirmed_email) == params[:hash]
confirmed = user.confirm_email!
# BEGIN DEBUG
- puts "ERRORS!" unless user.errors.empty?
- user.errors.full_messages.each { |e| puts e }
+ logger.error("ERRORS!") unless user.errors.empty?
+ user.errors.full_messages.each { |e| logger.error(e) }
#END DEBUG
if confirmed
self.current_user = user
Modified: branches/authorization_new/app/controllers/workflows_controller.rb (2082 => 2083)
--- branches/authorization_new/app/controllers/workflows_controller.rb 2009-02-03 18:00:33 UTC (rev 2082)
+++ branches/authorization_new/app/controllers/workflows_controller.rb 2009-02-04 12:12:49 UTC (rev 2083)
@@ -228,6 +228,7 @@
# GET /workflows/1
def show
+ logger.debug("DEBUG DEBUG DEBUG")
if allow_statistics_logging(@viewing_version)
@viewing = Viewing.create(:contribution => @workflow.contribution, :user => (logged_in? ? current_user : nil), :user_agent => request.env['HTTP_USER_AGENT'], :accessed_from_site => accessed_from_website?())
end
@@ -480,7 +481,7 @@
:body => params[:workflow][:body],
:last_edited_by => current_user.id)
else
- puts "Preview image provided. Attempting to set the version's preview image."
+ logger.debug("Preview image provided. Attempting to set the version's preview image.")
# Disable updating image on windows due to issues to do with file locking, that prevent file_column from working sometimes.
if RUBY_PLATFORM =~ /mswin32/
@@ -649,9 +650,9 @@
@launch_url = "/workflows/address@hidden/address@hidden"
- puts "@latest_version_number = address@hidden"
- puts "@viewing_version_number = address@hidden"
- puts "@workflow.image != nil = address@hidden != nil}"
+ logger.debug("@latest_version_number = address@hidden")
+ logger.debug("@viewing_version_number = address@hidden")
+ logger.debug("@workflow.image != nil = address@hidden != nil}")
else
error("Workflow not found (id not authorized)", "is invalid (not authorized)")
return false
@@ -804,7 +805,7 @@
if processor_class.nil?
worked = false
- puts "A workflow processor for the file uploaded could not be found!"
+ logger.debug("A workflow processor for the file uploaded could not be found!")
else
# Check that the processor can do inferring of metadata
if processor_class.can_infer_metadata?
@@ -826,13 +827,12 @@
rescue Exception => ex
worked = false
err_msg = "ERROR: some processing failed in workflow processor '#{processor_class.to_s}'.\nEXCEPTION: #{ex}"
- puts err_msg
logger.error err_msg
end
else
# We cannot infer metadata
worked = false
- puts "Workflow processor found but it cannot infer metadata!"
+ logger.debug("Workflow processor found but it cannot infer metadata!")
end
end
Modified: branches/authorization_new/app/models/job.rb (2082 => 2083)
--- branches/authorization_new/app/models/job.rb 2009-02-03 18:00:33 UTC (rev 2082)
+++ branches/authorization_new/app/models/job.rb 2009-02-04 12:12:49 UTC (rev 2083)
@@ -91,8 +91,8 @@
rescue Exception => ex
run_errors << "An exception has occurred whilst submitting and running this job: #{ex}"
- puts ex
- puts ex.backtrace
+ logger.error(ex)
+ logger.error(ex.backtrace)
success = false
end
@@ -130,8 +130,8 @@
self.save
end
rescue Exception => ex
- puts "ERROR occurred whilst refreshing status for job #{self.job_uri}. Exception: #{ex}"
- puts ex.backtrace
+ logger.error("ERROR occurred whilst refreshing status for job #{self.job_uri}. Exception: #{ex}")
+ logger.error(ex.backtrace)
return false
end
end
@@ -168,8 +168,8 @@
return nil
end
rescue Exception => ex
- puts "ERROR occurred whilst fetching report for job #{self.job_uri}. Exception: #{ex}"
- puts ex.backtrace
+ logger.error("ERROR occurred whilst fetching report for job #{self.job_uri}. Exception: #{ex}")
+ logger.error(ex.backtrace)
return nil
end
end
@@ -191,8 +191,8 @@
return nil
end
rescue Exception => ex
- puts "ERROR occurred whilst fetching outputs for job #{self.job_uri}. Exception: #{ex}"
- puts ex.backtrace
+ logger.error("ERROR occurred whilst fetching outputs for job #{self.job_uri}. Exception: #{ex}")
+ logger.error(ex.backtrace)
return nil
end
end
@@ -205,8 +205,8 @@
return 'Error: could not retrieve outputs XML document.'
end
rescue Exception => ex
- puts "ERROR occurred whilst fetching outputs XML for job #{self.job_uri}. Exception: #{ex}"
- puts ex.backtrace
+ logger.error("ERROR occurred whilst fetching outputs XML for job #{self.job_uri}. Exception: #{ex}")
+ logger.error(ex.backtrace)
return nil
end
end
@@ -220,8 +220,8 @@
return nil
end
rescue Exception => ex
- puts "ERROR occurred whilst getting outputs size for job #{self.job_uri}. Exception: #{ex}"
- puts ex.backtrace
+ logger.error("ERROR occurred whilst getting outputs size for job #{self.job_uri}. Exception: #{ex}")
+ logger.error(ex.backtrace)
return nil
end
end
Modified: branches/authorization_new/app/models/pack.rb (2082 => 2083)
--- branches/authorization_new/app/models/pack.rb 2009-02-03 18:00:33 UTC (rev 2082)
+++ branches/authorization_new/app/models/pack.rb 2009-02-04 12:12:49 UTC (rev 2083)
@@ -582,6 +582,10 @@
return CGI::unescapeHTML(desc)
end
+ def contributables
+ contributable_entries.map do |e| e.contributable end
+ end
+
protected
# produces html string containing the required messaged, enclosed within left-padded P tag, belonging to 'none_text' class
Modified: branches/authorization_new/app/models/user.rb (2082 => 2083)
--- branches/authorization_new/app/models/user.rb 2009-02-03 18:00:33 UTC (rev 2082)
+++ branches/authorization_new/app/models/user.rb 2009-02-04 12:12:49 UTC (rev 2083)
@@ -151,9 +151,9 @@
unless self.unconfirmed_email.blank?
# BEGIN DEBUG
- puts "Username: #{self.username}"
- puts "Unconfirmed email: #{self.unconfirmed_email}"
- puts "Confirmed email: #{self.email}"
+ logger.debug("Username: #{self.username}")
+ logger.debug("Unconfirmed email: #{self.unconfirmed_email}")
+ logger.debug("Confirmed email: #{self.email}")
# END DEBUG
# Note: need to bypass the explicitly defined setter for 'email'
@@ -623,20 +623,20 @@
# clean up emails and username before validation
def cleanup_input
# BEGIN DEBUG
- puts 'BEGIN cleanup_input'
+ logger.debug('BEGIN cleanup_input')
# END DEBUG
self.unconfirmed_email = User.clean_string(self.unconfirmed_email) unless self.unconfirmed_email.blank?
self.username = User.clean_string(self.username) unless self.username.blank?
# BEGIN DEBUG
- puts 'END cleanup_input'
+ logger.debug('END cleanup_input')
# END DEBUG
end
def check_email_uniqueness
# BEGIN DEBUG
- puts 'BEGIN check_email_uniqueness'
+ logger.debug('BEGIN check_email_uniqueness')
# END DEBUG
unique = true
@@ -667,7 +667,7 @@
end
# BEGIN DEBUG
- puts 'END check_email_uniqueness'
+ logger.debug('END check_email_uniqueness')
# END DEBUG
return unique
@@ -675,7 +675,7 @@
def check_email_non_openid_conditions
# BEGIN DEBUG
- puts 'BEGIN check_email_non_openid_conditions'
+ logger.debug('BEGIN check_email_non_openid_conditions')
# END DEBUG
ok = true
@@ -689,7 +689,7 @@
end
# BEGIN DEBUG
- puts 'END check_email_non_openid_conditions'
+ logger.debug('END check_email_non_openid_conditions')
# END DEBUG
return ok
@@ -713,8 +713,8 @@
self.profile = "" => self.id)
# BEGIN DEBUG
- #puts "ERRORS!" unless self.profile.errors.empty?
- #self.profile.errors.full_messages.each { |e| puts e }
+ #logger.error("ERRORS!") unless self.profile.errors.empty?
+ #self.profile.errors.full_messages.each { |e| logger.error(e) }
# END DEBUG
end
end
Modified: branches/authorization_new/app/views/gadgets/_asset_manager.rhtml (2082 => 2083)
--- branches/authorization_new/app/views/gadgets/_asset_manager.rhtml 2009-02-03 18:00:33 UTC (rev 2082)
+++ branches/authorization_new/app/views/gadgets/_asset_manager.rhtml 2009-02-04 12:12:49 UTC (rev 2083)
@@ -7,9 +7,9 @@
<p>My Stuff</p>
<p>
<small>
- <%= link_to(pluralize(current_user.friends.length, "friend"), currentusers_things_url('friends')) %>
+ <%= link_to(pluralize(current_user.friends.length, "Friend"), currentusers_things_url('friends')) %>
<span style="color:#999999;"> | </span>
- <%= link_to(pluralize(current_user.networks_owned.length + current_user.networks.length, "group"), currentusers_things_url('groups')) %>
+ <%= link_to(pluralize(current_user.networks_owned.length + current_user.networks.length, "Group"), currentusers_things_url('groups')) %>
<% filter_contributables(current_user.contributions).each do |klass,contributables| %>
<span style="color:#999999;">|</span>
<%= link_to(pluralize(contributables.length, controller_visible_name(klass.humanize.pluralize)), currentusers_things_url(controller_visible_name(klass.humanize.pluralize).downcase)) %>
Modified: branches/authorization_new/config/tables.xml
(Binary files differ)
Modified: branches/authorization_new/lib/explicit_versioning.rb (2082 => 2083)
--- branches/authorization_new/lib/explicit_versioning.rb 2009-02-03 18:00:33 UTC (rev 2082)
+++ branches/authorization_new/lib/explicit_versioning.rb 2009-02-04 12:12:49 UTC (rev 2083)
@@ -231,10 +231,10 @@
self.file_columns.each do |key|
if orig_model.has_attribute?(key)
if eval("orig_model.#{key}.nil?")
- puts "DEBUG: file column is nil"
+ logger.debug("DEBUG: file column is nil")
new_model.send("#{key}=", nil)
else
- puts "DEBUG: file column is not nil"
+ logger.debug("DEBUG: file column is not nil")
new_model.send("#{key}=", File.open(eval("orig_model.#{key}")))
FileUtils.cp(eval("orig_model.#{key}"), eval("new_model.#{key}"))
end
@@ -372,4 +372,4 @@
ActiveRecord::Base.class_eval do
include Jits::Acts::ExplicitVersioning
-end
\ No newline at end of file
+end
Modified: branches/authorization_new/lib/rest.rb (2082 => 2083)
--- branches/authorization_new/lib/rest.rb 2009-02-03 18:00:33 UTC (rev 2082)
+++ branches/authorization_new/lib/rest.rb 2009-02-04 12:12:49 UTC (rev 2083)
@@ -28,7 +28,6 @@
TABLES["REST"][:data]["comment"].delete("DELETE")
TABLES["REST"][:data]["workflow"].delete("PUT")
TABLES["REST"][:data]["job"].delete("POST")
-TABLES["REST"][:data]["pack"].delete("GET")
def rest_routes(map)
TABLES['REST'][:data].keys.each do |uri|
@@ -320,27 +319,30 @@
def rest_resource_uri(ob)
case ob.class.to_s
- when 'Workflow'; return workflow_url(ob)
- when 'Blob'; return file_url(ob)
- when 'Network'; return group_url(ob)
- when 'User'; return user_url(ob)
- when 'Review'; return review_url(ob.reviewable, ob)
- when 'Comment'; return "#{rest_resource_uri(ob.commentable)}/comments/#{ob.id}"
- when 'Blog'; return blog_url(ob)
- when 'BlogPost'; return blog_post_url(ob.blog, ob)
- when 'Rating'; return "#{rest_resource_uri(ob.rateable)}/ratings/#{ob.id}"
- when 'Tag'; return tag_url(ob)
- when 'Picture'; return picture_url(ob.owner, ob)
- when 'Message'; return message_url(ob)
- when 'Citation'; return citation_url(ob.workflow, ob)
- when 'Announcement'; return announcement_url(ob)
- when 'Pack'; return pack_url(ob)
- when 'Experiment'; return experiment_url(ob)
- when 'TavernaEnactor'; return runner_url(ob)
- when 'Job'; return experiment_job_url(ob.experiment, ob)
+ when 'Workflow'; return workflow_url(ob)
+ when 'Blob'; return file_url(ob)
+ when 'Network'; return group_url(ob)
+ when 'User'; return user_url(ob)
+ when 'Review'; return review_url(ob.reviewable, ob)
+ when 'Comment'; return "#{rest_resource_uri(ob.commentable)}/comments/#{ob.id}"
+ when 'Blog'; return blog_url(ob)
+ when 'BlogPost'; return blog_post_url(ob.blog, ob)
+ when 'Rating'; return "#{rest_resource_uri(ob.rateable)}/ratings/#{ob.id}"
+ when 'Tag'; return tag_url(ob)
+ when 'Picture'; return picture_url(ob.owner, ob)
+ when 'Message'; return message_url(ob)
+ when 'Citation'; return citation_url(ob.workflow, ob)
+ when 'Announcement'; return announcement_url(ob)
+ when 'Pack'; return pack_url(ob)
+ when 'Experiment'; return experiment_url(ob)
+ when 'TavernaEnactor'; return runner_url(ob)
+ when 'Job'; return experiment_job_url(ob.experiment, ob)
+ when 'PackRemoteEntry'; return ob.uri
- when 'Workflow::Version'; "#{rest_resource_uri(ob.workflow)}?version=#{ob.version}"
+ when 'Workflow::Version'; return "#{rest_resource_uri(ob.workflow)}?version=#{ob.version}"
end
+
+ raise "Class not processed in rest_resource_uri: #{ob.class.to_s}"
end
def rest_access_uri(ob)
@@ -348,28 +350,31 @@
base = "#{request.protocol}#{request.host_with_port}"
case ob.class.to_s
- when 'Workflow'; return "#{base}/workflow.xml?id=#{ob.id}"
- when 'Blob'; return "#{base}/file.xml?id=#{ob.id}"
- when 'Network'; return "#{base}/group.xml?id=#{ob.id}"
- when 'User'; return "#{base}/user.xml?id=#{ob.id}"
- when 'Review'; return "#{base}/review.xml?id=#{ob.id}"
- when 'Comment'; return "#{base}/comment.xml?id=#{ob.id}"
- when 'Blog'; return "#{base}/blog.xml?id=#{ob.id}"
- when 'BlogPost'; return "#{base}/blog-post.xml?id=#{ob.id}"
- when 'Rating'; return "#{base}/rating.xml?id=#{ob.id}"
- when 'Tag'; return "#{base}/tag.xml?id=#{ob.id}"
- when 'Picture'; return "#{base}/picture.xml?id=#{ob.id}"
- when 'Message'; return "#{base}/message.xml?id=#{ob.id}"
- when 'Citation'; return "#{base}/citation.xml?id=#{ob.id}"
- when 'Announcement'; return "#{base}/announcement.xml?id=#{ob.id}"
- when 'Pack'; return "#{base}/pack.xml?id=#{ob.id}"
- when 'Experiment'; return "#{base}/experiment.xml?id=#{ob.id}"
- when 'TavernaEnactor'; return "#{base}/runner.xml?id=#{ob.id}"
- when 'Job'; return "#{base}/job.xml?id=#{ob.id}"
- when 'Download'; return "#{base}/download.xml?id=#{ob.id}"
+ when 'Workflow'; return "#{base}/workflow.xml?id=#{ob.id}"
+ when 'Blob'; return "#{base}/file.xml?id=#{ob.id}"
+ when 'Network'; return "#{base}/group.xml?id=#{ob.id}"
+ when 'User'; return "#{base}/user.xml?id=#{ob.id}"
+ when 'Review'; return "#{base}/review.xml?id=#{ob.id}"
+ when 'Comment'; return "#{base}/comment.xml?id=#{ob.id}"
+ when 'Blog'; return "#{base}/blog.xml?id=#{ob.id}"
+ when 'BlogPost'; return "#{base}/blog-post.xml?id=#{ob.id}"
+ when 'Rating'; return "#{base}/rating.xml?id=#{ob.id}"
+ when 'Tag'; return "#{base}/tag.xml?id=#{ob.id}"
+ when 'Picture'; return "#{base}/picture.xml?id=#{ob.id}"
+ when 'Message'; return "#{base}/message.xml?id=#{ob.id}"
+ when 'Citation'; return "#{base}/citation.xml?id=#{ob.id}"
+ when 'Announcement'; return "#{base}/announcement.xml?id=#{ob.id}"
+ when 'Pack'; return "#{base}/pack.xml?id=#{ob.id}"
+ when 'Experiment'; return "#{base}/experiment.xml?id=#{ob.id}"
+ when 'TavernaEnactor'; return "#{base}/runner.xml?id=#{ob.id}"
+ when 'Job'; return "#{base}/job.xml?id=#{ob.id}"
+ when 'Download'; return "#{base}/download.xml?id=#{ob.id}"
+ when 'PackRemoteEntry'; return "#{base}/external.xml?id=#{ob.id}"
when 'Workflow::Version'; return "#{base}/workflow.xml?id=#{ob.workflow.id}&version=#{ob.version}"
end
+
+ raise "Class not processed in rest_access_uri: #{ob.class.to_s}"
end
def rest_reference(ob, query)
@@ -378,18 +383,19 @@
text = ''
case ob.class.to_s
- when 'User'; tag = 'user'; text = ob.name
- when 'Workflow'; tag = 'workflow'; text = ob.title
- when 'Blob'; tag = 'file'; text = ob.title
- when 'Network'; tag = 'group'; text = ob.title
- when 'Rating'; tag = 'rating'; text = ob.rating.to_s
- when 'Creditation'; tag = 'creditation'; text = ''
- when 'Citation'; tag = 'citation'; text = ob.title
- when 'Announcement'; tag = 'announcement'; text = ob.title
- when 'Tag'; tag = 'tag'; text = ob.name
- when 'Pack'; tag = 'pack'; text = ob.title
- when 'Experiment'; tag = 'experiment'; text = ob.title
- when 'Download'; tag = 'download'; text = ''
+ when 'User'; tag = 'user'; text = ob.name
+ when 'Workflow'; tag = 'workflow'; text = ob.title
+ when 'Blob'; tag = 'file'; text = ob.title
+ when 'Network'; tag = 'group'; text = ob.title
+ when 'Rating'; tag = 'rating'; text = ob.rating.to_s
+ when 'Creditation'; tag = 'creditation'; text = ''
+ when 'Citation'; tag = 'citation'; text = ob.title
+ when 'Announcement'; tag = 'announcement'; text = ob.title
+ when 'Tag'; tag = 'tag'; text = ob.name
+ when 'Pack'; tag = 'pack'; text = ob.title
+ when 'Experiment'; tag = 'experiment'; text = ob.title
+ when 'Download'; tag = 'download'; text = ''
+ when 'PackRemoteEntry'; tag = 'external'; text = ob.title
when 'Workflow::Version'; tag = 'workflow'; text = ob.title
end
@@ -600,7 +606,7 @@
def user_count(rules, user, query)
- puts "user = #{user}"
+ logger.debug("user = #{user}")
users = User.find(:all).select do |user| user.activated? end
root = XML::Node.new('user-count')
Modified: branches/authorization_new/lib/whip.rb (2082 => 2083)
--- branches/authorization_new/lib/whip.rb 2009-02-03 18:00:33 UTC (rev 2082)
+++ branches/authorization_new/lib/whip.rb 2009-02-04 12:12:49 UTC (rev 2083)
@@ -45,7 +45,7 @@
#
def Whip.bundle(whip_workflow, target_dir)
if !verifyWorkflow(whip_workflow)
- puts "workflow does not contain enough attributes to be processed"
+ logger.debug("workflow does not contain enough attributes to be processed")
return nil
end
entry = createMetadata(whip_workflow)
Modified: branches/authorization_new/lib/workflow_types_handler.rb (2082 => 2083)
--- branches/authorization_new/lib/workflow_types_handler.rb 2009-02-03 18:00:33 UTC (rev 2082)
+++ branches/authorization_new/lib/workflow_types_handler.rb 2009-02-04 12:12:49 UTC (rev 2083)
@@ -160,7 +160,7 @@
end
# Load up the processor classes at startup
-puts "Workflow type processors found: " + WorkflowTypesHandler.processor_classes.to_sentence
+logger.debug("Workflow type processors found: " + WorkflowTypesHandler.processor_classes.to_sentence)
# Refresh the list of workflow types in the system
-WorkflowTypesHandler.refresh_all_known_types!
\ No newline at end of file
+WorkflowTypesHandler.refresh_all_known_types!