constancy 0.1.2 → 0.1.3
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 +4 -4
- data/lib/constancy/sync_target.rb +3 -1
- data/lib/constancy/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78a9ec4a5c3040d69fa2d06bcd322ec8aba1739a
|
4
|
+
data.tar.gz: 1668506bd3e443405893b8e1e1c082ebcd967d09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e6a2749daa8a4531a0d14ba4b3b893a7d067d1e47e64ed40af6796d55b9c0e95a52145337e819a0ed6dbf312dc2c93a431bc6b5fd8330ea6e645a0fc6d1fd49
|
7
|
+
data.tar.gz: 62a3ad2d04c6d73fd711e6f7db1e244a1a651e8a5146ab12dec4c7be8f1e72b6e1bb3cbb5b4fd73eb84fd61caf9857bbd8c35424dd646b0f653463bddfdceb0e
|
@@ -61,7 +61,8 @@ class Constancy
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def local_files
|
64
|
-
|
64
|
+
# see https://stackoverflow.com/questions/357754/can-i-traverse-symlinked-directories-in-ruby-with-a-glob
|
65
|
+
@local_files ||= Dir["#{self.base_dir}/**{,/*/**}/*"].select { |f| File.file?(f) }
|
65
66
|
end
|
66
67
|
|
67
68
|
def local_items
|
@@ -85,6 +86,7 @@ class Constancy
|
|
85
86
|
|
86
87
|
resp = self.consul.get(self.prefix, :recurse, dc: self.datacenter)
|
87
88
|
|
89
|
+
return @remote_items if resp.values.nil?
|
88
90
|
Constancy::Util.flatten_hash(resp.values).each_pair do |key, value|
|
89
91
|
@remote_items[key.join("/")] = (value.nil? ? '' : value)
|
90
92
|
end
|
data/lib/constancy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: constancy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Adams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: imperium
|