dotsync 0.4.1 → 0.4.2
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/AGENTS.md +27 -93
- data/CHANGELOG.md +7 -0
- data/lib/dotsync/actions/pull_action.rb +1 -0
- data/lib/dotsync/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9518c58d4295da09d14d43ec60643bf6dd93ddf447d47b5e941e1817cf3a7569
|
|
4
|
+
data.tar.gz: a1effa3db0429cad4816db2128c3afd045d3b2e01dd7e80a12ddfd314974f704
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c48aec258167adfcbb5d2d00f7e5126a264e38a7635c4055d317529ad50d35e45eb62a2b93ce0c5722f858d5ed100aa8a82733f053f6ff5e973387e3df6b7976
|
|
7
|
+
data.tar.gz: 80e316f48c64029624276a6bb4da2b906a76093d0b6e55531cb397bdcb2e3b4e7a0969c228992ad611505b0c125e573849f87f1728c950dab30b29d59a8467b7
|
data/AGENTS.md
CHANGED
|
@@ -1,93 +1,27 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
**
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
**
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
- When adding new actions or utilities
|
|
29
|
-
- When test coverage is insufficient
|
|
30
|
-
- When refactoring existing code
|
|
31
|
-
|
|
32
|
-
**Focus areas**:
|
|
33
|
-
- Unit tests for models (Mapping, Diff)
|
|
34
|
-
- Integration tests for actions (PullAction, PushAction, WatchAction)
|
|
35
|
-
- Edge cases and error scenarios
|
|
36
|
-
- File system operations
|
|
37
|
-
|
|
38
|
-
### Documentation Agent
|
|
39
|
-
|
|
40
|
-
**Purpose**: Maintain and improve project documentation.
|
|
41
|
-
|
|
42
|
-
**When to use**:
|
|
43
|
-
- After adding new features
|
|
44
|
-
- When configuration options change
|
|
45
|
-
- When updating usage examples
|
|
46
|
-
|
|
47
|
-
**Responsibilities**:
|
|
48
|
-
- Keep README.md synchronized with code
|
|
49
|
-
- Update inline code documentation
|
|
50
|
-
- Maintain CHANGELOG.md
|
|
51
|
-
- Generate usage examples
|
|
52
|
-
|
|
53
|
-
## Maintenance Agents
|
|
54
|
-
|
|
55
|
-
### Dependency Update Agent
|
|
56
|
-
|
|
57
|
-
**Purpose**: Monitor and suggest updates for gem dependencies.
|
|
58
|
-
|
|
59
|
-
**What it monitors**:
|
|
60
|
-
- Security vulnerabilities in dependencies
|
|
61
|
-
- New versions of runtime and development dependencies
|
|
62
|
-
- Ruby version compatibility
|
|
63
|
-
|
|
64
|
-
### Release Agent
|
|
65
|
-
|
|
66
|
-
**Purpose**: Assist with the release process following RELEASING.md guidelines.
|
|
67
|
-
|
|
68
|
-
**Checklist**:
|
|
69
|
-
- Version number updated in version.rb
|
|
70
|
-
- CHANGELOG.md updated with changes
|
|
71
|
-
- Tests passing
|
|
72
|
-
- RuboCop compliance
|
|
73
|
-
- Tag creation and push
|
|
74
|
-
- Gem publication to rubygems.org
|
|
75
|
-
|
|
76
|
-
## Usage
|
|
77
|
-
|
|
78
|
-
To work with these agents effectively:
|
|
79
|
-
|
|
80
|
-
1. **Be specific**: Provide clear context about what you're working on
|
|
81
|
-
2. **Reference files**: Point to specific files or line numbers when discussing issues
|
|
82
|
-
3. **Run tests**: Always run `rake spec` after changes
|
|
83
|
-
4. **Follow conventions**: Adhere to existing code patterns and Ruby style guide
|
|
84
|
-
|
|
85
|
-
## Contributing
|
|
86
|
-
|
|
87
|
-
When working with agents on this project:
|
|
88
|
-
|
|
89
|
-
- Review generated code carefully before committing
|
|
90
|
-
- Ensure all tests pass (`rake spec`)
|
|
91
|
-
- Run RuboCop (`bundle exec rubocop`)
|
|
92
|
-
- Update documentation as needed
|
|
93
|
-
- Follow the project's [Code of Conduct](CODE_OF_CONDUCT.md)
|
|
1
|
+
# Coding Agent Guidelines
|
|
2
|
+
|
|
3
|
+
## Commands
|
|
4
|
+
- Run all tests: `rake spec` or `bundle exec rspec`
|
|
5
|
+
- Run single test: `bundle exec rspec spec/path/to/file_spec.rb` or `bundle exec rspec spec/path/to/file_spec.rb:42`
|
|
6
|
+
- Lint: `bundle exec rubocop` (auto-fix: `bundle exec rubocop -a`)
|
|
7
|
+
- Build gem: `rake build`
|
|
8
|
+
|
|
9
|
+
## Code Style
|
|
10
|
+
- **Ruby version**: >= 3.2.0
|
|
11
|
+
- **Frozen string literal**: Always include `# frozen_string_literal: true` at top of files
|
|
12
|
+
- **Indentation**: 2 spaces, no tabs
|
|
13
|
+
- **Strings**: Double quotes (`"string"`)
|
|
14
|
+
- **Hash syntax**: Modern style (`{ a: 1 }`)
|
|
15
|
+
- **Method definitions**: Always use parentheses for methods with parameters
|
|
16
|
+
- **Spacing**: Space after colons, commas, around operators; `foo { bar }` not `foo {bar}`
|
|
17
|
+
|
|
18
|
+
## Project Structure
|
|
19
|
+
- Actions: `lib/dotsync/actions/` - Core operations (PullAction, PushAction, WatchAction)
|
|
20
|
+
- Config: `lib/dotsync/config/` - Configuration management with XDG support
|
|
21
|
+
- Models: `lib/dotsync/models/` - Domain models (Mapping, Diff)
|
|
22
|
+
- Utils: `lib/dotsync/utils/` - Helpers (FileTransfer, DirectoryDiffer, Logger, PathUtils)
|
|
23
|
+
- Tests: `spec/` - RSpec tests mirroring lib structure
|
|
24
|
+
|
|
25
|
+
## Error Handling
|
|
26
|
+
- Use custom errors from `lib/dotsync/errors.rb`: `ConfigError`, `FileTransferError`, `PermissionError`, `DiskFullError`, `SymlinkError`, `TypeConflictError`
|
|
27
|
+
- Always use `raise ErrorClass, "message"` for explicit error handling
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [0.4.2] - 2026-03-22
|
|
2
|
+
|
|
3
|
+
### Fixed
|
|
4
|
+
|
|
5
|
+
- Fix `cp_r_regular_files` crash on pre-existing symlinks during backup (#35)
|
|
6
|
+
- Add `FileUtils.rm_f` before `FileUtils.ln_s` to handle leftover symlinks from partial backup runs
|
|
7
|
+
|
|
1
8
|
## [0.4.1] - 2026-03-17
|
|
2
9
|
|
|
3
10
|
### Fixed
|
|
@@ -76,6 +76,7 @@ module Dotsync
|
|
|
76
76
|
src_entry = File.join(src, entry)
|
|
77
77
|
dest_entry = File.join(dest, entry)
|
|
78
78
|
if File.symlink?(src_entry)
|
|
79
|
+
FileUtils.rm_f(dest_entry)
|
|
79
80
|
FileUtils.ln_s(File.readlink(src_entry), dest_entry)
|
|
80
81
|
elsif File.directory?(src_entry)
|
|
81
82
|
cp_r_regular_files(src_entry, dest_entry)
|
data/lib/dotsync/version.rb
CHANGED