mandy 0.4.92 → 0.4.93
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/Rakefile +13 -9
- data/bin/mandy +0 -1
- data/bin/mandy-hadoop +3 -3
- data/bin/mandy-map +1 -3
- data/bin/mandy-reduce +1 -2
- data/bootstrap.rb +1 -1
- data/lib/packer.rb +6 -8
- metadata +9 -13
- data/Gemfile +0 -2
data/Rakefile
CHANGED
@@ -10,13 +10,17 @@ Spec::Rake::SpecTask.new(:spec) do |t|
|
|
10
10
|
t.spec_opts = %w{-f s -c -L mtime}
|
11
11
|
end
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
task :install do
|
19
|
-
`sudo gem install pkg/mandy-*.gem`
|
20
|
-
end
|
13
|
+
namespace :gem do
|
14
|
+
task :build do
|
15
|
+
`gem build mandy.gemspec`
|
16
|
+
`mkdir pkg; mv mandy-*.gem pkg/`
|
17
|
+
end
|
21
18
|
|
22
|
-
task :
|
19
|
+
task :install => :build do
|
20
|
+
`sudo gem install pkg/mandy-*.gem`
|
21
|
+
end
|
22
|
+
|
23
|
+
task :push => :build do
|
24
|
+
`gem push pkg/mandy-#{File.read(File.join(File.dirname(__FILE__), 'VERSION'))}.gem`
|
25
|
+
end
|
26
|
+
end
|
data/bin/mandy
CHANGED
data/bin/mandy-hadoop
CHANGED
@@ -26,7 +26,7 @@ OptionParser.new do |opts|
|
|
26
26
|
options.cmdenv = "json=#{CGI.escape(config)}"
|
27
27
|
end
|
28
28
|
|
29
|
-
opts.on("-g", '--gemfile filepath', "Path to your jobs
|
29
|
+
opts.on("-g", '--gemfile filepath', "Path to your jobs gem yml file (defaults to ./gems.yml)") do |config|
|
30
30
|
options.gemfile = config
|
31
31
|
end
|
32
32
|
|
@@ -43,8 +43,8 @@ def absolute_path(path)
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def gemfile(file)
|
46
|
-
path = absolute_path(file || '
|
47
|
-
File.exist?(path) ? path :
|
46
|
+
path = absolute_path(file || 'gems.yml')
|
47
|
+
File.exist?(path) ? path : nil
|
48
48
|
end
|
49
49
|
|
50
50
|
file = ARGV[0]
|
data/bin/mandy-map
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
environment = File.expand_path(File.join(File.dirname(__FILE__), '..', 'vendor', 'gems', 'environment.rb'))
|
4
|
-
require File.exist?(environment) ? environment : "rubygems"
|
2
|
+
require "rubygems"
|
5
3
|
require "mandy"
|
6
4
|
|
7
5
|
if ARGV.size==0
|
data/bin/mandy-reduce
CHANGED
data/bootstrap.rb
CHANGED
data/lib/packer.rb
CHANGED
@@ -3,19 +3,17 @@ require "fileutils"
|
|
3
3
|
module Mandy
|
4
4
|
class Packer
|
5
5
|
TMP_DIR = '/tmp/mandy'
|
6
|
+
MANDY_DIR = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
6
7
|
|
7
|
-
def self.pack(script, dir, gemfile)
|
8
|
+
def self.pack(script, dir, gemfile=nil)
|
8
9
|
tmp_path = "#{TMP_DIR}/packed-job-#{Time.now.to_i}"
|
9
10
|
FileUtils.mkdir_p(tmp_path)
|
10
11
|
to_be_copied = File.file?(dir) ? dir : File.join(dir, '*')
|
11
|
-
FileUtils.
|
12
|
+
FileUtils.cp(script, tmp_path)
|
12
13
|
FileUtils.cp_r(Dir.glob(to_be_copied), tmp_path)
|
13
|
-
FileUtils.
|
14
|
-
|
15
|
-
|
16
|
-
`rm -r vendor/gems/gems`
|
17
|
-
`tar -cf bundle.tar *`
|
18
|
-
end
|
14
|
+
FileUtils.cp(File.join(MANDY_DIR, 'geminstaller.yml'), tmp_path)
|
15
|
+
FileUtils.cp(gemfile, File.join(tmp_path, 'gems.yml')) if gemfile and File.exists?(gemfile)
|
16
|
+
Dir.chdir(tmp_path) { `tar -cf bundle.tar *` }
|
19
17
|
File.join(tmp_path, 'bundle.tar')
|
20
18
|
end
|
21
19
|
|
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.
|
4
|
+
version: 0.4.93
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Kent
|
@@ -13,16 +13,6 @@ cert_chain: []
|
|
13
13
|
date: 2009-10-19 00:00:00 +01:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
|
-
- !ruby/object:Gem::Dependency
|
17
|
-
name: bundler
|
18
|
-
type: :runtime
|
19
|
-
version_requirement:
|
20
|
-
version_requirements: !ruby/object:Gem::Requirement
|
21
|
-
requirements:
|
22
|
-
- - ">="
|
23
|
-
- !ruby/object:Gem::Version
|
24
|
-
version: "0"
|
25
|
-
version:
|
26
16
|
- !ruby/object:Gem::Dependency
|
27
17
|
name: json
|
28
18
|
type: :runtime
|
@@ -55,17 +45,23 @@ extensions: []
|
|
55
45
|
extra_rdoc_files: []
|
56
46
|
|
57
47
|
files:
|
48
|
+
- bin/mandy
|
58
49
|
- bin/mandy-hadoop
|
59
50
|
- bin/mandy-local
|
60
51
|
- bin/mandy-map
|
52
|
+
- bin/mandy-put
|
61
53
|
- bin/mandy-get
|
62
54
|
- bin/mandy-cat
|
63
|
-
- bin/mandy-put
|
64
55
|
- bin/mandy-reduce
|
56
|
+
- bin/mandy-rm
|
57
|
+
- bin/mandy-mv
|
58
|
+
- bin/mandy-cp
|
59
|
+
- bin/mandy-mkdir
|
60
|
+
- bin/mandy-exists
|
61
|
+
- bin/mandy-install
|
65
62
|
- readme.md
|
66
63
|
- Rakefile
|
67
64
|
- bootstrap.rb
|
68
|
-
- Gemfile
|
69
65
|
- lib/mandy.rb
|
70
66
|
- lib/support/tuple.rb
|
71
67
|
- lib/support/formatting.rb
|
data/Gemfile
DELETED