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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 44578b9db2dc8322b72700297dd29b692fe8d640
4
- data.tar.gz: 99b49067517d284e74aa463b0430dd9dd421ec94
3
+ metadata.gz: 9a6d31ecb58874ed84892c18bec2a1a5d9a8eb5c
4
+ data.tar.gz: 9f96d6e683abf0b50c90c6e9cb9e5bfb2dfbd86d
5
5
  SHA512:
6
- metadata.gz: 6d7ab975f18b1c882f7d927ed81d7fb2ccd97ed4b45e7cff39ede7da90079316c5a15a21135879a725b3ff0e8335d1bf5434c6be7f8bfc627ac1097d5e8ad261
7
- data.tar.gz: 8185277d98c33556f26c7b52197691206c7b9241a357724e068302458abe5bf4d485feb40c2ad162df790f31ac6c28ba3b35917d592b852ed10e5d6320606c80
6
+ metadata.gz: 96464335d0e7991e29a8117f604fdf3e3dfd94647085fecbb9b3d8accce01b8ab40e9026dcdaca6552ea18fd1d86268b0cd1abbdbe1749ebb1f1b0f5052a306a
7
+ data.tar.gz: 0eaa92fc76ad14f82879f1f5b32e0719166ddb960cea2b7757c44254988f6ac6b6a8ce7149dc9614a340418a4d9b6df4155048071a9459e1464854b4935ec051
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.1.3
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.3 ruby lib
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.3"
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"]
@@ -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
- return last_checkpoint
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 last_checkpoint
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}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: filbunke
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wouter de Bie