evoker 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -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 Dir.exists?(build_path)
59
- mkdir_p download_path unless Dir.exists?(download_path)
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)
@@ -34,8 +34,11 @@ module Evoker
34
34
  raise "ERROR: file #{CACHE_TARBALL} already in the bucket."
35
35
  end
36
36
  end
37
- sh "tar -czf #{CACHE_TARBALL} --exclude '#{CACHE_BASENAME}*.tgz' ."
38
- puts "INFO: uploading #{CACHE_TARBALL} to #{CACHE_S3_BUCKET}..."
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
- print "Waiting for #{CACHE_TARBALL} .."
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
- print "Downloading #{CACHE_TARBALL} .."
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
@@ -8,7 +8,7 @@ module Evoker
8
8
  MINOR = 0
9
9
 
10
10
  # Tiny version number
11
- TINY = 10
11
+ TINY = 11
12
12
 
13
13
  # Full version number as string
14
14
  STRING = [MAJOR, MINOR, TINY].join('.')
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.10
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-07-08 00:00:00.000000000 Z
12
+ date: 2012-12-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake