bootsnap 1.1.6.beta2 → 1.1.6.beta3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 269514b76977fe302e8e8bed9059ead9a2c9cf28
4
- data.tar.gz: a66fd4b75f0b4fb211b998ded43f87aa31edc8b4
3
+ metadata.gz: 003a19644d8dac109753f80603c992ca0ab787fe
4
+ data.tar.gz: dbc75695231d5e968f6bf3f29cc3e75ada7c9148
5
5
  SHA512:
6
- metadata.gz: e3651625736c73f66e3380c5ca1514769707d5d605541a6f636c9fbb563cc2b3199bfc5baa26130106a158f02f66485bdd606f7db5ee47914e451a7ff4337f0d
7
- data.tar.gz: e0ba55c3d695a8d91b4ba2aa0ca120ba530c7a665e66a882b8f1e966e846639399e5ea49cecc08aec7ba36b1329b08c84140e20f3aa34efa2902e4b35ebc0681
6
+ metadata.gz: de875383c5e274a5ae044ca4c8b44d53c97cbfebfeb9c9a9f375068d750e2ce00447ca4cf3a5165287b1ddabc22275c7ac9b064cd29eaa56c363ba47588ddbf5
7
+ data.tar.gz: d437f735ba246721eaf979dbed81f5c66ac958ec7abe6331ed3ce9a92d0af8000afa05a9308f4ec69dc8e9c7fcdebc4711d673b0b211145d0a6be6d201f4d4c0
@@ -586,7 +586,7 @@ bs_fetch(char * path, VALUE path_v, char * cache_path, VALUE handler)
586
586
  struct bs_cache_key cached_key, current_key;
587
587
  char * contents = NULL;
588
588
  int cache_fd = -1, current_fd = -1;
589
- int res, valid_cache, exception_tag = 0;
589
+ int res, valid_cache = 0, exception_tag = 0;
590
590
  char * errno_provenance = NULL;
591
591
 
592
592
  VALUE input_data; /* data read from source file, e.g. YAML or ruby source */
@@ -601,11 +601,15 @@ bs_fetch(char * path, VALUE path_v, char * cache_path, VALUE handler)
601
601
 
602
602
  /* Open the cache key if it exists, and read its cache key in */
603
603
  cache_fd = open_cache_file(cache_path, &cached_key, &errno_provenance);
604
- if (cache_fd < 0 && cache_fd != CACHE_MISSING_OR_INVALID) goto fail_errno;
605
-
606
- /* True if the cache existed and no invalidating changes have occurred since
607
- * it was generated. */
608
- valid_cache = cache_key_equal(&current_key, &cached_key);
604
+ if (cache_fd == CACHE_MISSING_OR_INVALID) {
605
+ /* This is ok: valid_cache remains false, we re-populate it. */
606
+ } else if (cache_fd < 0) {
607
+ goto fail_errno;
608
+ } else {
609
+ /* True if the cache existed and no invalidating changes have occurred since
610
+ * it was generated. */
611
+ valid_cache = cache_key_equal(&current_key, &cached_key);
612
+ }
609
613
 
610
614
  if (valid_cache) {
611
615
  /* Fetch the cache data and return it if we're able to load it successfully */
@@ -1,3 +1,3 @@
1
1
  module Bootsnap
2
- VERSION = "1.1.6.beta2"
2
+ VERSION = "1.1.6.beta3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootsnap
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6.beta2
4
+ version: 1.1.6.beta3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Burke Libbey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-07 00:00:00.000000000 Z
11
+ date: 2017-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler