dotsync 0.1.22 → 0.1.23
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 +4 -4
- data/CHANGELOG.md +16 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/dotsync/utils/file_transfer.rb +10 -0
- data/lib/dotsync/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 63f80ee3b4145da856a0750344202adb55eb1d2b8bf2e1da5b8885176aba7eef
|
|
4
|
+
data.tar.gz: ee4e30168d290f6f75d682fee94755b9f34d8e17975f1bd2f6d15936f3f9bd4b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 30d151ca07b1be8b116ebcb7d27f440f9822cfe127b07cf0c13e8c034b23c0a8526d34f87587d208e83082dccf8bc463df3c2a3eaf0965ae949e3d90a974e086
|
|
7
|
+
data.tar.gz: 8be2548a3144cc24765ee59666370d1267d2c96fd0ddb21187da03cf678846085e19d5ef7f1252c2b979e44d9bade730b4fc7d92bfbc04d4e7052df592cd4ca2
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
# 0.1.23
|
|
2
|
+
|
|
3
|
+
**Critical Bug Fix:**
|
|
4
|
+
- Fix cleanup_folder to respect 'only' filter and prevent unintended deletions
|
|
5
|
+
- When force=true was used with an 'only' filter, cleanup_folder was deleting all files in the destination that weren't explicitly ignored, including unrelated folders not being managed by the mapping
|
|
6
|
+
- This caused data loss for folders like cabal/ and ghc/ that weren't in the only list
|
|
7
|
+
- The fix ensures only paths matching the inclusion filter are cleaned up, leaving unmanaged content intact
|
|
8
|
+
|
|
9
|
+
**Test Coverage:**
|
|
10
|
+
- Add comprehensive test coverage for the cleanup_folder bug fix
|
|
11
|
+
- Test preserving unrelated folders when using force + only
|
|
12
|
+
- Test only cleaning managed paths specified in only list
|
|
13
|
+
- Test edge case with empty source and unmanaged dest content
|
|
14
|
+
- Update existing test to reflect correct behavior
|
|
15
|
+
- Total: 326 examples, 0 failures, 2 pending with 96.41% line coverage
|
|
16
|
+
|
|
1
17
|
# 0.1.22
|
|
2
18
|
|
|
3
19
|
**Testing & Quality:**
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Dotsync
|
|
2
2
|
|
|
3
3
|
[](https://rubygems.org/gems/dotsync)
|
|
4
|
-
[](https://github.com/dsaenztagarro/dotsync/actions)
|
|
5
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
6
|
[](https://www.ruby-lang.org/)
|
|
7
7
|
|
|
@@ -144,10 +144,20 @@ module Dotsync
|
|
|
144
144
|
Find.find(target_dir) do |path|
|
|
145
145
|
next if path == target_dir
|
|
146
146
|
abs_path = File.expand_path(path)
|
|
147
|
+
|
|
148
|
+
# Skip if ignored
|
|
147
149
|
if @mapping.ignore?(abs_path)
|
|
148
150
|
Find.prune if File.directory?(path)
|
|
149
151
|
next
|
|
150
152
|
end
|
|
153
|
+
|
|
154
|
+
# When inclusions (only) are specified, only clean up paths that match the inclusion filter
|
|
155
|
+
# This ensures we don't delete unrelated files/folders that aren't being managed
|
|
156
|
+
unless @mapping.include?(abs_path)
|
|
157
|
+
Find.prune if File.directory?(path)
|
|
158
|
+
next
|
|
159
|
+
end
|
|
160
|
+
|
|
151
161
|
if File.file?(path)
|
|
152
162
|
FileUtils.rm(path)
|
|
153
163
|
elsif File.directory?(path) && Dir.empty?(path)
|
data/lib/dotsync/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dotsync
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.23
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- David Sáenz
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-11-
|
|
11
|
+
date: 2025-11-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: toml-rb
|