docker-registry-sync 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/docker/registry/sync.rb +20 -20
- data/lib/docker/registry/sync/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZWZmODVjYTA2ZmRkZmE3ZjIxMDVkY2IzMGExNDgxOGE2OWMwMzg5ZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjdlMTUwN2Q1YTkxNDEyNDg2NWVkYTY1NTAyMmQyMjhjYTk5NmMyZg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MjUyOGQwMTViZmNmZmY4ZDE2OGM3YjY0YzRlMTVmNDNjMDA5ZGMwOGE2YTg5
|
10
|
+
MzUxY2QwNDFiNWM2OGM3NWJkMTExZDg4ZDY3NmFhZGM0ZjdhY2Q0MGNmMTk1
|
11
|
+
NWJmNDRlM2VmYWZiYTZkYTRhNDkzMDhlMzFiMjcxZDA0ZDVlZmY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Mjg5ZDFmNDYwNGVhNWQyYmYwYTBkNGRhMjc5M2FhZmM2ODg1YmVjMWE4NWZk
|
14
|
+
MWIxMjAwMTAwYjgyNmFjZjRlNjAwNjQwYjg0ZDhjYTFkNjFhYjAyZGFmNDZl
|
15
|
+
OTM1YzQwYzQ3NTRkMDgxMWUyYmNkYWEzOWM4YzIxYWE2ODlmZWE=
|
data/lib/docker/registry/sync.rb
CHANGED
@@ -5,32 +5,32 @@ require 'docker/registry/sync/version'
|
|
5
5
|
module Docker
|
6
6
|
module Registry
|
7
7
|
module Sync
|
8
|
-
class
|
9
|
-
|
8
|
+
class RingBuffer < Array
|
9
|
+
attr_reader :max_size
|
10
10
|
|
11
|
-
def
|
12
|
-
|
13
|
-
|
11
|
+
def initialize(max_size, enum = nil)
|
12
|
+
@max_size = max_size
|
13
|
+
enum.each { |e| self << e } if enum
|
14
14
|
end
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
16
|
+
def <<(el)
|
17
|
+
if self.size < @max_size || @max_size.nil?
|
18
|
+
super
|
19
|
+
else
|
20
|
+
self.shift
|
21
|
+
self.push(el)
|
22
22
|
end
|
23
|
+
end
|
23
24
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
self.push(el)
|
30
|
-
end
|
31
|
-
end
|
25
|
+
alias :push :<<
|
26
|
+
end
|
27
|
+
|
28
|
+
class << self
|
29
|
+
attr_accessor :config
|
32
30
|
|
33
|
-
|
31
|
+
def configure
|
32
|
+
self.config ||= Docker::Registry::Sync::Configuration.new
|
33
|
+
yield self.config
|
34
34
|
end
|
35
35
|
end
|
36
36
|
end
|