mandy 0.4.995 → 0.4.996

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/bin/mandy-hadoop +9 -1
  3. data/lib/mandy/job.rb +2 -2
  4. metadata +1 -1
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.995
1
+ 0.4.996
@@ -48,6 +48,13 @@ def gemfile(file)
48
48
  File.exist?(path) ? path : nil
49
49
  end
50
50
 
51
+ def set_env(opts_string)
52
+ opts_string.split(' ').each do |pair|
53
+ key, value = pair.split("=")
54
+ ENV[key] = value
55
+ end
56
+ end
57
+
51
58
  file = ARGV[0]
52
59
  filename = File.basename(file)
53
60
  inputs = ARGV[1].split(",")
@@ -56,8 +63,9 @@ input = inputs.map {|path| "-input \"#{path}\""}.join(" ")
56
63
  output_folder = ARGV[2]
57
64
  config = absolute_path(options.config || 'cluster.xml')
58
65
  puts "Packaging code for distribution..."
59
- payload = Mandy::Packer.pack(file, options.payload || ARGV[0], gemfile(options.gemfile))
66
+ payload = Mandy::Packer.pack(file, options.payload || ARGV[0], gemfile(options.gemfile))
60
67
  cmdenv = options.cmdenv
68
+ set_env(cmdenv)
61
69
 
62
70
  at_exit do
63
71
  puts
@@ -12,8 +12,8 @@ module Mandy
12
12
  end
13
13
 
14
14
  def parameter(name)
15
- return find_json_param(name) if json_provided?
16
- ENV[name.to_s]
15
+ param = find_json_param(name) if json_provided?
16
+ param || ENV[name.to_s]
17
17
  end
18
18
 
19
19
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mandy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.995
4
+ version: 0.4.996
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Kent