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



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

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

#config_local_folderObject



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

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

#config_remote_folderObject



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

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

#versionObject



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

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

Instance Method Details

#mergeObject



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

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