buckler 1.0.2 → 1.0.3

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: e46db8b2d3494b3c3743d7360c056fcaeea604ee
4
- data.tar.gz: b1e3c73255a6c936f5a2ca4806bff885fe41b8f9
3
+ metadata.gz: f95740d26b18d359c665b59e1013475ee68b25d3
4
+ data.tar.gz: 561dfab056e4fb27fb75329e79279a57b928f901
5
5
  SHA512:
6
- metadata.gz: e289ff7ce40d40b45af09db6223ee4a83da1c07064be784c374947c2f666235174b745d103bb15f594bae96f7f2869cee6c9b125cd164a0edb8a50697c3d1021
7
- data.tar.gz: 836897245241ce7e8eaa25239fe1380fcff090b7f84649ae293a2a2d236fccc3cf9a4257d9cec76ebde914af03aab9b79fa5bd2e2abdc2e5d84e534ef8b8a87c
6
+ metadata.gz: f104e80e480043c6d2ae43a096dbf463d261bd61637190ce4fe6f38ddc2728a59770cf3c33bdbd26fbdf36b798dd1e0c00bc2c235598aa00c48c59ebfff2c816
7
+ data.tar.gz: f1450b60f20bc9beb00b658de1c09303e587e7857ad1ba97e98f04fd9b57d613a5d4230e5532e48e87688e96705fe969c4956e6c11dace22de37d4396ddcd884
@@ -19,7 +19,7 @@ module Buckler
19
19
  end
20
20
 
21
21
  # Attempts to find the AWS Access Key ID and Secret Access Key
22
- # by searching the command line paramters, the environment, the .env, and Heroku in that order.
22
+ # by searching the command line parameters, the environment, the .env, and Heroku in that order.
23
23
  # The parameters are the values of --id and --secret on the command line.
24
24
  # The program ends if credentials cannot be discovered.
25
25
  def self.discover_aws_credentials!(key_id:nil, key:nil)
@@ -6,7 +6,7 @@ module Buckler
6
6
  def initialize
7
7
  @lambda_pool = []
8
8
  @thread_pool = []
9
- @max_threads = Etc.nprocessors * 2 # Twice the number of CPU cores available to Ruby
9
+ @max_threads = Etc.nprocessors # The number of CPU cores available to Ruby
10
10
  end
11
11
 
12
12
  def queue(λ)
@@ -27,9 +27,10 @@ module Buckler
27
27
 
28
28
  start_time = Time.now
29
29
 
30
- @lambda_pool.each do |λ|
30
+ @lambda_pool.lazy.each do |λ|
31
31
  while running_thread_count >= @max_threads
32
32
  verbose "Sleeping due to worker limit. #{running_thread_count} currently running."
33
+ GC.start
33
34
  sleep 0.2
34
35
  end
35
36
  @thread_pool << Thread.new(&λ)
@@ -2,7 +2,7 @@ module Buckler
2
2
 
3
3
  # Returns Buckler’s version number
4
4
  def self.version
5
- Gem::Version.new("1.0.2")
5
+ Gem::Version.new("1.0.3")
6
6
  end
7
7
 
8
8
  # Contains Buckler’s version number
@@ -10,6 +10,7 @@ class SyncBucketsTest < BucklerTest
10
10
 
11
11
  stdout, stderr = run_buckler_command("sync #{source_name} #{target_name} --confirm #{target_name}")
12
12
  assert target_bucket.objects.to_a.many?, "The target bucket should be filled with goodies"
13
+ assert target_bucket.objects.to_a.count.eql?(50), "The target bucket should be filled with goodies"
13
14
  assert target_bucket.objects.first.object.content_type.include?("text/plain"), "Content-Type headers should have synced"
14
15
  assert target_bucket.objects.first.object.cache_control.include?("no-cache"), "Cache-Control headers should have synced"
15
16
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buckler
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Corey Csuhta
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-07 00:00:00.000000000 Z
11
+ date: 2016-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport