taverna-player 0.7.0 → 0.8.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 +1 -1
- data/CHANGES.rdoc +7 -0
- data/README.rdoc +14 -0
- data/lib/taverna-player.rb +1 -1
- data/lib/taverna_player/concerns/zip.rb +1 -1
- data/lib/taverna_player/version.rb +1 -1
- data/lib/taverna_player/worker.rb +3 -2
- data/taverna_player.gemspec +1 -1
- data/test/unit/taverna_player/worker_test.rb +66 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTMxN2RmZDhiNDFhMmU2YjNhMDE5ZjA1OGY2N2IwZmM4MDkwMzZmZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZGI5MGZmN2VhOGYyZWYxZTkzY2Q0YjIyNzM5ODhlMTRlMWNiYzFjMQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YmFjZDI2NmYwNGZhNGU2ZWVkMWFkODU2MjUxZTMzYThiZTRiODU2YjMwNjJh
|
10
|
+
NzIyYzZhODdlMDVkNGEzNTVmODQwN2IyMjMwNWU5YTEyZDc5ZWJiZWE3Mzcz
|
11
|
+
MDU4MjVkY2ZlN2I0Mjk0NWEwNTg1YzIxMzBkNmU3OTI3NDQ1OTY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
M2U2OWQ1MGRlNzI4ZTIzYTQyMjA1NjBmZWVhN2E5M2I4NzUzNjQ4MjJhYWFh
|
14
|
+
MDg2Yjk1YzBjMTZhYTA4M2ZlNWUzODExZjlmMjVhMzVjZTlkZDFkNTk4NTVm
|
15
|
+
NDlhN2JlNzJjNzFjMjI0MWQ5ZDYxYjVhOTE4ODhjNzllM2ZlOWQ=
|
data/.travis.yml
CHANGED
data/CHANGES.rdoc
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
= Changes log for Taverna Player
|
2
2
|
|
3
|
+
== Version 0.8.0
|
4
|
+
|
5
|
+
* Add a note about Taverna Server compatibility to the ReadMe.
|
6
|
+
* [SERVINF-457] Clear "waiting for user input" message.
|
7
|
+
* Remove odd save! in worker code.
|
8
|
+
* Move to use the rubyzip 1.0 API.
|
9
|
+
|
3
10
|
== Version 0.7.0
|
4
11
|
|
5
12
|
* Refactor full run JSON output.
|
data/README.rdoc
CHANGED
@@ -26,6 +26,20 @@ It, purposefully, does not:
|
|
26
26
|
* Manage workflows
|
27
27
|
* Manage users
|
28
28
|
|
29
|
+
== Prerequisites
|
30
|
+
|
31
|
+
Taverna Player requires access to a
|
32
|
+
{Taverna Server}[http://www.taverna.org.uk/download/server/2-5/] version 2.5
|
33
|
+
or later.
|
34
|
+
|
35
|
+
== A note about rubyzip
|
36
|
+
|
37
|
+
This library uses the new {rubyzip}[https://rubygems.org/gems/rubyzip] API. If
|
38
|
+
your code, or any of its dependencies, need the old API then please read the
|
39
|
+
<em>Important note</em> in the
|
40
|
+
{rubyzip ReadMe}[https://github.com/rubyzip/rubyzip/blob/master/README.md] for
|
41
|
+
details of how to get everything working together.
|
42
|
+
|
29
43
|
== Getting started
|
30
44
|
|
31
45
|
These instructions assume that you are familiar with Rails and its concepts.
|
data/lib/taverna-player.rb
CHANGED
@@ -135,7 +135,6 @@ module TavernaPlayer
|
|
135
135
|
new_int.save
|
136
136
|
end
|
137
137
|
else
|
138
|
-
waiting = true unless note.has_reply?
|
139
138
|
int = Interaction.find_or_initialize_by_run_id_and_serial(@run.id, note.serial)
|
140
139
|
|
141
140
|
# Need to catch this here in case some other process has replied.
|
@@ -177,6 +176,8 @@ module TavernaPlayer
|
|
177
176
|
|
178
177
|
int.save
|
179
178
|
end
|
179
|
+
|
180
|
+
waiting = true unless int.replied?
|
180
181
|
end
|
181
182
|
end
|
182
183
|
|
@@ -306,7 +307,7 @@ module TavernaPlayer
|
|
306
307
|
|
307
308
|
def status_message(key)
|
308
309
|
@run.status_message_key = key
|
309
|
-
@run.save
|
310
|
+
@run.save
|
310
311
|
end
|
311
312
|
|
312
313
|
def cancelled?
|
data/taverna_player.gemspec
CHANGED
@@ -39,7 +39,7 @@ Gem::Specification.new do |s|
|
|
39
39
|
s.add_dependency "t2-server", "~> 1.1"
|
40
40
|
s.add_dependency "delayed_job_active_record", "~> 4.0"
|
41
41
|
s.add_dependency "daemons", "~> 1.1.9"
|
42
|
-
s.add_dependency "rubyzip", "~>
|
42
|
+
s.add_dependency "rubyzip", "~> 1.1.4"
|
43
43
|
s.add_dependency "coderay", "~> 1.1"
|
44
44
|
s.add_dependency "rails_autolink", "~> 1.1.0"
|
45
45
|
s.add_dependency "require_all", "~> 1.3.1"
|
@@ -158,7 +158,7 @@ class WorkerTest < ActiveSupport::TestCase
|
|
158
158
|
assert_not_nil @run.failure_message, "Run's failure message is nil"
|
159
159
|
end
|
160
160
|
|
161
|
-
test "cancelled run" do
|
161
|
+
test "immediately cancelled run" do
|
162
162
|
# Stub the creation of a run on a Taverna Server with a failure.
|
163
163
|
flexmock(T2Server::Server).new_instances do |s|
|
164
164
|
s.should_receive(:initialize_run).once.
|
@@ -176,6 +176,71 @@ class WorkerTest < ActiveSupport::TestCase
|
|
176
176
|
assert_equal :cancelled, @run.state, "Final run state not ':cancelled'"
|
177
177
|
end
|
178
178
|
|
179
|
+
test "run cancelled while waiting to start" do
|
180
|
+
# Stub the creation of a run on a Taverna Server.
|
181
|
+
flexmock(T2Server::Server).new_instances do |s|
|
182
|
+
s.should_receive(:initialize_run).once.
|
183
|
+
and_return(URI.parse("http://localhost/run/02"))
|
184
|
+
end
|
185
|
+
|
186
|
+
# Stub the Taverna Server run calls.
|
187
|
+
flexmock(T2Server::Run).new_instances do |r|
|
188
|
+
r.should_receive(:status).and_return(:initialized)
|
189
|
+
r.should_receive(:create_time).and_return(Time.now)
|
190
|
+
r.should_receive(:add_password_credential).and_return(true)
|
191
|
+
r.should_receive(:name=).once.and_return(true)
|
192
|
+
r.should_receive(:start).and_return(false)
|
193
|
+
r.should_receive(:log).once.and_return(0)
|
194
|
+
r.should_receive(:delete).and_return_undefined
|
195
|
+
end
|
196
|
+
|
197
|
+
# Stub the TavernaPlayer::Worker.cancelled? method and set the internal
|
198
|
+
# run model state stop to true.
|
199
|
+
worker = TavernaPlayer::Worker.new(@run)
|
200
|
+
flexmock(worker).should_receive(:cancelled?).once.and_return(true)
|
201
|
+
@run.stop = true
|
202
|
+
@run.save
|
203
|
+
|
204
|
+
assert_equal :pending, @run.state, "Initial run state not ':pending'"
|
205
|
+
|
206
|
+
worker.perform
|
207
|
+
|
208
|
+
assert_equal :cancelled, @run.state, "Final run state not ':cancelled'"
|
209
|
+
end
|
210
|
+
|
211
|
+
test "run cancelled while running" do
|
212
|
+
# Stub the creation of a run on a Taverna Server.
|
213
|
+
flexmock(T2Server::Server).new_instances do |s|
|
214
|
+
s.should_receive(:initialize_run).once.
|
215
|
+
and_return(URI.parse("http://localhost/run/03"))
|
216
|
+
end
|
217
|
+
|
218
|
+
# Stub the Taverna Server run calls.
|
219
|
+
flexmock(T2Server::Run).new_instances do |r|
|
220
|
+
r.should_receive(:status).times(3).and_return(:initialized, :running, :running)
|
221
|
+
r.should_receive(:create_time).and_return(Time.now)
|
222
|
+
r.should_receive(:add_password_credential).and_return(true)
|
223
|
+
r.should_receive(:name=).once.and_return(true)
|
224
|
+
r.should_receive(:start).and_return(true)
|
225
|
+
r.should_receive(:start_time).and_return(Time.now)
|
226
|
+
r.should_receive(:log).once.and_return(0)
|
227
|
+
r.should_receive(:delete).and_return_undefined
|
228
|
+
end
|
229
|
+
|
230
|
+
# Stub the TavernaPlayer::Worker.cancelled? method and set the internal
|
231
|
+
# run model state stop to true.
|
232
|
+
worker = TavernaPlayer::Worker.new(@run)
|
233
|
+
flexmock(worker).should_receive(:cancelled?).once.and_return(true)
|
234
|
+
@run.stop = true
|
235
|
+
@run.save
|
236
|
+
|
237
|
+
assert_equal :pending, @run.state, "Initial run state not ':pending'"
|
238
|
+
|
239
|
+
worker.perform
|
240
|
+
|
241
|
+
assert_equal :cancelled, @run.state, "Final run state not ':cancelled'"
|
242
|
+
end
|
243
|
+
|
179
244
|
test "fail in cancelled callback" do
|
180
245
|
# Stub the creation of a run on a Taverna Server with a failure.
|
181
246
|
flexmock(T2Server::Server).new_instances do |s|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: taverna-player
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Haines
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - ~>
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 1.1.4
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 1.1.4
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: coderay
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|