taverna-player 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.travis.yml +6 -0
- data/CHANGES.rdoc +28 -0
- data/CITATION +20 -0
- data/Gemfile +0 -12
- data/README.rdoc +30 -16
- data/Rakefile +1 -0
- data/app/controllers/taverna_player/workflows_controller.rb +18 -0
- data/app/helpers/taverna_player/application_helper.rb +2 -2
- data/app/models/taverna_player/run.rb +35 -3
- data/app/models/taverna_player/workflow.rb +41 -0
- data/app/views/taverna_player/workflows/_info.json.jbuilder +1 -0
- data/{test/dummy/app/views → app/views/taverna_player}/workflows/index.html.erb +1 -1
- data/app/views/taverna_player/workflows/index.json.jbuilder +1 -0
- data/config/routes.rb +9 -0
- data/db/migrate/20140917165505_create_taverna_player_workflows.rb +12 -0
- data/lib/generators/taverna_player/controllers_generator.rb +5 -6
- data/lib/generators/taverna_player/models_generator.rb +3 -3
- data/lib/generators/templates/callbacks/worker_callbacks.rb +5 -5
- data/{test/dummy/app → lib/generators/templates}/controllers/workflows_controller.rb +7 -4
- data/{test/dummy/test/functional/workflows_controller_test.rb → lib/generators/templates/models/workflow.rb} +6 -7
- data/lib/generators/templates/player_initializer.rb +5 -4
- data/lib/taverna-player.rb +11 -1
- data/lib/taverna_player/concerns/controllers/runs_controller.rb +1 -1
- data/lib/taverna_player/concerns/controllers/workflows_controller.rb +41 -0
- data/lib/taverna_player/concerns/models/run.rb +42 -14
- data/lib/taverna_player/concerns/models/run_port.rb +2 -1
- data/lib/taverna_player/concerns/models/workflow.rb +44 -0
- data/lib/taverna_player/model_proxy.rb +14 -8
- data/lib/taverna_player/version.rb +1 -1
- data/taverna_player.gemspec +1 -0
- data/test/dummy/app/views/layouts/application.html.erb +1 -1
- data/test/dummy/config/initializers/taverna_player.rb +1 -4
- data/test/dummy/config/routes.rb +1 -7
- data/test/dummy/db/migrate/20140917165846_drop_workflows.rb +9 -0
- data/test/dummy/db/migrate/20140917170017_create_taverna_player_workflows.taverna_player.rb +13 -0
- data/test/dummy/db/schema.rb +9 -9
- data/test/dummy/lib/callbacks.rb +4 -4
- data/test/fixtures/delayed_jobs.yml +45 -0
- data/test/fixtures/taverna_player/interactions.yml +3 -3
- data/test/fixtures/taverna_player/run_ports.yml +7 -12
- data/test/fixtures/taverna_player/runs.yml +43 -13
- data/test/fixtures/{workflows.yml → taverna_player/workflows.yml} +1 -4
- data/test/fixtures/users.yml +2 -3
- data/test/functional/taverna_player/runs_controller_test.rb +42 -15
- data/test/functional/taverna_player/workflows_controller_test.rb +37 -0
- data/test/unit/helpers/taverna_player/application_helper_test.rb +1 -1
- data/test/unit/taverna_player/interaction_test.rb +2 -2
- data/test/unit/taverna_player/model_proxy_test.rb +58 -0
- data/test/unit/taverna_player/run_test.rb +103 -23
- data/test/unit/taverna_player/worker_test.rb +2 -0
- metadata +39 -12
- data/test/dummy/app/models/workflow.rb +0 -32
@@ -1,32 +0,0 @@
|
|
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
|
-
class Workflow < ActiveRecord::Base
|
14
|
-
attr_accessible :author, :description, :file, :title
|
15
|
-
|
16
|
-
has_many :runs, :class_name => "TavernaPlayer::Run"
|
17
|
-
|
18
|
-
def inputs
|
19
|
-
workflow = File.open(file)
|
20
|
-
model = T2Flow::Parser.new.parse(workflow)
|
21
|
-
|
22
|
-
result = []
|
23
|
-
model.sources.each do |i|
|
24
|
-
description = i.descriptions.nil? ? "" : i.descriptions.join
|
25
|
-
example = i.example_values.nil? ? "" : i.example_values.join
|
26
|
-
result << { :name => i.name, :description => description,
|
27
|
-
:example => example }
|
28
|
-
end
|
29
|
-
|
30
|
-
result
|
31
|
-
end
|
32
|
-
end
|