process_settings 0.4.0.pre.8 → 0.4.0.pre.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a040e14386ae60b985247adceac4712bed11ee76
|
4
|
+
data.tar.gz: 0cfc7cb17b53ae8f6797df32a5bd3101a2bfe115
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c080c469216c8dd05c7c2c4e800d0a2d39fe57effce522938367649ca7184be0f68a18a9bf55d32261f53060173530eb72c9059459c72d3b5581291ffffbdbc
|
7
|
+
data.tar.gz: c1e12594b33113fb60b292033154d91bd335a121e621df5ddf8254ae3b7240c8e80d2bb653cbd59ca12d4da49f77ec81483581490fe7f803e1f6eb9d251cdce2
|
@@ -21,9 +21,7 @@ module ProcessSettings
|
|
21
21
|
validate_source_version_is_not_older(source_file_path, destination_file_path)
|
22
22
|
|
23
23
|
if source_version_is_newer?(source_file_path, destination_file_path)
|
24
|
-
FileUtils.
|
25
|
-
elsif source_file_path != destination_file_path # make sure we're not deleting destination file
|
26
|
-
FileUtils.rm_f(source_file_path) # clean up, remove left over file
|
24
|
+
FileUtils.cp(source_file_path, destination_file_path)
|
27
25
|
end
|
28
26
|
end
|
29
27
|
|
@@ -46,8 +44,6 @@ module ProcessSettings
|
|
46
44
|
destination_version = ProcessSettings::TargetedSettings.from_file(destination_file_path, only_meta: true).version
|
47
45
|
|
48
46
|
if source_version.to_f < destination_version.to_f
|
49
|
-
FileUtils.rm_f(source_file_path) # clean up, remove left over file
|
50
|
-
|
51
47
|
raise SourceVersionOlderError,
|
52
48
|
"source file '#{source_file_path}' is version #{source_version}"\
|
53
49
|
" and destination file '#{destination_file_path}' is version #{destination_version}"
|