iron_worker_ng 0.11.2 → 0.11.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +5 -1
- data/bin/iron_worker +3 -5
- data/lib/iron_worker_ng/code/base.rb +19 -5
- data/lib/iron_worker_ng/code/runtime/binary.rb +1 -1
- data/lib/iron_worker_ng/feature/ruby/merge_gem.rb +1 -1
- data/lib/iron_worker_ng/version.rb +1 -1
- metadata +107 -79
data/README.md
CHANGED
@@ -153,6 +153,10 @@ Command which will be executed once (on worker upload). Can be used for heavy ta
|
|
153
153
|
code.remote_build_command('curl http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.4.6.tar.bz2 -o linux-3.4.6.tar.bz2 && tar xf linux-3.4.6.tar.bz2')
|
154
154
|
```
|
155
155
|
|
156
|
+
### full_remote_build(activate)
|
157
|
+
|
158
|
+
If set to true, activates full remote build mode. In this mode iron_worker will try to resolve as much things as possible at build step. For example, all gems will be installed at build step, which will allow you to use gems with native extensions.
|
159
|
+
|
156
160
|
### run()
|
157
161
|
|
158
162
|
Runs code package on your local box. Can be useful for testing.
|
@@ -205,7 +209,7 @@ code.merge_exec 'my_worker.rb'
|
|
205
209
|
### merge_gem(name, version = '>= 0')
|
206
210
|
### gem(name, version = '>= 0')
|
207
211
|
|
208
|
-
Merge a gem with dependencies.
|
212
|
+
Merge a gem with dependencies. Gems with native extensions will not be merged by default, switching to full remote build should fix this. You can use version constrains if you need a specific gem version. Please note that `git` and `path` gems aren't supported yet.
|
209
213
|
|
210
214
|
```ruby
|
211
215
|
code.merge_gem 'activerecord'
|
data/bin/iron_worker
CHANGED
@@ -73,14 +73,12 @@ if command == 'upload'
|
|
73
73
|
options[:retries_delay] = v
|
74
74
|
end
|
75
75
|
|
76
|
-
opts.on('-a', '--async', 'don\'t wait for package build
|
76
|
+
opts.on('-a', '--async', 'don\'t wait for package build') do |v|
|
77
77
|
params[:async] = true
|
78
78
|
end
|
79
79
|
|
80
|
-
|
81
|
-
|
82
|
-
params[:full_remote_build] = true
|
83
|
-
end
|
80
|
+
opts.on('--full-remote-build', 'activate full remote build') do |v|
|
81
|
+
params[:full_remote_build] = true
|
84
82
|
end
|
85
83
|
|
86
84
|
common_opts(opts)
|
@@ -17,8 +17,6 @@ module IronWorkerNG
|
|
17
17
|
attr_accessor :base_dir
|
18
18
|
attr_accessor :dest_dir
|
19
19
|
|
20
|
-
attr_accessor :full_remote_build
|
21
|
-
|
22
20
|
undef exec
|
23
21
|
undef gem
|
24
22
|
|
@@ -118,7 +116,7 @@ module IronWorkerNG
|
|
118
116
|
end
|
119
117
|
|
120
118
|
def remote_build_command(remote_build_command = nil)
|
121
|
-
@remote_build_command = remote_build_command
|
119
|
+
@remote_build_command = remote_build_command unless remote_build_command.nil?
|
122
120
|
|
123
121
|
@remote_build_command
|
124
122
|
end
|
@@ -130,6 +128,16 @@ module IronWorkerNG
|
|
130
128
|
alias :build :remote_build_command
|
131
129
|
alias :build= :remote_build_command=
|
132
130
|
|
131
|
+
def full_remote_build(full_remote_build = nil)
|
132
|
+
@full_remote_build = full_remote_build unless full_remote_build.nil?
|
133
|
+
|
134
|
+
@full_remote_build
|
135
|
+
end
|
136
|
+
|
137
|
+
def full_remote_build=(full_remote_build)
|
138
|
+
@full_remote_build = full_remote_build
|
139
|
+
end
|
140
|
+
|
133
141
|
def runtime(runtime = nil)
|
134
142
|
return @runtime unless runtime
|
135
143
|
|
@@ -205,6 +213,12 @@ root() {
|
|
205
213
|
|
206
214
|
cd "$(root "$@")"
|
207
215
|
|
216
|
+
LD_LIBRARY_PATH=.
|
217
|
+
export LD_LIBRARY_PATH
|
218
|
+
|
219
|
+
PATH=.:$PATH
|
220
|
+
export PATH
|
221
|
+
|
208
222
|
#{runtime_run_code(local)}
|
209
223
|
RUNNER
|
210
224
|
end
|
@@ -215,7 +229,7 @@ RUNNER
|
|
215
229
|
|
216
230
|
def create_container(local = false)
|
217
231
|
if @exec.nil?
|
218
|
-
IronCore::Logger.error 'IronWorkerNG', 'No exec specified', IronCore::Error
|
232
|
+
IronCore::Logger.error 'IronWorkerNG', 'No exec specified, check if worker file name is correct and/or exec command is present', IronCore::Error
|
219
233
|
end
|
220
234
|
|
221
235
|
if @name.nil?
|
@@ -294,7 +308,7 @@ RUNNER
|
|
294
308
|
end
|
295
309
|
|
296
310
|
def to_s
|
297
|
-
"runtime='#{@runtime}', name='#{@name}', exec='#{@exec.path}'"
|
311
|
+
"runtime='#{@runtime}', name='#{@name}', exec='#{@exec.nil? ? '' : @exec.path}'"
|
298
312
|
end
|
299
313
|
end
|
300
314
|
end
|
@@ -52,7 +52,7 @@ module IronWorkerNG
|
|
52
52
|
|
53
53
|
container_add(container, "__gems__/specifications/#{@spec.full_name}.gemspec", @spec.loaded_from)
|
54
54
|
else
|
55
|
-
IronCore::Logger.warn 'IronWorkerNG', "Skipping ruby gem with name='#{@spec.name}' and version='#{@spec.version}' as it contains native extensions"
|
55
|
+
IronCore::Logger.warn 'IronWorkerNG', "Skipping ruby gem with name='#{@spec.name}' and version='#{@spec.version}' as it contains native extensions, switching to full remote build should fix this"
|
56
56
|
end
|
57
57
|
end
|
58
58
|
end
|
metadata
CHANGED
@@ -1,105 +1,137 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: iron_worker_ng
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.11.3
|
4
5
|
prerelease:
|
5
|
-
version: 0.11.2
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Andrew Kirilenko
|
9
9
|
- Iron.io, Inc
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
- !ruby/object:Gem::Dependency
|
13
|
+
date: 2012-10-26 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
17
16
|
name: iron_core
|
18
|
-
|
19
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
20
18
|
none: false
|
21
|
-
requirements:
|
22
|
-
- -
|
23
|
-
- !ruby/object:Gem::Version
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
24
22
|
version: 0.4.2
|
25
23
|
type: :runtime
|
26
|
-
version_requirements: *id001
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: bundler
|
29
24
|
prerelease: false
|
30
|
-
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ! '>='
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: 0.4.2
|
31
|
+
- !ruby/object:Gem::Dependency
|
32
|
+
name: bundler
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
31
34
|
none: false
|
32
|
-
requirements:
|
33
|
-
- -
|
34
|
-
- !ruby/object:Gem::Version
|
35
|
+
requirements:
|
36
|
+
- - ! '>='
|
37
|
+
- !ruby/object:Gem::Version
|
35
38
|
version: 1.0.0
|
36
39
|
type: :runtime
|
37
|
-
version_requirements: *id002
|
38
|
-
- !ruby/object:Gem::Dependency
|
39
|
-
name: zip
|
40
40
|
prerelease: false
|
41
|
-
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
42
42
|
none: false
|
43
|
-
requirements:
|
44
|
-
- -
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version:
|
43
|
+
requirements:
|
44
|
+
- - ! '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 1.0.0
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: zip
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
47
55
|
type: :runtime
|
48
|
-
version_requirements: *id003
|
49
|
-
- !ruby/object:Gem::Dependency
|
50
|
-
name: test-unit
|
51
56
|
prerelease: false
|
52
|
-
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ! '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: test-unit
|
65
|
+
requirement: !ruby/object:Gem::Requirement
|
53
66
|
none: false
|
54
|
-
requirements:
|
55
|
-
- -
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
version:
|
67
|
+
requirements:
|
68
|
+
- - ! '>='
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
58
71
|
type: :development
|
59
|
-
version_requirements: *id004
|
60
|
-
- !ruby/object:Gem::Dependency
|
61
|
-
name: minitest
|
62
72
|
prerelease: false
|
63
|
-
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ! '>='
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0'
|
79
|
+
- !ruby/object:Gem::Dependency
|
80
|
+
name: minitest
|
81
|
+
requirement: !ruby/object:Gem::Requirement
|
64
82
|
none: false
|
65
|
-
requirements:
|
66
|
-
- -
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version:
|
83
|
+
requirements:
|
84
|
+
- - ! '>='
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '0'
|
69
87
|
type: :development
|
70
|
-
version_requirements: *id005
|
71
|
-
- !ruby/object:Gem::Dependency
|
72
|
-
name: minitest-reporters
|
73
88
|
prerelease: false
|
74
|
-
|
89
|
+
version_requirements: !ruby/object:Gem::Requirement
|
90
|
+
none: false
|
91
|
+
requirements:
|
92
|
+
- - ! '>='
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '0'
|
95
|
+
- !ruby/object:Gem::Dependency
|
96
|
+
name: minitest-reporters
|
97
|
+
requirement: !ruby/object:Gem::Requirement
|
75
98
|
none: false
|
76
|
-
requirements:
|
77
|
-
- -
|
78
|
-
- !ruby/object:Gem::Version
|
99
|
+
requirements:
|
100
|
+
- - ! '>='
|
101
|
+
- !ruby/object:Gem::Version
|
79
102
|
version: 0.5.0
|
80
103
|
type: :development
|
81
|
-
version_requirements: *id006
|
82
|
-
- !ruby/object:Gem::Dependency
|
83
|
-
name: rake
|
84
104
|
prerelease: false
|
85
|
-
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
106
|
+
none: false
|
107
|
+
requirements:
|
108
|
+
- - ! '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 0.5.0
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rake
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
86
114
|
none: false
|
87
|
-
requirements:
|
88
|
-
- -
|
89
|
-
- !ruby/object:Gem::Version
|
90
|
-
version:
|
115
|
+
requirements:
|
116
|
+
- - ! '>='
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
91
119
|
type: :development
|
92
|
-
|
120
|
+
prerelease: false
|
121
|
+
version_requirements: !ruby/object:Gem::Requirement
|
122
|
+
none: false
|
123
|
+
requirements:
|
124
|
+
- - ! '>='
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: '0'
|
93
127
|
description: New generation ruby client for IronWorker
|
94
|
-
email:
|
128
|
+
email:
|
95
129
|
- info@iron.io
|
96
|
-
executables:
|
130
|
+
executables:
|
97
131
|
- iron_worker
|
98
132
|
extensions: []
|
99
|
-
|
100
133
|
extra_rdoc_files: []
|
101
|
-
|
102
|
-
files:
|
134
|
+
files:
|
103
135
|
- lib/3rdparty/hashie/indifferent_access.rb
|
104
136
|
- lib/3rdparty/hashie/merge_initializer.rb
|
105
137
|
- lib/iron_worker_ng/fetcher.rb
|
@@ -144,31 +176,27 @@ files:
|
|
144
176
|
- bin/iron_worker
|
145
177
|
homepage: https://github.com/iron-io/iron_worker_ruby_ng
|
146
178
|
licenses: []
|
147
|
-
|
148
179
|
post_install_message:
|
149
180
|
rdoc_options: []
|
150
|
-
|
151
|
-
require_paths:
|
181
|
+
require_paths:
|
152
182
|
- lib
|
153
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
183
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
154
184
|
none: false
|
155
|
-
requirements:
|
156
|
-
- -
|
157
|
-
- !ruby/object:Gem::Version
|
158
|
-
version:
|
159
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
185
|
+
requirements:
|
186
|
+
- - ! '>='
|
187
|
+
- !ruby/object:Gem::Version
|
188
|
+
version: '1.9'
|
189
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
160
190
|
none: false
|
161
|
-
requirements:
|
162
|
-
- -
|
163
|
-
- !ruby/object:Gem::Version
|
191
|
+
requirements:
|
192
|
+
- - ! '>='
|
193
|
+
- !ruby/object:Gem::Version
|
164
194
|
version: 1.3.6
|
165
195
|
requirements: []
|
166
|
-
|
167
196
|
rubyforge_project:
|
168
197
|
rubygems_version: 1.8.24
|
169
198
|
signing_key:
|
170
199
|
specification_version: 3
|
171
200
|
summary: New generation ruby client for IronWorker
|
172
201
|
test_files: []
|
173
|
-
|
174
202
|
has_rdoc:
|