evoker 0.0.10 → 0.0.11
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/lib/evoker/fullstack.rb +2 -2
- data/lib/evoker/s3cache.rb +7 -11
- data/lib/evoker/version.rb +1 -1
- metadata +2 -2
data/lib/evoker/fullstack.rb
CHANGED
@@ -55,8 +55,8 @@ module Evoker
|
|
55
55
|
build_path = File.expand_path(smart_const_get(:build_path))
|
56
56
|
download_path = File.expand_path(smart_const_get(:download_path))
|
57
57
|
|
58
|
-
mkdir_p build_path unless
|
59
|
-
mkdir_p download_path unless
|
58
|
+
mkdir_p build_path unless File.directory?(build_path)
|
59
|
+
mkdir_p download_path unless File.directory?(download_path)
|
60
60
|
|
61
61
|
tarball_filename = args[:filename] || File.basename(tarball_url)
|
62
62
|
tarball_path = File.join(download_path, tarball_filename)
|
data/lib/evoker/s3cache.rb
CHANGED
@@ -34,8 +34,11 @@ module Evoker
|
|
34
34
|
raise "ERROR: file #{CACHE_TARBALL} already in the bucket."
|
35
35
|
end
|
36
36
|
end
|
37
|
-
|
38
|
-
|
37
|
+
puts "INFO: archiving #{CACHE_TARBALL}"
|
38
|
+
system 'tar', '-czf', CACHE_TARBALL, *Dir.entries('.').reject { |fn|
|
39
|
+
fn == '.' or fn == '..' or
|
40
|
+
fn =~ /#{Regexp.quote(CACHE_BASENAME)}.*\.tgz$/ }
|
41
|
+
puts "INFO: uploading #{CACHE_TARBALL} to #{CACHE_S3_BUCKET}"
|
39
42
|
|
40
43
|
# retry upload 3 times
|
41
44
|
_tries = 0
|
@@ -62,26 +65,19 @@ module Evoker
|
|
62
65
|
bucket = _get_bucket
|
63
66
|
|
64
67
|
if wait > 0
|
65
|
-
|
68
|
+
puts "Waiting for #{CACHE_TARBALL} ..."
|
66
69
|
STDOUT.flush
|
67
70
|
bucket.wait_for(wait) {
|
68
|
-
print '.'
|
69
|
-
STDOUT.flush
|
70
71
|
bucket.files.find { |f| f.key == CACHE_TARBALL }
|
71
72
|
} or raise "Timed out waiting for #{CACHE_TARBALL}"
|
72
|
-
puts " got it."
|
73
73
|
end
|
74
74
|
|
75
|
-
|
76
|
-
STDOUT.flush
|
75
|
+
puts "Downloading #{CACHE_TARBALL} ..."
|
77
76
|
File.open(CACHE_TARBALL, 'w') { |tarball_file|
|
78
77
|
bucket.files.get(CACHE_TARBALL) { |tarball_contents, _, _|
|
79
|
-
print '.'
|
80
|
-
STDOUT.flush
|
81
78
|
tarball_file.write(tarball_contents)
|
82
79
|
}
|
83
80
|
}
|
84
|
-
puts " got it."
|
85
81
|
|
86
82
|
sh "tar -xzf #{CACHE_TARBALL}"
|
87
83
|
end
|
data/lib/evoker/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: evoker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-12-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|