iron_worker_ng 0.9.2 → 0.9.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/bin/iron_worker +15 -1
  3. metadata +5 -5
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.2
1
+ 0.9.4
data/bin/iron_worker CHANGED
@@ -10,8 +10,10 @@ class IronWorkerCLILoggerFormatter < ::Logger::Formatter
10
10
  end
11
11
  end
12
12
 
13
+ @env = nil
14
+
13
15
  def create_client
14
- client = IronWorkerNG::Client.new
16
+ client = IronWorkerNG::Client.new(:env => @env)
15
17
 
16
18
  project = client.projects.get
17
19
 
@@ -20,6 +22,12 @@ def create_client
20
22
  client
21
23
  end
22
24
 
25
+ def env_opt(opts)
26
+ opts.on('-e', '--env ENV', 'environment') do |v|
27
+ @env = v
28
+ end
29
+ end
30
+
23
31
  if $*.size == 1 && ($*[0] == '-v' || $*[0] == '--version')
24
32
  puts IronWorkerNG.full_version
25
33
  exit 0
@@ -60,6 +68,8 @@ if command == 'codes.create'
60
68
  opts.on('-n', '--name NAME', 'code name or workerfile') do |v|
61
69
  name = v
62
70
  end
71
+
72
+ env_opt(opts)
63
73
  end
64
74
 
65
75
  begin
@@ -151,6 +161,8 @@ elsif command == 'tasks.create' || command == 'schedules.create'
151
161
  opts.on('--print-id', 'prints result id') do |v|
152
162
  print_id = true
153
163
  end
164
+
165
+ env_opt(opts)
154
166
  end
155
167
 
156
168
  begin
@@ -216,6 +228,8 @@ elsif command == 'tasks.log'
216
228
  opts.on('-w', '--wait', 'wait for task') do |v|
217
229
  wait = true
218
230
  end
231
+
232
+ env_opt(opts)
219
233
  end
220
234
 
221
235
  begin
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.9.2
4
+ version: 0.9.4
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-19 00:00:00.000000000 Z
13
+ date: 2012-07-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: iron_core
@@ -19,7 +19,7 @@ dependencies:
19
19
  requirements:
20
20
  - - ! '>='
21
21
  - !ruby/object:Gem::Version
22
- version: 0.2.0
22
+ version: 0.3.0
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -27,7 +27,7 @@ dependencies:
27
27
  requirements:
28
28
  - - ! '>='
29
29
  - !ruby/object:Gem::Version
30
- version: 0.2.0
30
+ version: 0.3.0
31
31
  - !ruby/object:Gem::Dependency
32
32
  name: zip
33
33
  requirement: !ruby/object:Gem::Requirement
@@ -162,7 +162,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
162
162
  version: '0'
163
163
  segments:
164
164
  - 0
165
- hash: 353173933
165
+ hash: 838359663
166
166
  required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  none: false
168
168
  requirements: