taverna-player 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) hide show
  1. data/.gitignore +18 -0
  2. data/Gemfile +18 -0
  3. data/LICENCE.rdoc +29 -0
  4. data/README.rdoc +663 -0
  5. data/Rakefile +65 -0
  6. data/app/assets/javascripts/taverna_player/application.js +14 -0
  7. data/app/assets/javascripts/taverna_player/runs.js +42 -0
  8. data/app/assets/stylesheets/scaffold.css +56 -0
  9. data/app/assets/stylesheets/taverna_player/application.css +13 -0
  10. data/app/assets/stylesheets/taverna_player/coderay.css +120 -0
  11. data/app/controllers/taverna_player/application_controller.rb +16 -0
  12. data/app/controllers/taverna_player/runs_controller.rb +18 -0
  13. data/app/controllers/taverna_player/service_credentials_controller.rb +18 -0
  14. data/app/helpers/taverna_player/application_helper.rb +55 -0
  15. data/app/helpers/taverna_player/runs_helper.rb +84 -0
  16. data/app/models/taverna_player/interaction.rb +25 -0
  17. data/app/models/taverna_player/run.rb +117 -0
  18. data/app/models/taverna_player/run_port.rb +148 -0
  19. data/app/models/taverna_player/service_credential.rb +56 -0
  20. data/app/views/layouts/taverna_player/embedded.html.erb +27 -0
  21. data/app/views/taverna_player/runs/_button.html.erb +19 -0
  22. data/app/views/taverna_player/runs/_info.html.erb +56 -0
  23. data/app/views/taverna_player/runs/_info.json.jbuilder +2 -0
  24. data/app/views/taverna_player/runs/_inputs.html.erb +34 -0
  25. data/app/views/taverna_player/runs/_inputs.json.jbuilder +8 -0
  26. data/app/views/taverna_player/runs/_interaction.html.erb +68 -0
  27. data/app/views/taverna_player/runs/_outputs.html.erb +41 -0
  28. data/app/views/taverna_player/runs/_poll.html.erb +27 -0
  29. data/app/views/taverna_player/runs/create.json.jbuilder +3 -0
  30. data/app/views/taverna_player/runs/embedded/_button.html.erb +19 -0
  31. data/app/views/taverna_player/runs/embedded/_info.html.erb +25 -0
  32. data/app/views/taverna_player/runs/embedded/_inputs.html.erb +32 -0
  33. data/app/views/taverna_player/runs/embedded/_outputs.html.erb +32 -0
  34. data/app/views/taverna_player/runs/embedded/new.html.erb +58 -0
  35. data/app/views/taverna_player/runs/embedded/show.html.erb +39 -0
  36. data/app/views/taverna_player/runs/embedded/show.js.erb +35 -0
  37. data/app/views/taverna_player/runs/index.html.erb +40 -0
  38. data/app/views/taverna_player/runs/index.json.jbuilder +1 -0
  39. data/app/views/taverna_player/runs/new.html.erb +56 -0
  40. data/app/views/taverna_player/runs/new.json.jbuilder +1 -0
  41. data/app/views/taverna_player/runs/show.html.erb +29 -0
  42. data/app/views/taverna_player/runs/show.js.erb +25 -0
  43. data/app/views/taverna_player/runs/show.json.jbuilder +25 -0
  44. data/app/views/taverna_player/service_credentials/_form.html.erb +53 -0
  45. data/app/views/taverna_player/service_credentials/edit.html.erb +18 -0
  46. data/app/views/taverna_player/service_credentials/index.html.erb +41 -0
  47. data/app/views/taverna_player/service_credentials/new.html.erb +17 -0
  48. data/app/views/taverna_player/service_credentials/show.html.erb +36 -0
  49. data/config/routes.rb +34 -0
  50. data/db/migrate/20130313105546_create_taverna_player_runs.rb +16 -0
  51. data/db/migrate/20130315163019_create_taverna_player_run_ports.rb +15 -0
  52. data/db/migrate/20130318170744_add_attachment_file_to_taverna_player_run_ports.rb +6 -0
  53. data/db/migrate/20130319183634_create_delayed_jobs.rb +22 -0
  54. data/db/migrate/20130320102600_add_status_message_to_taverna_player_runs.rb +5 -0
  55. data/db/migrate/20130321100110_add_depth_and_metadata_to_taverna_player_run_ports.rb +6 -0
  56. data/db/migrate/20130704095504_add_attachment_results_to_taverna_player_runs.rb +5 -0
  57. data/db/migrate/20130705142704_add_embedded_to_taverna_player_runs.rb +5 -0
  58. data/db/migrate/20130714140911_create_taverna_player_interactions.rb +13 -0
  59. data/db/migrate/20130717083653_add_proxy_to_taverna_player_runs.rb +6 -0
  60. data/db/migrate/20130717155415_add_stop_to_taverna_player_runs.rb +5 -0
  61. data/db/migrate/20130811152840_add_attachment_log_to_taverna_player_runs.rb +5 -0
  62. data/db/migrate/20130811211725_change_taverna_player_runs_state_column.rb +5 -0
  63. data/db/migrate/20130812155839_add_name_to_taverna_player_runs.rb +5 -0
  64. data/db/migrate/20130918135348_create_taverna_player_service_credentials.rb +15 -0
  65. data/db/migrate/20130919154200_add_displayed_to_taverna_player_interactions.rb +5 -0
  66. data/db/migrate/20131007153209_add_job_ref_to_taverna_player_runs.rb +13 -0
  67. data/db/migrate/20131010094537_add_reply_caching_to_taverna_player_interactions.rb +19 -0
  68. data/db/migrate/20131017141514_add_failure_message_to_taverna_player_run.rb +5 -0
  69. data/db/migrate/20131018152940_add_serial_number_to_taverna_player_interactions.rb +5 -0
  70. data/db/migrate/20131018160715_add_parent_run_id_to_taverna_player_runs.rb +5 -0
  71. data/db/migrate/20131102113933_add_page_uri_to_taverna_player_interaction.rb +5 -0
  72. data/db/migrate/20131105115218_remove_proxy_from_taverna_player_runs.rb +11 -0
  73. data/db/migrate/20131105141934_change_taverna_player_interactions_output_value_column_name.rb +5 -0
  74. data/db/migrate/20131112165520_add_user_to_taverna_player_run.rb +5 -0
  75. data/lib/generators/taverna_player/callbacks_generator.rb +25 -0
  76. data/lib/generators/taverna_player/controllers_generator.rb +30 -0
  77. data/lib/generators/taverna_player/install_generator.rb +30 -0
  78. data/lib/generators/taverna_player/job_generator.rb +26 -0
  79. data/lib/generators/taverna_player/models_generator.rb +27 -0
  80. data/lib/generators/taverna_player/renderers_generator.rb +26 -0
  81. data/lib/generators/taverna_player/views_generator.rb +27 -0
  82. data/lib/generators/templates/ReadMe.txt +118 -0
  83. data/lib/generators/templates/callbacks/render_callbacks.rb +56 -0
  84. data/lib/generators/templates/callbacks/worker_callbacks.rb +31 -0
  85. data/lib/generators/templates/controllers/runs_controller.rb +20 -0
  86. data/lib/generators/templates/controllers/service_credentials_controller.rb +20 -0
  87. data/lib/generators/templates/initializer.rb +154 -0
  88. data/lib/generators/templates/models/run.rb +20 -0
  89. data/lib/tasks/delete-cancelled-runs.rake +26 -0
  90. data/lib/tasks/delete-old-embedded-runs.rake +26 -0
  91. data/lib/taverna-player.rb +139 -0
  92. data/lib/taverna_player/concerns/controllers/runs_controller.rb +281 -0
  93. data/lib/taverna_player/concerns/controllers/service_credentials_controller.rb +89 -0
  94. data/lib/taverna_player/concerns/models/run.rb +205 -0
  95. data/lib/taverna_player/engine.rb +23 -0
  96. data/lib/taverna_player/model_proxy.rb +51 -0
  97. data/lib/taverna_player/output_renderer.rb +96 -0
  98. data/lib/taverna_player/render_callbacks.rb +41 -0
  99. data/lib/taverna_player/version.rb +15 -0
  100. data/lib/taverna_player/worker.rb +325 -0
  101. data/script/delayed_job +5 -0
  102. data/script/rails +8 -0
  103. data/taverna_player.gemspec +46 -0
  104. data/test/dummy/Rakefile +7 -0
  105. data/test/dummy/app/assets/javascripts/application.js +16 -0
  106. data/test/dummy/app/assets/stylesheets/application.css +14 -0
  107. data/test/dummy/app/controllers/application_controller.rb +15 -0
  108. data/test/dummy/app/controllers/home_controller.rb +16 -0
  109. data/test/dummy/app/controllers/taverna_player/runs_controller.rb +25 -0
  110. data/test/dummy/app/controllers/taverna_player/service_credentials_controller.rb +25 -0
  111. data/test/dummy/app/controllers/workflows_controller.rb +17 -0
  112. data/test/dummy/app/models/user.rb +15 -0
  113. data/test/dummy/app/models/workflow.rb +32 -0
  114. data/test/dummy/app/views/home/index.html.erb +18 -0
  115. data/test/dummy/app/views/layouts/application.html.erb +43 -0
  116. data/test/dummy/app/views/workflows/index.html.erb +35 -0
  117. data/test/dummy/config.ru +4 -0
  118. data/test/dummy/config/application.rb +58 -0
  119. data/test/dummy/config/boot.rb +10 -0
  120. data/test/dummy/config/database.yml +25 -0
  121. data/test/dummy/config/environment.rb +5 -0
  122. data/test/dummy/config/environments/development.rb +37 -0
  123. data/test/dummy/config/environments/production.rb +67 -0
  124. data/test/dummy/config/environments/test.rb +37 -0
  125. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  126. data/test/dummy/config/initializers/inflections.rb +15 -0
  127. data/test/dummy/config/initializers/mime_types.rb +5 -0
  128. data/test/dummy/config/initializers/secret_token.rb +7 -0
  129. data/test/dummy/config/initializers/session_store.rb +8 -0
  130. data/test/dummy/config/initializers/taverna_player.example.rb +40 -0
  131. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  132. data/test/dummy/config/locales/en.yml +5 -0
  133. data/test/dummy/config/routes.rb +22 -0
  134. data/test/dummy/db/migrate/20130314103555_create_workflows.rb +12 -0
  135. data/test/dummy/db/migrate/20130318141557_create_taverna_player_runs.taverna_player.rb +17 -0
  136. data/test/dummy/db/migrate/20130318141558_create_taverna_player_run_ports.taverna_player.rb +16 -0
  137. data/test/dummy/db/migrate/20130318173013_add_attachment_file_to_taverna_player_run_ports.taverna_player.rb +7 -0
  138. data/test/dummy/db/migrate/20130319183816_create_delayed_jobs.taverna_player.rb +23 -0
  139. data/test/dummy/db/migrate/20130320102635_add_status_message_to_taverna_player_runs.taverna_player.rb +6 -0
  140. data/test/dummy/db/migrate/20130321161859_add_depth_and_metadata_to_taverna_player_run_ports.taverna_player.rb +7 -0
  141. data/test/dummy/db/migrate/20130704100146_add_attachment_results_to_taverna_player_runs.taverna_player.rb +6 -0
  142. data/test/dummy/db/migrate/20130705142816_add_embedded_to_taverna_player_runs.taverna_player.rb +6 -0
  143. data/test/dummy/db/migrate/20130714142144_create_taverna_player_interactions.taverna_player.rb +14 -0
  144. data/test/dummy/db/migrate/20130717084809_add_proxy_to_taverna_player_runs.taverna_player.rb +7 -0
  145. data/test/dummy/db/migrate/20130718102707_add_stop_to_taverna_player_runs.taverna_player.rb +6 -0
  146. data/test/dummy/db/migrate/20130811204449_add_attachment_log_to_taverna_player_runs.taverna_player.rb +6 -0
  147. data/test/dummy/db/migrate/20130811212709_change_taverna_player_runs_state_column.taverna_player.rb +6 -0
  148. data/test/dummy/db/migrate/20130812161152_add_name_to_taverna_player_runs.taverna_player.rb +6 -0
  149. data/test/dummy/db/migrate/20130918155525_create_taverna_player_service_credentials.taverna_player.rb +16 -0
  150. data/test/dummy/db/migrate/20130919155202_add_displayed_to_taverna_player_interactions.taverna_player.rb +6 -0
  151. data/test/dummy/db/migrate/20131007153659_add_job_ref_to_taverna_player_runs.taverna_player.rb +14 -0
  152. data/test/dummy/db/migrate/20131016123941_add_reply_caching_to_taverna_player_interactions.taverna_player.rb +20 -0
  153. data/test/dummy/db/migrate/20131017141614_add_failure_message_to_taverna_player_run.taverna_player.rb +6 -0
  154. data/test/dummy/db/migrate/20131018153316_add_serial_number_to_taverna_player_interactions.taverna_player.rb +6 -0
  155. data/test/dummy/db/migrate/20131018164614_add_parent_run_id_to_taverna_player_runs.taverna_player.rb +6 -0
  156. data/test/dummy/db/migrate/20131102114343_add_page_uri_to_taverna_player_interaction.taverna_player.rb +6 -0
  157. data/test/dummy/db/migrate/20131105115724_remove_proxy_from_taverna_player_runs.taverna_player.rb +12 -0
  158. data/test/dummy/db/migrate/20131105142417_change_taverna_player_interactions_output_value_column_name.taverna_player.rb +6 -0
  159. data/test/dummy/db/migrate/20131112165815_add_user_to_taverna_player_run.taverna_player.rb +6 -0
  160. data/test/dummy/db/migrate/20131114130937_create_users.rb +10 -0
  161. data/test/dummy/db/schema.rb +123 -0
  162. data/test/dummy/lib/callbacks.rb +35 -0
  163. data/test/dummy/log/.gitkeep +0 -0
  164. data/test/dummy/public/404.html +26 -0
  165. data/test/dummy/public/422.html +26 -0
  166. data/test/dummy/public/500.html +25 -0
  167. data/test/dummy/public/favicon.ico +0 -0
  168. data/test/dummy/script/delayed_job +5 -0
  169. data/test/dummy/script/rails +6 -0
  170. data/test/dummy/test/functional/home_controller_test.rb +28 -0
  171. data/test/dummy/test/functional/workflows_controller_test.rb +21 -0
  172. data/test/fixtures/files/crassostrea_gigas.csv +737 -0
  173. data/test/fixtures/taverna_player/interactions.yml +32 -0
  174. data/test/fixtures/taverna_player/run_ports.yml +54 -0
  175. data/test/fixtures/taverna_player/runs.yml +69 -0
  176. data/test/fixtures/taverna_player/service_credentials.yml +25 -0
  177. data/test/fixtures/users.yml +16 -0
  178. data/test/fixtures/workflows.yml +32 -0
  179. data/test/functional/taverna_player/runs_controller_test.rb +316 -0
  180. data/test/functional/taverna_player/service_credentials_controller_test.rb +99 -0
  181. data/test/taverna_player_test.rb +25 -0
  182. data/test/test_helper.rb +33 -0
  183. data/test/unit/helpers/taverna_player/application_helper_test.rb +70 -0
  184. data/test/unit/helpers/taverna_player/runs_helper_test.rb +45 -0
  185. data/test/unit/taverna_player/interaction_test.rb +47 -0
  186. data/test/unit/taverna_player/run_port_test.rb +309 -0
  187. data/test/unit/taverna_player/run_test.rb +196 -0
  188. data/test/unit/taverna_player/service_credential_test.rb +64 -0
  189. data/test/workflows/hello.t2flow +164 -0
  190. data/test/workflows/list_with_errors.t2flow +107 -0
  191. data/test/workflows/pass_through.t2flow +12 -0
  192. metadata +539 -0
