Class: Pansophy::ConfigSynchronizer

Inherits:
Object
  • Object
show all
Defined in:
lib/pansophy/config_synchronizer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#config_bucket_nameObject



12
13
14
# File 'lib/pansophy/config_synchronizer.rb', line 12

def config_bucket_name
  @config_bucket_name ||= ENV['CONFIG_BUCKET_NAME']
end

#config_local_folderObject



20
21
22
# File 'lib/pansophy/config_synchronizer.rb', line 20

def config_local_folder
  @config_local_folder ||= (ENV['CONFIG_LOCAL_FOLDER'] || ConfigPath.find!)
end

#config_remote_folderObject



16
17
18
# File 'lib/pansophy/config_synchronizer.rb', line 16

def config_remote_folder
  @config_remote_folder ||= ENV.fetch('CONFIG_REMOTE_FOLDER', 'config')
end

#versionObject



24
25
26
# File 'lib/pansophy/config_synchronizer.rb', line 24

def version
  @version ||= ENV.fetch('CONFIG_VERSION', '1.0')
end

Instance Method Details

#mergeObject



7
8
9
10
# File 'lib/pansophy/config_synchronizer.rb', line 7

def merge
  verify_config_bucket_name!
  Pansophy.merge(config_bucket_name, remote_path, local_path, overwrite: true)
end