webload-client 0.6.0 → 0.7.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
  SHA256:
3
- metadata.gz: 81452597c108df71cd684c565a272f4a3ec9215aa1f9cc5decf36591cfe3cef4
4
- data.tar.gz: d582357f3da85745df08dc930555735941d409979985436737caf63316acd5a9
3
+ metadata.gz: 2825a26a604ca96bd49eacd186816351aacb40e7344973abb5554a17e981c1c8
4
+ data.tar.gz: 44888ddc23a122c35074efd4e98e1f86fd4fb432e4d60573ef0cd1389012f147
5
5
  SHA512:
6
- metadata.gz: 6574b3326da1c285cc4c9a857f919c4171aed71c743f4b3525d426ee3e44cbc29e4402d25eee822c44306a8ba824d8578bd712dcbf9e55b7126a758f967618b0
7
- data.tar.gz: 85bbc7e3c1dbe0735be40002c4fc054657dae3b4627f8582cf514620c0fad57fa3aab3375c21af80e026901ce6aee99189ea5cb67a73836a89ef677953da3961
6
+ metadata.gz: 1cc9610fb0a577caa716b0a906ad30dacee5dba8c51a09c0120a80d07f441f5091edf927932dcb6a492f0427bed449726f056ab8a1761ace010ca775d510af24
7
+ data.tar.gz: e1f118c4c1e97618e2d5ea167e8cdffa856244c51d247928318b3e8ff5c093d219331657ca5eca12145bdc37672c7de90abd67bd161934e6d86c812bf7d5c169
data/Gemfile.lock CHANGED
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- webload-client (0.6.0)
4
+ webload-client (0.7.0)
5
5
  aws-sdk-sqs
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
10
  aws-eventstream (1.0.1)
11
- aws-partitions (1.140.0)
11
+ aws-partitions (1.142.0)
12
12
  aws-sdk-core (3.46.2)
13
13
  aws-eventstream (~> 1.0)
14
14
  aws-partitions (~> 1.0)
@@ -29,6 +29,10 @@ module Webload
29
29
  options.batch = v.to_i
30
30
  end
31
31
 
32
+ opts.on("-i", "--ignore IGNORE", "a CSV list of patterns to ignore") do |v|
33
+ options.ignore = v.split(',')
34
+ end
35
+
32
36
  opts.separator ""
33
37
 
34
38
  opts.on_tail("-v", "--verbose", "Run verbosely") do |v|
@@ -1,5 +1,5 @@
1
1
  module Webload
2
2
  module Client
3
- VERSION = "0.6.0"
3
+ VERSION = "0.7.0"
4
4
  end
5
5
  end
@@ -27,6 +27,8 @@ module Webload
27
27
  time = Time.now
28
28
  match = line.match(/"GET (.*?) HTTP/)
29
29
  next if match.nil?
30
+ next if $options.ignore.inject(false) {|v, p| v = true if match.include?(p);v}
31
+
30
32
  uri = match.captures.first
31
33
  request = URI.join($options.url, uri)
32
34
  message = JSON.dump(url: request.to_s)
@@ -35,8 +37,8 @@ module Webload
35
37
  entries << {id: entries.size.to_s, message_body: message}
36
38
  if entries.size == $options.batch
37
39
  $client.send_message_batch(queue_url: $queue, entries: entries)
38
- entries = []
39
40
  $logger.debug('Batch messages sent to SQS')
41
+ entries = []
40
42
  end
41
43
  else
42
44
  $logger.warn('Rate limit exceeded')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webload-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Breinlinger
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-25 00:00:00.000000000 Z
11
+ date: 2019-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler