Method: ArtifactTools::ConfigFile#append_file
- Defined in:
- lib/artifact_tools/config_file.rb
#append_file(file:, store_path: nil, **opts) ⇒ Object
Note:
If file exists in the config with key store_path then its properties will be merged, where new ones will have priority.
Append file to configuration.
52 53 54 55 56 57 58 59 60 61 |
# File 'lib/artifact_tools/config_file.rb', line 52 def append_file(file:, store_path: nil, **opts) store_path ||= file # Convert symbols to String opts = hash_keys_to_strings(opts) @config['files'] ||= {} @config['files'][store_path] = opts @config['files'][store_path]['hash'] ||= file_hash(file) end |