iron_worker_ng 0.8.0 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.0
1
+ 0.8.2
data/bin/iron_worker CHANGED
@@ -164,7 +164,7 @@ elsif command == 'tasks.create' || command == 'schedules.create'
164
164
  id = client.schedules.create(name, payload, options).id
165
165
  end
166
166
 
167
- print id if print_id
167
+ puts id if print_id
168
168
  elsif command == 'tasks.log'
169
169
  if $*.size > 0 && $*[0][0] != '-'
170
170
  $*.unshift('-t')
@@ -257,7 +257,7 @@ RUNNER
257
257
  end
258
258
 
259
259
  def to_s
260
- "runtime='#{@runtime}', name='#{@name}', exec='#{@inside_builder ? '' : @exec.path}'"
260
+ "runtime='#{@runtime}', name='#{@name}', exec='#{@inside_builder || @exec.nil? ? '' : @exec.path}'"
261
261
  end
262
262
  end
263
263
  end
@@ -0,0 +1,13 @@
1
+ require_relative 'runtime/go'
2
+
3
+ module IronWorkerNG
4
+ module Code
5
+ class Go < IronWorkerNG::Code::Base
6
+ def initialize(*args, &block)
7
+ runtime(:go)
8
+
9
+ super(*args, &block)
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,13 @@
1
+ require_relative 'runtime/perl'
2
+
3
+ module IronWorkerNG
4
+ module Code
5
+ class Perl < IronWorkerNG::Code::Base
6
+ def initialize(*args, &block)
7
+ runtime(:perl)
8
+
9
+ super(*args, &block)
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,17 @@
1
+ require_relative '../../feature/go/merge_exec'
2
+
3
+ module IronWorkerNG
4
+ module Code
5
+ module Runtime
6
+ module Go
7
+ include IronWorkerNG::Feature::Go::MergeExec::InstanceMethods
8
+
9
+ def runtime_run_code
10
+ <<RUN_CODE
11
+ go run #{File.basename(@exec.path)} "$@"
12
+ RUN_CODE
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,17 @@
1
+ require_relative '../../feature/perl/merge_exec'
2
+
3
+ module IronWorkerNG
4
+ module Code
5
+ module Runtime
6
+ module Perl
7
+ include IronWorkerNG::Feature::Perl::MergeExec::InstanceMethods
8
+
9
+ def runtime_run_code
10
+ <<RUN_CODE
11
+ perl #{File.basename(@exec.path)} "$@"
12
+ RUN_CODE
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,51 @@
1
+ module IronWorkerNG
2
+ module Feature
3
+ module Go
4
+ module MergeExec
5
+ class Feature < IronWorkerNG::Feature::Base
6
+ attr_reader :path
7
+
8
+ def initialize(code, path)
9
+ super(code)
10
+
11
+ @path = path
12
+ end
13
+
14
+ def hash_string
15
+ Digest::MD5.hexdigest(@path + File.mtime(rebase(@path)).to_i.to_s)
16
+ end
17
+
18
+ def bundle(zip)
19
+ IronCore::Logger.debug 'IronWorkerNG', "Bundling go exec with path='#{@path}'"
20
+
21
+ zip_add(zip, File.basename(@path), rebase(@path))
22
+ end
23
+ end
24
+
25
+ module InstanceMethods
26
+ def merge_exec(path=nil)
27
+ @exec ||= nil
28
+
29
+ return @exec unless path
30
+
31
+ unless @exec.nil?
32
+ IronCore::Logger.warn 'IronWorkerNG', "Ignoring attempt to merge go exec with path='#{path}'"
33
+ return
34
+ end
35
+
36
+ @exec = IronWorkerNG::Feature::Go::MergeExec::Feature.new(self, path)
37
+
38
+ IronCore::Logger.info 'IronWorkerNG', "Merging go exec with path='#{path}'"
39
+
40
+ @features << @exec
41
+ end
42
+
43
+ alias :exec :merge_exec
44
+
45
+ alias :merge_worker :merge_exec
46
+ alias :worker :merge_worker
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,51 @@
1
+ module IronWorkerNG
2
+ module Feature
3
+ module Perl
4
+ module MergeExec
5
+ class Feature < IronWorkerNG::Feature::Base
6
+ attr_reader :path
7
+
8
+ def initialize(code, path)
9
+ super(code)
10
+
11
+ @path = path
12
+ end
13
+
14
+ def hash_string
15
+ Digest::MD5.hexdigest(@path + File.mtime(rebase(@path)).to_i.to_s)
16
+ end
17
+
18
+ def bundle(zip)
19
+ IronCore::Logger.debug 'IronWorkerNG', "Bundling perl exec with path='#{@path}'"
20
+
21
+ zip_add(zip, File.basename(@path), rebase(@path))
22
+ end
23
+ end
24
+
25
+ module InstanceMethods
26
+ def merge_exec(path=nil)
27
+ @exec ||= nil
28
+
29
+ return @exec unless path
30
+
31
+ unless @exec.nil?
32
+ IronCore::Logger.warn 'IronWorkerNG', "Ignoring attempt to merge perl exec with path='#{path}'"
33
+ return
34
+ end
35
+
36
+ @exec = IronWorkerNG::Feature::Perl::MergeExec::Feature.new(self, path)
37
+
38
+ IronCore::Logger.info 'IronWorkerNG', "Merging perl exec with path='#{path}'"
39
+
40
+ @features << @exec
41
+ end
42
+
43
+ alias :exec :merge_exec
44
+
45
+ alias :merge_worker :merge_exec
46
+ alias :worker :merge_worker
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -9,4 +9,6 @@ require_relative 'iron_worker_ng/code/node'
9
9
  require_relative 'iron_worker_ng/code/mono'
