filbunke 2.1.3 → 2.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/filbunke.gemspec +2 -2
- data/lib/filbunke/client.rb +11 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a6d31ecb58874ed84892c18bec2a1a5d9a8eb5c
|
4
|
+
data.tar.gz: 9f96d6e683abf0b50c90c6e9cb9e5bfb2dfbd86d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96464335d0e7991e29a8117f604fdf3e3dfd94647085fecbb9b3d8accce01b8ab40e9026dcdaca6552ea18fd1d86268b0cd1abbdbe1749ebb1f1b0f5052a306a
|
7
|
+
data.tar.gz: 0eaa92fc76ad14f82879f1f5b32e0719166ddb960cea2b7757c44254988f6ac6b6a8ce7149dc9614a340418a4d9b6df4155048071a9459e1464854b4935ec051
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.1.
|
1
|
+
2.1.4
|
data/filbunke.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: filbunke 2.1.
|
5
|
+
# stub: filbunke 2.1.4 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "filbunke"
|
9
|
-
s.version = "2.1.
|
9
|
+
s.version = "2.1.4"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
data/lib/filbunke/client.rb
CHANGED
@@ -27,7 +27,16 @@ module Filbunke
|
|
27
27
|
updated_files = updates["files"] || []
|
28
28
|
new_checkpoint = updates["checkpoint"]
|
29
29
|
if updated_files.empty?
|
30
|
-
|
30
|
+
if updates.key?("files")
|
31
|
+
return begin
|
32
|
+
fetch_remote_last_checkpoint
|
33
|
+
rescue => e
|
34
|
+
@logger.warn "Failed to fetch remote last_checkpoint #{@repository.name} will fall back to local last_checkpoint=#{last_checkpoint}"
|
35
|
+
last_checkpoint
|
36
|
+
end
|
37
|
+
else
|
38
|
+
return last_checkpoint
|
39
|
+
end
|
31
40
|
end
|
32
41
|
@logger.info "Updating repository: #{@repository.name}: #{updated_files.size} files. Checkpoint: #{last_checkpoint} ==> #{new_checkpoint}"
|
33
42
|
|
@@ -150,7 +159,7 @@ module Filbunke
|
|
150
159
|
end
|
151
160
|
end
|
152
161
|
|
153
|
-
def
|
162
|
+
def fetch_remote_last_checkpoint
|
154
163
|
last_checkpoint_http = Net::HTTP.new(@repository.host, @repository.port)
|
155
164
|
last_checkpoint_http.start do |http|
|
156
165
|
last_checkpoint_path = "/#{UPDATES_ACTION}/#{@repository.name}/#{LAST_CHECKPOINT_ACTION}"
|