@@ -0,0 +1,6 @@
1
+ # This migration comes from taverna_player (originally 20130811211725)
2
+ class ChangeTavernaPlayerRunsStateColumn < ActiveRecord::Migration
3
+ def change
4
+ rename_column :taverna_player_runs, :state, :saved_state
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ # This migration comes from taverna_player (originally 20130812155839)
2
+ class AddNameToTavernaPlayerRuns < ActiveRecord::Migration
3
+ def change
4
+ add_column :taverna_player_runs, :name, :string, :default => "None"
5
+ end
6
+ end
@@ -0,0 +1,16 @@
1
+ # This migration comes from taverna_player (originally 20130918135348)
2
+ class CreateTavernaPlayerServiceCredentials < ActiveRecord::Migration
3
+ def change
4
+ create_table :taverna_player_service_credentials do |t|
5
+ t.string :uri, :null => false
6
+ t.string :name
7
+ t.text :description
8
+ t.string :login
9
+ t.string :password
10
+
11
+ t.timestamps
12
+ end
13
+
14
+ add_index :taverna_player_service_credentials, :uri
15
+ end
16
+ end
@@ -0,0 +1,6 @@
1
+ # This migration comes from taverna_player (originally 20130919154200)
2
+ class AddDisplayedToTavernaPlayerInteractions < ActiveRecord::Migration
3
+ def change
4
+ add_column :taverna_player_interactions, :displayed, :boolean, :default => false
5
+ end
6
+ end
@@ -0,0 +1,14 @@
1
+ # This migration comes from taverna_player (originally 20131007153209)
2
+ class AddJobRefToTavernaPlayerRuns < ActiveRecord::Migration
3
+ def up
4
+ change_table :taverna_player_runs do |t|
5
+ t.references :delayed_job
6
+ end
7
+ end
8
+
9
+ def down
10
+ change_table :taverna_player_runs do |t|
11
+ t.remove :delayed_job_id
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,20 @@
1
+ # This migration comes from taverna_player (originally 20131010094537)
2
+ class AddReplyCachingToTavernaPlayerInteractions < ActiveRecord::Migration
3
+ def up
4
+ remove_column :taverna_player_interactions, :uri
5
+ add_column :taverna_player_interactions, :unique_id, :string
6
+ add_column :taverna_player_interactions, :page, :text
7
+ add_column :taverna_player_interactions, :feed_reply, :string
8
+ add_column :taverna_player_interactions, :output_value, :text, :limit => 16777215
9
+ add_index :taverna_player_interactions, :unique_id
10
+ end
11
+
12
+ def down
13
+ remove_index :taverna_player_interactions, :unique_id
14
+ remove_column :taverna_player_interactions, :output_value
15
+ remove_column :taverna_player_interactions, :feed_reply
16
+ remove_column :taverna_player_interactions, :page
17
+ remove_column :taverna_player_interactions, :unique_id
18
+ add_column :taverna_player_interactions, :uri, :string
19
+ end
20
+ end
@@ -0,0 +1,6 @@
1
+ # This migration comes from taverna_player (originally 20131017141514)
2
+ class AddFailureMessageToTavernaPlayerRun < ActiveRecord::Migration
3
+ def change
4
+ add_column :taverna_player_runs, :failure_message, :text
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ # This migration comes from taverna_player (originally 20131018152940)
2
+ class AddSerialNumberToTavernaPlayerInteractions < ActiveRecord::Migration
3
+ def change
4
+ add_column :taverna_player_interactions, :serial, :string
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ # This migration comes from taverna_player (originally 20131018160715)
2
+ class AddParentRunIdToTavernaPlayerRuns < ActiveRecord::Migration
3
+ def change
4
+ add_column :taverna_player_runs, :parent_id, :integer
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ # This migration comes from taverna_player (originally 20131102113933)
2
+ class AddPageUriToTavernaPlayerInteraction < ActiveRecord::Migration
3
+ def change
4
+ add_column :taverna_player_interactions, :page_uri, :string
5
+ end
6
+ end
@@ -0,0 +1,12 @@
1
+ # This migration comes from taverna_player (originally 20131105115218)
2
+ class RemoveProxyFromTavernaPlayerRuns < ActiveRecord::Migration
3
+ def up
4
+ remove_column :taverna_player_runs, :proxy_notifications
5
+ remove_column :taverna_player_runs, :proxy_interactions
6
+ end
7
+
8
+ def down
9
+ add_column :taverna_player_runs, :proxy_interactions, :string
10
+ add_column :taverna_player_runs, :proxy_notifications, :string
11
+ end
12
+ end
@@ -0,0 +1,6 @@
1
+ # This migration comes from taverna_player (originally 20131105141934)
2
+ class ChangeTavernaPlayerInteractionsOutputValueColumnName < ActiveRecord::Migration
3
+ def change
4
+ rename_column :taverna_player_interactions, :output_value, :data
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ # This migration comes from taverna_player (originally 20131112165520)
2
+ class AddUserToTavernaPlayerRun < ActiveRecord::Migration
3
+ def change
4
+ add_column :taverna_player_runs, :user_id, :integer
5
+ end
6
+ end
@@ -0,0 +1,10 @@
1
+ class CreateUsers < ActiveRecord::Migration
2
+ def change
3
+ create_table :users do |t|
4
+ t.string :name
5
+ t.string :email
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,123 @@
1
+ # encoding: UTF-8
2
+ # This file is auto-generated from the current state of the database. Instead
3
+ # of editing this file, please use the migrations feature of Active Record to
4
+ # incrementally modify your database, and then regenerate this schema definition.
5
+ #
6
+ # Note that this schema.rb definition is the authoritative source for your
7
+ # database schema. If you need to create the application database on another
8
+ # system, you should be using db:schema:load, not running all the migrations
9
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
11
+ #
12
+ # It's strongly recommended to check this file into your version control system.
13
+
14
+ ActiveRecord::Schema.define(:version => 20131114130937) do
15
+
16
+ create_table "delayed_jobs", :force => true do |t|
17
+ t.integer "priority", :default => 0
18
+ t.integer "attempts", :default => 0
19
+ t.text "handler"
20
+ t.text "last_error"
21
+ t.datetime "run_at"
22
+ t.datetime "locked_at"
23
+ t.datetime "failed_at"
24
+ t.string "locked_by"
25
+ t.string "queue"
26
+ t.datetime "created_at", :null => false
27
+ t.datetime "updated_at", :null => false
28
+ end
29
+
30
+ add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
31
+
32
+ create_table "taverna_player_interactions", :force => true do |t|
33
+ t.boolean "replied", :default => false
34
+ t.integer "run_id"
35
+ t.datetime "created_at", :null => false
36
+ t.datetime "updated_at", :null => false
37
+ t.boolean "displayed", :default => false
38
+ t.string "unique_id"
39
+ t.text "page"
40
+ t.string "feed_reply"
41
+ t.text "data", :limit => 16777215
42
+ t.string "serial"
43
+ t.string "page_uri"
44
+ end
45
+
46
+ add_index "taverna_player_interactions", ["run_id"], :name => "index_taverna_player_interactions_on_run_id"
47
+ add_index "taverna_player_interactions", ["unique_id"], :name => "index_taverna_player_interactions_on_unique_id"
48
+
49
+ create_table "taverna_player_run_ports", :force => true do |t|
50
+ t.string "name"
51
+ t.string "value"
52
+ t.string "port_type"
53
+ t.integer "run_id"
54
+ t.datetime "created_at", :null => false
55
+ t.datetime "updated_at", :null => false
56
+ t.string "file_file_name"
57
+ t.string "file_content_type"
58
+ t.integer "file_file_size"
59
+ t.datetime "file_updated_at"
60
+ t.integer "depth", :default => 0
61
+ t.text "metadata"
62
+ end
63
+
64
+ add_index "taverna_player_run_ports", ["run_id"], :name => "index_taverna_player_run_ports_on_run_id"
65
+
66
+ create_table "taverna_player_runs", :force => true do |t|
67
+ t.string "run_id"
68
+ t.string "saved_state", :default => "pending", :null => false
69
+ t.datetime "create_time"
70
+ t.datetime "start_time"
71
+ t.datetime "finish_time"
72
+ t.integer "workflow_id", :null => false
73
+ t.datetime "created_at", :null => false
74
+ t.datetime "updated_at", :null => false
75
+ t.string "status_message"
76
+ t.string "results_file_name"
77
+ t.string "results_content_type"
78
+ t.integer "results_file_size"
79
+ t.datetime "results_updated_at"
80
+ t.boolean "embedded", :default => false
81
+ t.boolean "stop", :default => false
82
+ t.string "log_file_name"
83
+ t.string "log_content_type"
84
+ t.integer "log_file_size"
85
+ t.datetime "log_updated_at"
86
+ t.string "name", :default => "None"
87
+ t.integer "delayed_job_id"
88
+ t.text "failure_message"
89
+ t.integer "parent_id"
90
+ t.integer "user_id"
91
+ end
92
+
93
+ add_index "taverna_player_runs", ["run_id"], :name => "index_taverna_player_runs_on_run_id"
94
+
95
+ create_table "taverna_player_service_credentials", :force => true do |t|
96
+ t.string "uri", :null => false
97
+ t.string "name"
98
+ t.text "description"
99
+ t.string "login"
100
+ t.string "password"
101
+ t.datetime "created_at", :null => false
102
+ t.datetime "updated_at", :null => false
103
+ end
104
+
105
+ add_index "taverna_player_service_credentials", ["uri"], :name => "index_taverna_player_service_credentials_on_uri"
106
+
107
+ create_table "users", :force => true do |t|
108
+ t.string "name"
109
+ t.string "email"
110
+ t.datetime "created_at", :null => false
111
+ t.datetime "updated_at", :null => false
112
+ end
113
+
114
+ create_table "workflows", :force => true do |t|
115
+ t.string "title"
116
+ t.string "author"
117
+ t.text "description"
118
+ t.string "file"
119
+ t.datetime "created_at", :null => false
120
+ t.datetime "updated_at", :null => false
121
+ end
122
+
123
+ end
@@ -0,0 +1,35 @@
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
+ def player_pre_run_callback(run)
14
+ w = Workflow.find(run.workflow_id)
15
+ puts "Pre-run callback called for run '#{run.name}' of workflow '#{w.id}'"
16
+ end
17
+
18
+ def player_post_run_callback(run)
19
+ w = Workflow.find(run.workflow_id)
20
+ puts "Post-run callback called for run '#{run.name}' of workflow '#{w.id}'"
21
+ end
22
+
23
+ def player_run_cancelled_callback(run)
24
+ w = Workflow.find(run.workflow_id)
25
+ puts "Run-cancelled callback called for run '#{run.name}' of workflow '#{w.id}'"
26
+ end
27
+
28
+ def player_run_failed_callback(run)
29
+ w = Workflow.find(run.workflow_id)
30
+ puts "Run-failed callback called for run '#{run.name}' of workflow '#{w.id}'"
31
+ end
32
+
33
+ def user_one
34
+ User.find(1)
35
+ end
File without changes
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ </body>
25
+ </html>
File without changes
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'config', 'environment'))
4
+ require 'delayed/command'
5
+ Delayed::Command.new(ARGV).daemonize
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,28 @@
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
+ require 'test_helper'
14
+
15
+ class HomeControllerTest < ActionController::TestCase
16
+ test "should get index" do
17
+ get :index
18
+ assert_response :success
19
+
20
+ # Check the home page iframe URI is not escaped. Can only test this here
21
+ # because the helpers are not escaped unless called from within a view.
22
+ assert_select "iframe" do
23
+ assert_select "[src=?]", /^(?!.*&amp;).*$/, "",
24
+ "iframe URI contains &amp;"
25
+ end
26
+ end
27
+
28
+ end
@@ -0,0 +1,21 @@
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
+ require 'test_helper'
14
+
15
+ class WorkflowsControllerTest < ActionController::TestCase
16
+ test "should get index" do
17
+ get :index
18
+ assert_response :success
19
+ end
20
+
21
+ end