docker-registry-sync 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Yzk0MDU5OGZmNWUzODRlMDY3N2Q3OTQ3YWIyYTU1NjMzOTI5NGEyNg==
4
+ ZTU5NDJkNzRlZTY2OTA5MDc4ZTYxZTE5ZjAyYThlZDlmODY3YzFjNQ==
5
5
  data.tar.gz: !binary |-
6
- MjdlZTNjNGY3YTdlYWY2ZTdmNmNjZTkxMTJlMjJmMDg0YWQ4ZDE3OA==
6
+ N2NmNjE0MDFiMDVkYTA0NzE0OGNhNWU5MWU0Njg1N2MzYTlmMDBlMQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NGY0M2M4MTUzMjZiOTUwNzgzYTg5NDMwNWI4NDM2ODk4YWQzMTcwNTYxYjhi
10
- MDNhZjE0M2MyYzI3NDY0Njk2NDlhZjM1YzgyZjNhZjE2YTVlNzQ5NzNhYzNk
11
- ZWI3M2JmZDk2YTc5OWMxZGZlZTU0OWFkYzcxZjE4MDhlYzBjNTE=
9
+ NDA0OTg5N2ZjY2I4YjE5MWI2NmZhMWVlNzMwYjg0NzFmOTI2YjRiYTBkYTZi
10
+ NGMzM2M0YzJmNzUyMDU1YWE3YzQ5MjkyNjUxNzU3MDIyNDNmMzYyMTE1ZmJh
11
+ MzQ4MGMxNDIzMTI1MGFjNzkwNWM1YTRiMGQwYjgyNjViMDY0YWM=
12
12
  data.tar.gz: !binary |-
13
- ZGVjZDc3ZjVjMWJlMmE1MWMyOWE5MTNiYTNlYTViZDFmMjU5NWFhOWMyMmUx
14
- YjQ5N2JiYzZmNDQ5ZDQ5ZGI3ODllYjE0NjYxZjJkZmY4ZmEwMjVmZGRkN2Y5
15
- NGRkNDdiYzM5YzExMTcwMThmOGQ2MDM3ODM0YjAwMjA4ZTYyOTk=
13
+ MTM2ZWU3NDUyZWNhMjExYzg5ZDc3M2RiZGRlMzZmOTczM2NmODRlZDAyYWJl
14
+ M2VjOGE1ZTFjMmNiYjY3NTIxZmM4NTI5ZTA2M2FiZjJhMzdhZmExMGI3Y2Vl
15
+ ZjY3ZDBmODRiZTM2YzgwMzQ4MTM2NjIxMTg0YzlmZGEzYzE4NjM=
@@ -101,6 +101,7 @@ module Docker
101
101
  keys.each do |key|
102
102
  @config.logger.info "Syncing key #{source_bucket}/#{key} to bucket #{target_bucket}"
103
103
  opts = {acl: 'bucket-owner-full-control',
104
+ region: target_client.get_bucket_location(bucket: target_bucket).location_constraint,
104
105
  bucket: target_bucket,
105
106
  key: key,
106
107
  copy_source: "#{source_bucket}/#{key}"}
@@ -136,8 +137,8 @@ module Docker
136
137
  @threads[t_index].join unless @threads[t_index].nil?
137
138
  @threads[t_index] = Thread.new do
138
139
  @config.logger.info "Worker syncing key: #{opts[:key]}"
139
- region = target_client.get_bucket_location(bucket: target_bucket).location_constraint
140
- target_client = Aws::S3::Client.new(region: region)
140
+ target_client = Aws::S3::Client.new(region: opts[:region])
141
+ opts.delete :region
141
142
  success = false
142
143
  begin
143
144
  target_client.copy_object(opts)
@@ -1,7 +1,7 @@
1
1
  module Docker
2
2
  module Registry
3
3
  module Sync
4
- VERSION = '0.2.1'
4
+ VERSION = '0.2.2'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docker-registry-sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Oldfield