pansophy 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pansophy/config_synchronizer.rb +3 -3
- data/lib/pansophy/tasks.rb +10 -7
- data/lib/pansophy/version.rb +1 -1
- 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: 4900011b0b5962c58a95a1a937b98791b77b12c8
|
4
|
+
data.tar.gz: 92eace172be8f4e81be0d9d05e42358fd5fc4e34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6526dfe0db2e2d780239ae86d1f0f8b7bab32afe840e0b4ff98834a5007d62085ec29ee5f50cab58ce83ceb03e663d2a0dade9376862588a755f9d76f42c113
|
7
|
+
data.tar.gz: fc79be8e24959dab9df4d6d7061c96c83fd0738efea30f9096321eff907e92bdd5c25ef819f06d7d5e1875636a62da4dfff571beb716f538b1a51d11bde5dc8e
|
@@ -3,7 +3,7 @@ require 'facets/kernel/blank'
|
|
3
3
|
|
4
4
|
module Pansophy
|
5
5
|
class ConfigSynchronizer
|
6
|
-
|
6
|
+
attr_writer :config_bucket_name, :config_remote_folder, :config_local_folder, :version
|
7
7
|
|
8
8
|
def merge
|
9
9
|
puts "Fetching remote configuration (version #{VERSION})"
|
@@ -12,8 +12,6 @@ module Pansophy
|
|
12
12
|
puts 'done'
|
13
13
|
end
|
14
14
|
|
15
|
-
private
|
16
|
-
|
17
15
|
def config_bucket_name
|
18
16
|
@config_bucket_name ||= ENV['CONFIG_BUCKET_NAME']
|
19
17
|
end
|
@@ -30,6 +28,8 @@ module Pansophy
|
|
30
28
|
@version ||= (ENV['CONFIG_VERSION'] || '1.0')
|
31
29
|
end
|
32
30
|
|
31
|
+
private
|
32
|
+
|
33
33
|
def remote_path
|
34
34
|
Pathname.new(config_remote_folder).join(version.to_s).to_s
|
35
35
|
end
|
data/lib/pansophy/tasks.rb
CHANGED
@@ -1,9 +1,12 @@
|
|
1
|
-
namespace :
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
namespace :pansophy do
|
2
|
+
namespace :config do
|
3
|
+
desc 'Synchronize config files from remote folder'
|
4
|
+
task :synchronize do
|
5
|
+
require 'pansophy/config_synchronizer'
|
6
|
+
synchronizer = Pansophy::ConfigSynchronizer.new
|
7
|
+
puts "Fetching remote configuration (version #{synchronizer.version})"
|
8
|
+
synchronizer.merge
|
9
|
+
puts done
|
10
|
+
end
|
8
11
|
end
|
9
12
|
end
|
data/lib/pansophy/version.rb
CHANGED