s3reamer 0.0.8 → 0.1.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ceae6bbd64b45a286dc01e9f75f7bbaf8025283c
4
- data.tar.gz: 520e722421712bdf2b259b756106261797afe33b
3
+ metadata.gz: e6f0593f24a14fd6163a7744ff8b6015b5e6d59a
4
+ data.tar.gz: 1f6c213e26106cf2ccb9384ef699abd5f9241af2
5
5
  SHA512:
6
- metadata.gz: c286d862fb0b049154b06dbf257ea0fb23b38cba13e7b7efbbcf89833184a223265e4d49d06b939f224610ce0899238a4566bec5eb0fbf745d995f4aac781afd
7
- data.tar.gz: fc7233b32cc9c778e0dd82b181a56aee88c753a581d5d92a7163f89f0c6ca42b2f55c36e0eb4e3471d23ff6a89d2320b1df602796af0f7105226afc5b3ae8543
6
+ metadata.gz: 6c9443a70228074e22ca5bea54305774b6df5fa7e183a105e61e6e786b3446efae38f0f35b10c83f2148d71d70af960e540d3821ac726d6f2d8a9bad6ff1aa57
7
+ data.tar.gz: d6d87d79bd7e37e0b773e9d95031ae4b460fbb7b63a83b3d81536e34554f2907da3bcd691bc6b400ef0bcbfefed7ba0f8a85215706f887d23a1e37e0a5163aa8
@@ -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
@@ -1,3 +1,3 @@
1
1
  module S3reamer
2
- VERSION = '0.0.8'
2
+ VERSION = '0.1.0'
3
3
  end
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.8
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-03-20 00:00:00.000000000 Z
11
+ date: 2016-12-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake