constancy 0.1.2 → 0.1.3

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: 1c80016c4198051a92e9fc87518ef47b6ab2f56d
4
- data.tar.gz: 591f9718abdf0ca60ade8605d6edd2090f76cb5a
3
+ metadata.gz: 78a9ec4a5c3040d69fa2d06bcd322ec8aba1739a
4
+ data.tar.gz: 1668506bd3e443405893b8e1e1c082ebcd967d09
5
5
  SHA512:
6
- metadata.gz: cd321e9d53d4b77a547cd1bab5b2d76e396fc42450d9f56c0c1a95872182da06fc55ddb87d4e93ba836caf5533bffab982835bedd043a044a1b2e34a623f5cb0
7
- data.tar.gz: a073ab0349abe809d28a40902ec2cc9c021e3b1612ecd44a94a4ef8e181e8727916269dfcb6d89bc0031822deae8e89d4efb2da2cbf7ff9912ae2bd688979dfa
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
- @local_files ||= Dir["#{self.base_dir}/**/*"].select { |f| File.file?(f) }
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
@@ -1,5 +1,5 @@
1
1
  # This software is public domain. No rights are reserved. See LICENSE for more information.
2
2
 
3
3
  class Constancy
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
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.2
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-03-12 00:00:00.000000000 Z
11
+ date: 2018-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: imperium