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 +4 -4
- data/lib/buckler/aws.rb +1 -1
- data/lib/buckler/thread_dispatch.rb +3 -2
- data/lib/buckler/version.rb +1 -1
- data/test/integration/sync_buckets_test.rb +1 -0
- 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: f95740d26b18d359c665b59e1013475ee68b25d3
|
4
|
+
data.tar.gz: 561dfab056e4fb27fb75329e79279a57b928f901
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f104e80e480043c6d2ae43a096dbf463d261bd61637190ce4fe6f38ddc2728a59770cf3c33bdbd26fbdf36b798dd1e0c00bc2c235598aa00c48c59ebfff2c816
|
7
|
+
data.tar.gz: f1450b60f20bc9beb00b658de1c09303e587e7857ad1ba97e98f04fd9b57d613a5d4230e5532e48e87688e96705fe969c4956e6c11dace22de37d4396ddcd884
|
data/lib/buckler/aws.rb
CHANGED
@@ -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
|
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
|
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(&λ)
|
data/lib/buckler/version.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2016-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|