taverna-player 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +18 -0
- data/Gemfile +18 -0
- data/LICENCE.rdoc +29 -0
- data/README.rdoc +663 -0
- data/Rakefile +65 -0
- data/app/assets/javascripts/taverna_player/application.js +14 -0
- data/app/assets/javascripts/taverna_player/runs.js +42 -0
- data/app/assets/stylesheets/scaffold.css +56 -0
- data/app/assets/stylesheets/taverna_player/application.css +13 -0
- data/app/assets/stylesheets/taverna_player/coderay.css +120 -0
- data/app/controllers/taverna_player/application_controller.rb +16 -0
- data/app/controllers/taverna_player/runs_controller.rb +18 -0
- data/app/controllers/taverna_player/service_credentials_controller.rb +18 -0
- data/app/helpers/taverna_player/application_helper.rb +55 -0
- data/app/helpers/taverna_player/runs_helper.rb +84 -0
- data/app/models/taverna_player/interaction.rb +25 -0
- data/app/models/taverna_player/run.rb +117 -0
- data/app/models/taverna_player/run_port.rb +148 -0
- data/app/models/taverna_player/service_credential.rb +56 -0
- data/app/views/layouts/taverna_player/embedded.html.erb +27 -0
- data/app/views/taverna_player/runs/_button.html.erb +19 -0
- data/app/views/taverna_player/runs/_info.html.erb +56 -0
- data/app/views/taverna_player/runs/_info.json.jbuilder +2 -0
- data/app/views/taverna_player/runs/_inputs.html.erb +34 -0
- data/app/views/taverna_player/runs/_inputs.json.jbuilder +8 -0
- data/app/views/taverna_player/runs/_interaction.html.erb +68 -0
- data/app/views/taverna_player/runs/_outputs.html.erb +41 -0
- data/app/views/taverna_player/runs/_poll.html.erb +27 -0
- data/app/views/taverna_player/runs/create.json.jbuilder +3 -0
- data/app/views/taverna_player/runs/embedded/_button.html.erb +19 -0
- data/app/views/taverna_player/runs/embedded/_info.html.erb +25 -0
- data/app/views/taverna_player/runs/embedded/_inputs.html.erb +32 -0
- data/app/views/taverna_player/runs/embedded/_outputs.html.erb +32 -0
- data/app/views/taverna_player/runs/embedded/new.html.erb +58 -0
- data/app/views/taverna_player/runs/embedded/show.html.erb +39 -0
- data/app/views/taverna_player/runs/embedded/show.js.erb +35 -0
- data/app/views/taverna_player/runs/index.html.erb +40 -0
- data/app/views/taverna_player/runs/index.json.jbuilder +1 -0
- data/app/views/taverna_player/runs/new.html.erb +56 -0
- data/app/views/taverna_player/runs/new.json.jbuilder +1 -0
- data/app/views/taverna_player/runs/show.html.erb +29 -0
- data/app/views/taverna_player/runs/show.js.erb +25 -0
- data/app/views/taverna_player/runs/show.json.jbuilder +25 -0
- data/app/views/taverna_player/service_credentials/_form.html.erb +53 -0
- data/app/views/taverna_player/service_credentials/edit.html.erb +18 -0
- data/app/views/taverna_player/service_credentials/index.html.erb +41 -0
- data/app/views/taverna_player/service_credentials/new.html.erb +17 -0
- data/app/views/taverna_player/service_credentials/show.html.erb +36 -0
- data/config/routes.rb +34 -0
- data/db/migrate/20130313105546_create_taverna_player_runs.rb +16 -0
- data/db/migrate/20130315163019_create_taverna_player_run_ports.rb +15 -0
- data/db/migrate/20130318170744_add_attachment_file_to_taverna_player_run_ports.rb +6 -0
- data/db/migrate/20130319183634_create_delayed_jobs.rb +22 -0
- data/db/migrate/20130320102600_add_status_message_to_taverna_player_runs.rb +5 -0
- data/db/migrate/20130321100110_add_depth_and_metadata_to_taverna_player_run_ports.rb +6 -0
- data/db/migrate/20130704095504_add_attachment_results_to_taverna_player_runs.rb +5 -0
- data/db/migrate/20130705142704_add_embedded_to_taverna_player_runs.rb +5 -0
- data/db/migrate/20130714140911_create_taverna_player_interactions.rb +13 -0
- data/db/migrate/20130717083653_add_proxy_to_taverna_player_runs.rb +6 -0
- data/db/migrate/20130717155415_add_stop_to_taverna_player_runs.rb +5 -0
- data/db/migrate/20130811152840_add_attachment_log_to_taverna_player_runs.rb +5 -0
- data/db/migrate/20130811211725_change_taverna_player_runs_state_column.rb +5 -0
- data/db/migrate/20130812155839_add_name_to_taverna_player_runs.rb +5 -0
- data/db/migrate/20130918135348_create_taverna_player_service_credentials.rb +15 -0
- data/db/migrate/20130919154200_add_displayed_to_taverna_player_interactions.rb +5 -0
- data/db/migrate/20131007153209_add_job_ref_to_taverna_player_runs.rb +13 -0
- data/db/migrate/20131010094537_add_reply_caching_to_taverna_player_interactions.rb +19 -0
- data/db/migrate/20131017141514_add_failure_message_to_taverna_player_run.rb +5 -0
- data/db/migrate/20131018152940_add_serial_number_to_taverna_player_interactions.rb +5 -0
- data/db/migrate/20131018160715_add_parent_run_id_to_taverna_player_runs.rb +5 -0
- data/db/migrate/20131102113933_add_page_uri_to_taverna_player_interaction.rb +5 -0
- data/db/migrate/20131105115218_remove_proxy_from_taverna_player_runs.rb +11 -0
- data/db/migrate/20131105141934_change_taverna_player_interactions_output_value_column_name.rb +5 -0
- data/db/migrate/20131112165520_add_user_to_taverna_player_run.rb +5 -0
- data/lib/generators/taverna_player/callbacks_generator.rb +25 -0
- data/lib/generators/taverna_player/controllers_generator.rb +30 -0
- data/lib/generators/taverna_player/install_generator.rb +30 -0
- data/lib/generators/taverna_player/job_generator.rb +26 -0
- data/lib/generators/taverna_player/models_generator.rb +27 -0
- data/lib/generators/taverna_player/renderers_generator.rb +26 -0
- data/lib/generators/taverna_player/views_generator.rb +27 -0
- data/lib/generators/templates/ReadMe.txt +118 -0
- data/lib/generators/templates/callbacks/render_callbacks.rb +56 -0
- data/lib/generators/templates/callbacks/worker_callbacks.rb +31 -0
- data/lib/generators/templates/controllers/runs_controller.rb +20 -0
- data/lib/generators/templates/controllers/service_credentials_controller.rb +20 -0
- data/lib/generators/templates/initializer.rb +154 -0
- data/lib/generators/templates/models/run.rb +20 -0
- data/lib/tasks/delete-cancelled-runs.rake +26 -0
- data/lib/tasks/delete-old-embedded-runs.rake +26 -0
- data/lib/taverna-player.rb +139 -0
- data/lib/taverna_player/concerns/controllers/runs_controller.rb +281 -0
- data/lib/taverna_player/concerns/controllers/service_credentials_controller.rb +89 -0
- data/lib/taverna_player/concerns/models/run.rb +205 -0
- data/lib/taverna_player/engine.rb +23 -0
- data/lib/taverna_player/model_proxy.rb +51 -0
- data/lib/taverna_player/output_renderer.rb +96 -0
- data/lib/taverna_player/render_callbacks.rb +41 -0
- data/lib/taverna_player/version.rb +15 -0
- data/lib/taverna_player/worker.rb +325 -0
- data/script/delayed_job +5 -0
- data/script/rails +8 -0
- data/taverna_player.gemspec +46 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +16 -0
- data/test/dummy/app/assets/stylesheets/application.css +14 -0
- data/test/dummy/app/controllers/application_controller.rb +15 -0
- data/test/dummy/app/controllers/home_controller.rb +16 -0
- data/test/dummy/app/controllers/taverna_player/runs_controller.rb +25 -0
- data/test/dummy/app/controllers/taverna_player/service_credentials_controller.rb +25 -0
- data/test/dummy/app/controllers/workflows_controller.rb +17 -0
- data/test/dummy/app/models/user.rb +15 -0
- data/test/dummy/app/models/workflow.rb +32 -0
- data/test/dummy/app/views/home/index.html.erb +18 -0
- data/test/dummy/app/views/layouts/application.html.erb +43 -0
- data/test/dummy/app/views/workflows/index.html.erb +35 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +58 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/taverna_player.example.rb +40 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +22 -0
- data/test/dummy/db/migrate/20130314103555_create_workflows.rb +12 -0
- data/test/dummy/db/migrate/20130318141557_create_taverna_player_runs.taverna_player.rb +17 -0
- data/test/dummy/db/migrate/20130318141558_create_taverna_player_run_ports.taverna_player.rb +16 -0
- data/test/dummy/db/migrate/20130318173013_add_attachment_file_to_taverna_player_run_ports.taverna_player.rb +7 -0
- data/test/dummy/db/migrate/20130319183816_create_delayed_jobs.taverna_player.rb +23 -0
- data/test/dummy/db/migrate/20130320102635_add_status_message_to_taverna_player_runs.taverna_player.rb +6 -0
- data/test/dummy/db/migrate/20130321161859_add_depth_and_metadata_to_taverna_player_run_ports.taverna_player.rb +7 -0
- data/test/dummy/db/migrate/20130704100146_add_attachment_results_to_taverna_player_runs.taverna_player.rb +6 -0
- data/test/dummy/db/migrate/20130705142816_add_embedded_to_taverna_player_runs.taverna_player.rb +6 -0
- data/test/dummy/db/migrate/20130714142144_create_taverna_player_interactions.taverna_player.rb +14 -0
- data/test/dummy/db/migrate/20130717084809_add_proxy_to_taverna_player_runs.taverna_player.rb +7 -0
- data/test/dummy/db/migrate/20130718102707_add_stop_to_taverna_player_runs.taverna_player.rb +6 -0
- data/test/dummy/db/migrate/20130811204449_add_attachment_log_to_taverna_player_runs.taverna_player.rb +6 -0
- data/test/dummy/db/migrate/20130811212709_change_taverna_player_runs_state_column.taverna_player.rb +6 -0
- data/test/dummy/db/migrate/20130812161152_add_name_to_taverna_player_runs.taverna_player.rb +6 -0
- data/test/dummy/db/migrate/20130918155525_create_taverna_player_service_credentials.taverna_player.rb +16 -0
- data/test/dummy/db/migrate/20130919155202_add_displayed_to_taverna_player_interactions.taverna_player.rb +6 -0
- data/test/dummy/db/migrate/20131007153659_add_job_ref_to_taverna_player_runs.taverna_player.rb +14 -0
- data/test/dummy/db/migrate/20131016123941_add_reply_caching_to_taverna_player_interactions.taverna_player.rb +20 -0
- data/test/dummy/db/migrate/20131017141614_add_failure_message_to_taverna_player_run.taverna_player.rb +6 -0
- data/test/dummy/db/migrate/20131018153316_add_serial_number_to_taverna_player_interactions.taverna_player.rb +6 -0
- data/test/dummy/db/migrate/20131018164614_add_parent_run_id_to_taverna_player_runs.taverna_player.rb +6 -0
- data/test/dummy/db/migrate/20131102114343_add_page_uri_to_taverna_player_interaction.taverna_player.rb +6 -0
- data/test/dummy/db/migrate/20131105115724_remove_proxy_from_taverna_player_runs.taverna_player.rb +12 -0
- data/test/dummy/db/migrate/20131105142417_change_taverna_player_interactions_output_value_column_name.taverna_player.rb +6 -0
- data/test/dummy/db/migrate/20131112165815_add_user_to_taverna_player_run.taverna_player.rb +6 -0
- data/test/dummy/db/migrate/20131114130937_create_users.rb +10 -0
- data/test/dummy/db/schema.rb +123 -0
- data/test/dummy/lib/callbacks.rb +35 -0
- data/test/dummy/log/.gitkeep +0 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/delayed_job +5 -0
- data/test/dummy/script/rails +6 -0
- data/test/dummy/test/functional/home_controller_test.rb +28 -0
- data/test/dummy/test/functional/workflows_controller_test.rb +21 -0
- data/test/fixtures/files/crassostrea_gigas.csv +737 -0
- data/test/fixtures/taverna_player/interactions.yml +32 -0
- data/test/fixtures/taverna_player/run_ports.yml +54 -0
- data/test/fixtures/taverna_player/runs.yml +69 -0
- data/test/fixtures/taverna_player/service_credentials.yml +25 -0
- data/test/fixtures/users.yml +16 -0
- data/test/fixtures/workflows.yml +32 -0
- data/test/functional/taverna_player/runs_controller_test.rb +316 -0
- data/test/functional/taverna_player/service_credentials_controller_test.rb +99 -0
- data/test/taverna_player_test.rb +25 -0
- data/test/test_helper.rb +33 -0
- data/test/unit/helpers/taverna_player/application_helper_test.rb +70 -0
- data/test/unit/helpers/taverna_player/runs_helper_test.rb +45 -0
- data/test/unit/taverna_player/interaction_test.rb +47 -0
- data/test/unit/taverna_player/run_port_test.rb +309 -0
- data/test/unit/taverna_player/run_test.rb +196 -0
- data/test/unit/taverna_player/service_credential_test.rb +64 -0
- data/test/workflows/hello.t2flow +164 -0
- data/test/workflows/list_with_errors.t2flow +107 -0
- data/test/workflows/pass_through.t2flow +12 -0
- metadata +539 -0
@@ -0,0 +1,37 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# In the development environment your application's code is reloaded on
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the web server when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Log error messages when you accidentally call methods on nil.
|
10
|
+
config.whiny_nils = true
|
11
|
+
|
12
|
+
# Show full error reports and disable caching
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
|
+
|
16
|
+
# Don't care if the mailer can't send
|
17
|
+
config.action_mailer.raise_delivery_errors = false
|
18
|
+
|
19
|
+
# Print deprecation notices to the Rails logger
|
20
|
+
config.active_support.deprecation = :log
|
21
|
+
|
22
|
+
# Only use best-standards-support built into browsers
|
23
|
+
config.action_dispatch.best_standards_support = :builtin
|
24
|
+
|
25
|
+
# Raise exception on mass assignment protection for Active Record models
|
26
|
+
config.active_record.mass_assignment_sanitizer = :strict
|
27
|
+
|
28
|
+
# Log the query plan for queries taking more than this (works
|
29
|
+
# with SQLite, MySQL, and PostgreSQL)
|
30
|
+
config.active_record.auto_explain_threshold_in_seconds = 0.5
|
31
|
+
|
32
|
+
# Do not compress assets
|
33
|
+
config.assets.compress = false
|
34
|
+
|
35
|
+
# Expands the lines which load the assets
|
36
|
+
config.assets.debug = true
|
37
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# Code is not reloaded between requests
|
5
|
+
config.cache_classes = true
|
6
|
+
|
7
|
+
# Full error reports are disabled and caching is turned on
|
8
|
+
config.consider_all_requests_local = false
|
9
|
+
config.action_controller.perform_caching = true
|
10
|
+
|
11
|
+
# Disable Rails's static asset server (Apache or nginx will already do this)
|
12
|
+
config.serve_static_assets = false
|
13
|
+
|
14
|
+
# Compress JavaScripts and CSS
|
15
|
+
config.assets.compress = true
|
16
|
+
|
17
|
+
# Don't fallback to assets pipeline if a precompiled asset is missed
|
18
|
+
config.assets.compile = false
|
19
|
+
|
20
|
+
# Generate digests for assets URLs
|
21
|
+
config.assets.digest = true
|
22
|
+
|
23
|
+
# Defaults to nil and saved in location specified by config.assets.prefix
|
24
|
+
# config.assets.manifest = YOUR_PATH
|
25
|
+
|
26
|
+
# Specifies the header that your server uses for sending files
|
27
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
28
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
29
|
+
|
30
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
31
|
+
# config.force_ssl = true
|
32
|
+
|
33
|
+
# See everything in the log (default is :info)
|
34
|
+
# config.log_level = :debug
|
35
|
+
|
36
|
+
# Prepend all log lines with the following tags
|
37
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
38
|
+
|
39
|
+
# Use a different logger for distributed setups
|
40
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
41
|
+
|
42
|
+
# Use a different cache store in production
|
43
|
+
# config.cache_store = :mem_cache_store
|
44
|
+
|
45
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
46
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
47
|
+
|
48
|
+
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
49
|
+
# config.assets.precompile += %w( search.js )
|
50
|
+
|
51
|
+
# Disable delivery errors, bad email addresses will be ignored
|
52
|
+
# config.action_mailer.raise_delivery_errors = false
|
53
|
+
|
54
|
+
# Enable threaded mode
|
55
|
+
# config.threadsafe!
|
56
|
+
|
57
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
58
|
+
# the I18n.default_locale when a translation can not be found)
|
59
|
+
config.i18n.fallbacks = true
|
60
|
+
|
61
|
+
# Send deprecation notices to registered listeners
|
62
|
+
config.active_support.deprecation = :notify
|
63
|
+
|
64
|
+
# Log the query plan for queries taking more than this (works
|
65
|
+
# with SQLite, MySQL, and PostgreSQL)
|
66
|
+
# config.active_record.auto_explain_threshold_in_seconds = 0.5
|
67
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# The test environment is used exclusively to run your application's
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
|
+
# your test database is "scratch space" for the test suite and is wiped
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
|
+
config.cache_classes = true
|
9
|
+
|
10
|
+
# Configure static asset server for tests with Cache-Control for performance
|
11
|
+
config.serve_static_assets = true
|
12
|
+
config.static_cache_control = "public, max-age=3600"
|
13
|
+
|
14
|
+
# Log error messages when you accidentally call methods on nil
|
15
|
+
config.whiny_nils = true
|
16
|
+
|
17
|
+
# Show full error reports and disable caching
|
18
|
+
config.consider_all_requests_local = true
|
19
|
+
config.action_controller.perform_caching = false
|
20
|
+
|
21
|
+
# Raise exceptions instead of rendering exception templates
|
22
|
+
config.action_dispatch.show_exceptions = false
|
23
|
+
|
24
|
+
# Disable request forgery protection in test environment
|
25
|
+
config.action_controller.allow_forgery_protection = false
|
26
|
+
|
27
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
28
|
+
# The :test delivery method accumulates sent emails in the
|
29
|
+
# ActionMailer::Base.deliveries array.
|
30
|
+
config.action_mailer.delivery_method = :test
|
31
|
+
|
32
|
+
# Raise exception on mass assignment protection for Active Record models
|
33
|
+
config.active_record.mass_assignment_sanitizer = :strict
|
34
|
+
|
35
|
+
# Print deprecation notices to the stderr
|
36
|
+
config.active_support.deprecation = :stderr
|
37
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
4
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
5
|
+
|
6
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
7
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format
|
4
|
+
# (all these examples are active by default):
|
5
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
+
# inflect.singular /^(ox)en/i, '\1'
|
8
|
+
# inflect.irregular 'person', 'people'
|
9
|
+
# inflect.uncountable %w( fish sheep )
|
10
|
+
# end
|
11
|
+
#
|
12
|
+
# These inflection rules are supported but not enabled by default:
|
13
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
14
|
+
# inflect.acronym 'RESTful'
|
15
|
+
# end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
Dummy::Application.config.secret_token = '72d3482fd1fd11dea077d471511ffc0e69c9305e4d981d91cb9688d6eb25b05263d1c46b80b14b4fbf7c7ecf2e6ea20374ef4833e8518554007a259f588e9042'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
Dummy::Application.config.session_store :cookie_store, :key => '_dummy_session'
|
4
|
+
|
5
|
+
# Use the database for sessions instead of the cookie-based default,
|
6
|
+
# which shouldn't be used to store highly confidential information
|
7
|
+
# (create the session table with "rails generate session_migration")
|
8
|
+
# Dummy::Application.config.session_store :active_record_store
|
@@ -0,0 +1,40 @@
|
|
1
|
+
#------------------------------------------------------------------------------
|
2
|
+
# Copyright (c) 2013 The University of Manchester, UK.
|
3
|
+
#
|
4
|
+
# BSD Licenced. See LICENCE.rdoc for details.
|
5
|
+
#
|
6
|
+
# Taverna Player was developed in the BioVeL project, funded by the European
|
7
|
+
# Commission 7th Framework Programme (FP7), through grant agreement
|
8
|
+
# number 283359.
|
9
|
+
#
|
10
|
+
# Author: Robert Haines
|
11
|
+
#------------------------------------------------------------------------------
|
12
|
+
|
13
|
+
# Taverna Player configuration
|
14
|
+
|
15
|
+
TavernaPlayer.setup do |config|
|
16
|
+
# This should be set to the name of the workflow model class in the main
|
17
|
+
# application and the listed methods should also be mapped if necessary.
|
18
|
+
config.workflow_model_proxy("Workflow")
|
19
|
+
|
20
|
+
config.user_model_proxy = "User"
|
21
|
+
config.current_user_callback = :user_one
|
22
|
+
|
23
|
+
# Taverna Server configuration information. The poll interval is in seconds.
|
24
|
+
config.server_address = "https://example.com:8443/tavserv"
|
25
|
+
config.server_username = "taverna"
|
26
|
+
config.server_password = "taverna"
|
27
|
+
config.server_poll_interval = 1
|
28
|
+
config.server_retry_interval = 10
|
29
|
+
|
30
|
+
# Taverna Server connection configuration.
|
31
|
+
config.server_connection[:open_timeout] = 10
|
32
|
+
|
33
|
+
# Callbacks to be run at various points during a workflow run.
|
34
|
+
require "callbacks"
|
35
|
+
|
36
|
+
config.pre_run_callback = :player_pre_run_callback
|
37
|
+
config.post_run_callback = :player_post_run_callback
|
38
|
+
config.run_cancelled_callback = :player_run_cancelled_callback
|
39
|
+
config.run_failed_callback = :player_run_failed_callback
|
40
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
#
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters :format => [:json]
|
9
|
+
end
|
10
|
+
|
11
|
+
# Disable root element in JSON by default.
|
12
|
+
ActiveSupport.on_load(:active_record) do
|
13
|
+
self.include_root_in_json = false
|
14
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
#------------------------------------------------------------------------------
|
2
|
+
# Copyright (c) 2013 The University of Manchester, UK.
|
3
|
+
#
|
4
|
+
# BSD Licenced. See LICENCE.rdoc for details.
|
5
|
+
#
|
6
|
+
# Taverna Player was developed in the BioVeL project, funded by the European
|
7
|
+
# Commission 7th Framework Programme (FP7), through grant agreement
|
8
|
+
# number 283359.
|
9
|
+
#
|
10
|
+
# Author: Robert Haines
|
11
|
+
#------------------------------------------------------------------------------
|
12
|
+
|
13
|
+
Rails.application.routes.draw do
|
14
|
+
|
15
|
+
root :to => "home#index"
|
16
|
+
|
17
|
+
resources :workflows, :only => :index do
|
18
|
+
resources :runs, :controller => "TavernaPlayer::Runs", :except => :edit
|
19
|
+
end
|
20
|
+
|
21
|
+
mount TavernaPlayer::Engine, :at => "/"
|
22
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# This migration comes from taverna_player (originally 20130313105546)
|
2
|
+
class CreateTavernaPlayerRuns < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table :taverna_player_runs do |t|
|
5
|
+
t.string :run_id
|
6
|
+
t.string :state, :default => "pending", :null => false
|
7
|
+
t.datetime :create_time
|
8
|
+
t.datetime :start_time
|
9
|
+
t.datetime :finish_time
|
10
|
+
t.integer :workflow_id, :null => false
|
11
|
+
|
12
|
+
t.timestamps
|
13
|
+
end
|
14
|
+
|
15
|
+
add_index :taverna_player_runs, :run_id
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# This migration comes from taverna_player (originally 20130315163019)
|
2
|
+
class CreateTavernaPlayerRunPorts < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table :taverna_player_run_ports do |t|
|
5
|
+
t.string :name
|
6
|
+
t.string :value
|
7
|
+
t.string :file
|
8
|
+
t.string :port_type
|
9
|
+
t.references :run
|
10
|
+
|
11
|
+
t.timestamps
|
12
|
+
end
|
13
|
+
|
14
|
+
add_index :taverna_player_run_ports, :run_id
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# This migration comes from taverna_player (originally 20130318170744)
|
2
|
+
class AddAttachmentFileToTavernaPlayerRunPorts < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
remove_column :taverna_player_run_ports, :file
|
5
|
+
add_attachment :taverna_player_run_ports, :file
|
6
|
+
end
|
7
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# This migration comes from taverna_player (originally 20130319183634)
|
2
|
+
class CreateDelayedJobs < ActiveRecord::Migration
|
3
|
+
def self.up
|
4
|
+
create_table :delayed_jobs, :force => true do |table|
|
5
|
+
table.integer :priority, :default => 0 # Allows some jobs to jump to the front of the queue
|
6
|
+
table.integer :attempts, :default => 0 # Provides for retries, but still fail eventually.
|
7
|
+
table.text :handler # YAML-encoded string of the object that will do work
|
8
|
+
table.text :last_error # reason for last failure (See Note below)
|
9
|
+
table.datetime :run_at # When to run. Could be Time.zone.now for immediately, or sometime in the future.
|
10
|
+
table.datetime :locked_at # Set when a client is working on this object
|
11
|
+
table.datetime :failed_at # Set when all retries have failed (actually, by default, the record is deleted instead)
|
12
|
+
table.string :locked_by # Who is working on this object (if locked)
|
13
|
+
table.string :queue # The name of the queue this job is in
|
14
|
+
table.timestamps
|
15
|
+
end
|
16
|
+
|
17
|
+
add_index :delayed_jobs, [:priority, :run_at], :name => 'delayed_jobs_priority'
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.down
|
21
|
+
drop_table :delayed_jobs
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# This migration comes from taverna_player (originally 20130321100110)
|
2
|
+
class AddDepthAndMetadataToTavernaPlayerRunPorts < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
add_column :taverna_player_run_ports, :depth, :integer, :default => 0
|
5
|
+
add_column :taverna_player_run_ports, :metadata, :text
|
6
|
+
end
|
7
|
+
end
|
data/test/dummy/db/migrate/20130714142144_create_taverna_player_interactions.taverna_player.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# This migration comes from taverna_player (originally 20130714140911)
|
2
|
+
class CreateTavernaPlayerInteractions < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table :taverna_player_interactions do |t|
|
5
|
+
t.string :uri
|
6
|
+
t.boolean :replied, :default => false
|
7
|
+
t.references :run
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
|
12
|
+
add_index :taverna_player_interactions, :run_id
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# This migration comes from taverna_player (originally 20130717083653)
|
2
|
+
class AddProxyToTavernaPlayerRuns < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
add_column :taverna_player_runs, :proxy_notifications, :string
|
5
|
+
add_column :taverna_player_runs, :proxy_interactions, :string
|
6
|
+
end
|
7
|
+
end
|