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_name=(value) ⇒ Object

Sets the attribute config_bucket_name

Parameters:

  • value

    the value to set the attribute config_bucket_name to.



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

def config_bucket_name=(value)
  @config_bucket_name = value
end

#config_local_folder=(value) ⇒ Object

Sets the attribute config_local_folder

Parameters:

  • value

    the value to set the attribute config_local_folder to.



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

def config_local_folder=(value)
  @config_local_folder = value
end

#config_remote_folder=(value) ⇒ Object

Sets the attribute config_remote_folder

Parameters:

  • value

    the value to set the attribute config_remote_folder to.



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

def config_remote_folder=(value)
  @config_remote_folder = value
end

#version=(value) ⇒ Object

Sets the attribute version

Parameters:

  • value

    the value to set the attribute version to.



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

def version=(value)
  @version = value
end

Instance Method Details

#mergeObject



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

def merge
  puts "Fetching remote configuration (version #{VERSION})"
  verify_config_bucket_name!
  Pansophy.merge(config_bucket_name, remote_path, local_path, overwrite: true)
  puts 'done'
end