simplews 1.5.2 → 1.5.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/simplews/jobs.rb +3 -3
- data/lib/simplews/rake.rb +11 -7
- metadata +2 -2
data/lib/simplews/jobs.rb
CHANGED
@@ -265,9 +265,9 @@ class SimpleWS::Jobs < SimpleWS
|
|
265
265
|
|
266
266
|
def write(file, contents)
|
267
267
|
path = Job.path(file, @name)
|
268
|
-
|
269
|
-
|
270
|
-
|
268
|
+
File.open(path,'w') do |fout|
|
269
|
+
fout.write contents
|
270
|
+
end
|
271
271
|
end
|
272
272
|
|
273
273
|
def message(message)
|
data/lib/simplews/rake.rb
CHANGED
@@ -22,7 +22,7 @@ class SimpleWS::Jobs::Scheduler::Job
|
|
22
22
|
alias_method :old_execute, :execute
|
23
23
|
def execute(*args)
|
24
24
|
action = name
|
25
|
-
message = $
|
25
|
+
message = $_step_descriptions.collect{|rexp, msg|
|
26
26
|
if name.match(rexp)
|
27
27
|
msg
|
28
28
|
else
|
@@ -37,22 +37,26 @@ class SimpleWS::Jobs::Scheduler::Job
|
|
37
37
|
if message.match(/^(\w+): (.*)/)
|
38
38
|
$_current_job.step($1, $2)
|
39
39
|
else
|
40
|
-
$_current_job.step(
|
40
|
+
$_current_job.step(action, message)
|
41
41
|
end
|
42
42
|
|
43
43
|
old_execute(*args)
|
44
44
|
end
|
45
45
|
EOC
|
46
46
|
|
47
|
-
$step_descriptions = {}
|
48
47
|
load rakefile
|
49
|
-
|
50
|
-
|
51
|
-
|
48
|
+
if defined? Rake::Pipeline
|
49
|
+
Rake::Pipeline::step_descriptions.each{|re, description|
|
50
|
+
if description.match(/(.*): (.*)/)
|
51
|
+
add_description(re, $1, $2)
|
52
|
+
end
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
52
56
|
files = result_filenames
|
53
57
|
|
54
58
|
$_current_job = self
|
55
|
-
$
|
59
|
+
$_step_descriptions = @step_descriptions || {}
|
56
60
|
Rake::Task[files.first].invoke
|
57
61
|
end
|
58
62
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simplews
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-12-
|
12
|
+
date: 2009-12-16 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|