s3reamer 0.0.8 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/s3reamer +5 -0
- data/lib/s3reamer/directory_streamer.rb +7 -1
- data/lib/s3reamer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6f0593f24a14fd6163a7744ff8b6015b5e6d59a
|
4
|
+
data.tar.gz: 1f6c213e26106cf2ccb9384ef699abd5f9241af2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c9443a70228074e22ca5bea54305774b6df5fa7e183a105e61e6e786b3446efae38f0f35b10c83f2148d71d70af960e540d3821ac726d6f2d8a9bad6ff1aa57
|
7
|
+
data.tar.gz: d6d87d79bd7e37e0b773e9d95031ae4b460fbb7b63a83b3d81536e34554f2907da3bcd691bc6b400ef0bcbfefed7ba0f8a85215706f887d23a1e37e0a5163aa8
|
data/bin/s3reamer
CHANGED
@@ -16,10 +16,15 @@ options = {
|
|
16
16
|
credentials_file: ENV['HOME'] + '/.aws/credentials',
|
17
17
|
credentials_profile: 'default',
|
18
18
|
prefix: '',
|
19
|
+
filters: [],
|
19
20
|
log_file: STDOUT
|
20
21
|
}
|
21
22
|
opts = OptionParser.new do |opts|
|
22
23
|
opts.banner = banner
|
24
|
+
|
25
|
+
opts.on("--filter [FILE_GLOB]") do |v|
|
26
|
+
options[:filters].push(v)
|
27
|
+
end
|
23
28
|
|
24
29
|
opts.on("-r", "--region [AWS_REGION]") do |v|
|
25
30
|
options[:region] = v
|
@@ -16,7 +16,8 @@ module S3reamer
|
|
16
16
|
reader_sleep_interval: 1,
|
17
17
|
reader_timeout: 10,
|
18
18
|
encryption_key: nil,
|
19
|
-
log_file: STDOUT
|
19
|
+
log_file: STDOUT,
|
20
|
+
filters: []
|
20
21
|
}
|
21
22
|
|
22
23
|
attr_reader :options
|
@@ -45,6 +46,11 @@ module S3reamer
|
|
45
46
|
# If this is an "open" event, we should only process it if we haven't
|
46
47
|
# already started on this file.
|
47
48
|
next if e.flags.include?(:open) and file_statuses.include?(filename)
|
49
|
+
|
50
|
+
if options[:filters].any? && options[:filters].none? { |x| File.fnmatch(x, filename) }
|
51
|
+
log.debug "Skipping event for file not matching filters: #{filename}"
|
52
|
+
next
|
53
|
+
end
|
48
54
|
|
49
55
|
# If this is a "close" event, we should update the status to inform the
|
50
56
|
# worker thread
|
data/lib/s3reamer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: s3reamer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Mullins
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|