iron_worker_ng 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/iron_worker +3 -3
- data/lib/iron_worker_ng/code/base.rb +1 -1
- data/lib/iron_worker_ng/code/initializer.rb +1 -1
- data/lib/iron_worker_ng/feature/base.rb +9 -3
- data/lib/iron_worker_ng/feature/binary/merge_exec.rb +2 -2
- data/lib/iron_worker_ng/feature/common/merge_dir.rb +4 -4
- data/lib/iron_worker_ng/feature/common/merge_file.rb +2 -2
- data/lib/iron_worker_ng/feature/java/merge_exec.rb +2 -2
- data/lib/iron_worker_ng/feature/java/merge_jar.rb +2 -2
- data/lib/iron_worker_ng/feature/node/merge_exec.rb +2 -2
- data/lib/iron_worker_ng/feature/ruby/merge_exec.rb +2 -2
- data/lib/iron_worker_ng/feature/ruby/merge_gem.rb +3 -3
- data/lib/iron_worker_ng/feature/ruby/merge_gemfile.rb +1 -1
- data/ng_tests_worker.rb +4 -1
- data/remote_test.rb +2 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.1
|
data/bin/iron_worker
CHANGED
@@ -223,7 +223,7 @@ elsif command == 'tasks.log'
|
|
223
223
|
if live
|
224
224
|
begin
|
225
225
|
log = client.tasks.log(task_id)
|
226
|
-
rescue
|
226
|
+
rescue IronCore::IronError
|
227
227
|
end
|
228
228
|
else
|
229
229
|
log = client.tasks.log(task_id)
|
@@ -238,7 +238,7 @@ elsif command == 'tasks.log'
|
|
238
238
|
next_log = client.tasks.log(task_id)
|
239
239
|
print next_log[log.length .. - 1]
|
240
240
|
log = next_log
|
241
|
-
rescue
|
241
|
+
rescue IronCore::IronError
|
242
242
|
end
|
243
243
|
end
|
244
244
|
end
|
@@ -246,7 +246,7 @@ elsif command == 'tasks.log'
|
|
246
246
|
begin
|
247
247
|
next_log = client.tasks.log(task_id)
|
248
248
|
print next_log[log.length .. - 1]
|
249
|
-
rescue
|
249
|
+
rescue IronCore::IronError
|
250
250
|
end
|
251
251
|
end
|
252
252
|
end
|
@@ -5,11 +5,17 @@ module IronWorkerNG
|
|
5
5
|
@code = code
|
6
6
|
end
|
7
7
|
|
8
|
-
def
|
9
|
-
if
|
10
|
-
|
8
|
+
def rebase(path)
|
9
|
+
if not path.start_with?('/')
|
10
|
+
path = @code.base_dir + path
|
11
11
|
end
|
12
12
|
|
13
|
+
path
|
14
|
+
end
|
15
|
+
|
16
|
+
def zip_add(zip, dest, src)
|
17
|
+
src = File.expand_path(src)
|
18
|
+
|
13
19
|
unless File.exists?(src)
|
14
20
|
IronCore::Logger.error 'IronWorkerNG', "Can't find src with path='#{src}'"
|
15
21
|
raise IronCore::IronError.new("Can't find src with path='#{src}'")
|
@@ -12,13 +12,13 @@ module IronWorkerNG
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def hash_string
|
15
|
-
Digest::MD5.hexdigest(@path + File.mtime(@path).to_i.to_s)
|
15
|
+
Digest::MD5.hexdigest(@path + File.mtime(rebase(@path)).to_i.to_s)
|
16
16
|
end
|
17
17
|
|
18
18
|
def bundle(zip)
|
19
19
|
IronCore::Logger.debug 'IronWorkerNG', "Bundling binary exec with path='#{@path}'"
|
20
20
|
|
21
|
-
zip_add(zip, File.basename(@path), @path)
|
21
|
+
zip_add(zip, File.basename(@path), rebase(@path))
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
@@ -17,9 +17,9 @@ module IronWorkerNG
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def hash_string
|
20
|
-
s = @path + @dest + File.mtime(@path).to_i.to_s
|
20
|
+
s = @path + @dest + File.mtime(rebase(@path)).to_i.to_s
|
21
21
|
|
22
|
-
Dir.glob(@path + '/**/**') do |path|
|
22
|
+
Dir.glob(rebase(@path) + '/**/**') do |path|
|
23
23
|
s += path + File.mtime(path).to_i.to_s
|
24
24
|
end
|
25
25
|
|
@@ -29,8 +29,8 @@ module IronWorkerNG
|
|
29
29
|
def bundle(zip)
|
30
30
|
IronCore::Logger.debug 'IronWorkerNG', "Bundling dir with path='#{@path}' and dest='#{@dest}'"
|
31
31
|
|
32
|
-
Dir.glob(@path + '/**/**') do |path|
|
33
|
-
zip_add(zip, @dest + File.basename(@path) + path[@path.length .. -1], path)
|
32
|
+
Dir.glob(rebase(@path) + '/**/**') do |path|
|
33
|
+
zip_add(zip, @dest + File.basename(@path) + path[rebase(@path).length .. -1], path)
|
34
34
|
end
|
35
35
|
end
|
36
36
|
end
|
@@ -17,13 +17,13 @@ module IronWorkerNG
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def hash_string
|
20
|
-
Digest::MD5.hexdigest(@path + @dest + File.mtime(@path).to_i.to_s)
|
20
|
+
Digest::MD5.hexdigest(@path + @dest + File.mtime(rebase(@path)).to_i.to_s)
|
21
21
|
end
|
22
22
|
|
23
23
|
def bundle(zip)
|
24
24
|
IronCore::Logger.debug 'IronWorkerNG', "Bundling file with path='#{@path}' and dest='#{@dest}'"
|
25
25
|
|
26
|
-
zip_add(zip, @dest + File.basename(@path), @path)
|
26
|
+
zip_add(zip, @dest + File.basename(@path), rebase(@path))
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
@@ -14,13 +14,13 @@ module IronWorkerNG
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def hash_string
|
17
|
-
Digest::MD5.hexdigest(@path + @klass + File.mtime(@path).to_i.to_s)
|
17
|
+
Digest::MD5.hexdigest(@path + @klass + File.mtime(rebase(@path)).to_i.to_s)
|
18
18
|
end
|
19
19
|
|
20
20
|
def bundle(zip)
|
21
21
|
IronCore::Logger.debug 'IronWorkerNG', "Bundling java exec with path='#{@path}' and class='#{@klass}'"
|
22
22
|
|
23
|
-
zip_add(zip, File.basename(@path), @path)
|
23
|
+
zip_add(zip, File.basename(@path), rebase(@path))
|
24
24
|
end
|
25
25
|
|
26
26
|
def code_for_classpath
|
@@ -12,13 +12,13 @@ module IronWorkerNG
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def hash_string
|
15
|
-
Digest::MD5.hexdigest(@path + File.mtime(@path).to_i.to_s)
|
15
|
+
Digest::MD5.hexdigest(@path + File.mtime(rebase(@path)).to_i.to_s)
|
16
16
|
end
|
17
17
|
|
18
18
|
def bundle(zip)
|
19
19
|
IronCore::Logger.debug 'IronWorkerNG', "Bundling java jar with path='#{@path}'"
|
20
20
|
|
21
|
-
zip_add(zip, File.basename(@path), @path)
|
21
|
+
zip_add(zip, File.basename(@path), rebase(@path))
|
22
22
|
end
|
23
23
|
|
24
24
|
def code_for_classpath
|
@@ -12,13 +12,13 @@ module IronWorkerNG
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def hash_string
|
15
|
-
Digest::MD5.hexdigest(@path + File.mtime(@path).to_i.to_s)
|
15
|
+
Digest::MD5.hexdigest(@path + File.mtime(rebase(@path)).to_i.to_s)
|
16
16
|
end
|
17
17
|
|
18
18
|
def bundle(zip)
|
19
19
|
IronCore::Logger.debug 'IronWorkerNG', "Bundling node exec with path='#{@path}'"
|
20
20
|
|
21
|
-
zip_add(zip, File.basename(@path), @path)
|
21
|
+
zip_add(zip, File.basename(@path), rebase(@path))
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
@@ -14,13 +14,13 @@ module IronWorkerNG
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def hash_string
|
17
|
-
Digest::MD5.hexdigest(@path + @klass + File.mtime(@path).to_i.to_s)
|
17
|
+
Digest::MD5.hexdigest(@path + @klass + File.mtime(rebase(@path)).to_i.to_s)
|
18
18
|
end
|
19
19
|
|
20
20
|
def bundle(zip)
|
21
21
|
IronCore::Logger.debug 'IronWorkerNG', "Bundling ruby exec with path='#{path}' and class='#{klass}'"
|
22
22
|
|
23
|
-
zip_add(zip, File.basename(@path), @path)
|
23
|
+
zip_add(zip, File.basename(@path), rebase(@path))
|
24
24
|
end
|
25
25
|
end
|
26
26
|
|
@@ -44,11 +44,11 @@ module IronWorkerNG
|
|
44
44
|
if @spec.extensions.length == 0 || IronWorkerNG::Feature::Ruby::MergeGem.merge_binary?
|
45
45
|
IronCore::Logger.debug 'IronWorkerNG', "Bundling ruby gem with name='#{@spec.name}' and version='#{@spec.version}'"
|
46
46
|
|
47
|
-
zip_add(zip, '__gems__/gems/' + @spec.full_name, gem_path
|
48
|
-
zip_add(zip, "__gems__/specifications/#{@spec.full_name}.gemspec", File.expand_path(gem_path + '/../../specifications/' + @spec.full_name + '.gemspec')
|
47
|
+
zip_add(zip, '__gems__/gems/' + @spec.full_name, gem_path)
|
48
|
+
zip_add(zip, "__gems__/specifications/#{@spec.full_name}.gemspec", File.expand_path(gem_path + '/../../specifications/' + @spec.full_name + '.gemspec'))
|
49
49
|
|
50
50
|
Dir.glob(gem_path + '/**/**') do |path|
|
51
|
-
zip_add(zip, '__gems__/gems/' + @spec.full_name + path[gem_path.length .. -1], path
|
51
|
+
zip_add(zip, '__gems__/gems/' + @spec.full_name + path[gem_path.length .. -1], path)
|
52
52
|
end
|
53
53
|
else
|
54
54
|
IronCore::Logger.warn 'IronWorkerNG', "Skipping ruby gem with name='#{@spec.name}' and version='#{@spec.version}' as it contains native extensions"
|
@@ -16,7 +16,7 @@ module IronWorkerNG
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def hash_string
|
19
|
-
Digest::MD5.hexdigest(@path + File.mtime(@path).to_i.to_s + (File.exists?(@path + '.lock') ? File.mtime(@path + '.lock').to_i.to_s : '') + @groups.join)
|
19
|
+
Digest::MD5.hexdigest(@path + File.mtime(rebase(@path)).to_i.to_s + (File.exists?(rebase(@path) + '.lock') ? File.mtime(rebase(@path) + '.lock').to_i.to_s : '') + @groups.join)
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
data/ng_tests_worker.rb
CHANGED
data/remote_test.rb
CHANGED
@@ -13,6 +13,7 @@ end
|
|
13
13
|
$LOAD_PATH.unshift 'lib'
|
14
14
|
|
15
15
|
require 'iron_worker_ng'
|
16
|
+
require_relative 'test/iron_io_config.rb'
|
16
17
|
|
17
18
|
client = IronWorkerNG::Client.new
|
18
19
|
|
@@ -33,7 +34,7 @@ puts client.codes.create(code)
|
|
33
34
|
|
34
35
|
puts code.create_zip
|
35
36
|
|
36
|
-
task = client.tasks.create 'NgTestsWorker'
|
37
|
+
task = client.tasks.create 'NgTestsWorker', args: $*.join(' ')
|
37
38
|
|
38
39
|
client.tasks.wait_for task.id
|
39
40
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iron_worker_ng
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-06-
|
13
|
+
date: 2012-06-09 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: iron_core
|
@@ -144,7 +144,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
144
144
|
version: '0'
|
145
145
|
segments:
|
146
146
|
- 0
|
147
|
-
hash:
|
147
|
+
hash: -3266643
|
148
148
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
149
149
|
none: false
|
150
150
|
requirements:
|