astrails-safe 0.0.9 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/astrails/safe/engine.rb +1 -2
- data/safe.gemspec +1 -1
- metadata +1 -1
data/lib/astrails/safe/engine.rb
CHANGED
@@ -115,12 +115,11 @@ module Astrails
|
|
115
115
|
base = File.basename(filename).split(".").first
|
116
116
|
|
117
117
|
puts "listing files in #{bucket}:#{s3_prefix}"
|
118
|
-
files = AWS::S3::Bucket.objects(bucket, :prefix => s3_prefix, :max_keys => keep * 2)
|
118
|
+
files = AWS::S3::Bucket.objects(bucket, :prefix => "#{s3_prefix}/#{base}", :max_keys => keep * 2)
|
119
119
|
puts files.collect {|x| x.key} if $_VERBOSE
|
120
120
|
|
121
121
|
files = files.
|
122
122
|
collect {|x| x.key}.
|
123
|
-
select{|f| File.basename(f)[0..(base.length - 1)] == base}.
|
124
123
|
sort
|
125
124
|
|
126
125
|
cleanup_files(files, keep) do |f|
|
data/safe.gemspec
CHANGED