trafficbroker-mandy 0.2.2 → 0.2.3

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.
Files changed (3) hide show
  1. data/bin/mandy-reduce +5 -0
  2. data/lib/packer.rb +1 -1
  3. metadata +1 -1
data/bin/mandy-reduce CHANGED
@@ -9,6 +9,11 @@ def absolute_path(path)
9
9
  path =~ /^\// ? path : File.join(Dir.pwd, path)
10
10
  end
11
11
 
12
+ if ARGV.size > 3
13
+ payload = ARGV[3]
14
+ Mandy::Packer.unpack(payload)
15
+ end
16
+
12
17
  file = absolute_path(ARGV[0])
13
18
  job_name = ARGV[1]
14
19
 
data/lib/packer.rb CHANGED
@@ -8,7 +8,7 @@ module Mandy
8
8
  return dir if File.file?(dir)
9
9
  FileUtils.mkdir_p(TMP_DIR)
10
10
  tmp_path = "#{TMP_DIR}/packed-job-#{Time.now.to_i}.tar"
11
- `tar -cf #{tmp_path} #{dir}`
11
+ Dir.chdir(dir) { `tar -cf #{tmp_path} *` }
12
12
  tmp_path
13
13
  end
14
14
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trafficbroker-mandy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Kent