10
10
  require_relative 'iron_worker_ng/code/python'
11
11
  require_relative 'iron_worker_ng/code/php'
12
+ require_relative 'iron_worker_ng/code/go'
13
+ require_relative 'iron_worker_ng/code/perl'
12
14
  require_relative 'iron_worker_ng/code/builder'
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.8.0
4
+ version: 0.8.2
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-07-10 00:00:00.000000000 Z
13
+ date: 2012-07-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: iron_core
@@ -113,16 +113,20 @@ files:
113
113
  - lib/iron_worker_ng/code/base.rb
114
114
  - lib/iron_worker_ng/code/binary.rb
115
115
  - lib/iron_worker_ng/code/builder.rb
116
+ - lib/iron_worker_ng/code/go.rb
116
117
  - lib/iron_worker_ng/code/java.rb
117
118
  - lib/iron_worker_ng/code/mono.rb
118
119
  - lib/iron_worker_ng/code/node.rb
120
+ - lib/iron_worker_ng/code/perl.rb
119
121
  - lib/iron_worker_ng/code/php.rb
120
122
  - lib/iron_worker_ng/code/python.rb
121
123
  - lib/iron_worker_ng/code/ruby.rb
122
124
  - lib/iron_worker_ng/code/runtime/binary.rb
125
+ - lib/iron_worker_ng/code/runtime/go.rb
123
126
  - lib/iron_worker_ng/code/runtime/java.rb
124
127
  - lib/iron_worker_ng/code/runtime/mono.rb
125
128
  - lib/iron_worker_ng/code/runtime/node.rb
129
+ - lib/iron_worker_ng/code/runtime/perl.rb
126
130
  - lib/iron_worker_ng/code/runtime/php.rb
127
131
  - lib/iron_worker_ng/code/runtime/python.rb
128
132
  - lib/iron_worker_ng/code/runtime/ruby.rb
@@ -130,10 +134,12 @@ files:
130
134
  - lib/iron_worker_ng/feature/binary/merge_exec.rb
131
135
  - lib/iron_worker_ng/feature/common/merge_dir.rb
132
136
  - lib/iron_worker_ng/feature/common/merge_file.rb
137
+ - lib/iron_worker_ng/feature/go/merge_exec.rb
133
138
  - lib/iron_worker_ng/feature/java/merge_exec.rb
134
139
  - lib/iron_worker_ng/feature/java/merge_jar.rb
135
140
  - lib/iron_worker_ng/feature/mono/merge_exec.rb
136
141
  - lib/iron_worker_ng/feature/node/merge_exec.rb
142
+ - lib/iron_worker_ng/feature/perl/merge_exec.rb
137
143
  - lib/iron_worker_ng/feature/php/merge_exec.rb
138
144
  - lib/iron_worker_ng/feature/python/merge_exec.rb
139
145
  - lib/iron_worker_ng/feature/ruby/merge_exec.rb
@@ -157,7 +163,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
157
163
  version: '0'
158
164
  segments:
159
165
  - 0
160
- hash: -271964877
166
+ hash: 493722205
161
167
  required_rubygems_version: !ruby/object:Gem::Requirement
162
168
  none: false
163
169
  requirements: