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.
Files changed (53) hide show
  1. checksums.yaml +8 -8
  2. data/.travis.yml +6 -0
  3. data/CHANGES.rdoc +28 -0
  4. data/CITATION +20 -0
  5. data/Gemfile +0 -12
  6. data/README.rdoc +30 -16
  7. data/Rakefile +1 -0
  8. data/app/controllers/taverna_player/workflows_controller.rb +18 -0
  9. data/app/helpers/taverna_player/application_helper.rb +2 -2
  10. data/app/models/taverna_player/run.rb +35 -3
  11. data/app/models/taverna_player/workflow.rb +41 -0
  12. data/app/views/taverna_player/workflows/_info.json.jbuilder +1 -0
  13. data/{test/dummy/app/views → app/views/taverna_player}/workflows/index.html.erb +1 -1
  14. data/app/views/taverna_player/workflows/index.json.jbuilder +1 -0
  15. data/config/routes.rb +9 -0
  16. data/db/migrate/20140917165505_create_taverna_player_workflows.rb +12 -0
  17. data/lib/generators/taverna_player/controllers_generator.rb +5 -6
  18. data/lib/generators/taverna_player/models_generator.rb +3 -3
  19. data/lib/generators/templates/callbacks/worker_callbacks.rb +5 -5
  20. data/{test/dummy/app → lib/generators/templates}/controllers/workflows_controller.rb +7 -4
  21. data/{test/dummy/test/functional/workflows_controller_test.rb → lib/generators/templates/models/workflow.rb} +6 -7
  22. data/lib/generators/templates/player_initializer.rb +5 -4
  23. data/lib/taverna-player.rb +11 -1
  24. data/lib/taverna_player/concerns/controllers/runs_controller.rb +1 -1
  25. data/lib/taverna_player/concerns/controllers/workflows_controller.rb +41 -0
  26. data/lib/taverna_player/concerns/models/run.rb +42 -14
  27. data/lib/taverna_player/concerns/models/run_port.rb +2 -1
  28. data/lib/taverna_player/concerns/models/workflow.rb +44 -0
  29. data/lib/taverna_player/model_proxy.rb +14 -8
  30. data/lib/taverna_player/version.rb +1 -1
  31. data/taverna_player.gemspec +1 -0
  32. data/test/dummy/app/views/layouts/application.html.erb +1 -1
  33. data/test/dummy/config/initializers/taverna_player.rb +1 -4
  34. data/test/dummy/config/routes.rb +1 -7
  35. data/test/dummy/db/migrate/20140917165846_drop_workflows.rb +9 -0
  36. data/test/dummy/db/migrate/20140917170017_create_taverna_player_workflows.taverna_player.rb +13 -0
  37. data/test/dummy/db/schema.rb +9 -9
  38. data/test/dummy/lib/callbacks.rb +4 -4
  39. data/test/fixtures/delayed_jobs.yml +45 -0
  40. data/test/fixtures/taverna_player/interactions.yml +3 -3
  41. data/test/fixtures/taverna_player/run_ports.yml +7 -12
  42. data/test/fixtures/taverna_player/runs.yml +43 -13
  43. data/test/fixtures/{workflows.yml → taverna_player/workflows.yml} +1 -4
  44. data/test/fixtures/users.yml +2 -3
  45. data/test/functional/taverna_player/runs_controller_test.rb +42 -15
  46. data/test/functional/taverna_player/workflows_controller_test.rb +37 -0
  47. data/test/unit/helpers/taverna_player/application_helper_test.rb +1 -1
  48. data/test/unit/taverna_player/interaction_test.rb +2 -2
  49. data/test/unit/taverna_player/model_proxy_test.rb +58 -0
  50. data/test/unit/taverna_player/run_test.rb +103 -23
  51. data/test/unit/taverna_player/worker_test.rb +2 -0
  52. metadata +39 -12
  53. 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