easy_sync 0.0.5 → 2.0.0

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.
Files changed (57) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +8 -0
  3. data/.rspec +2 -0
  4. data/.ruby-version +1 -0
  5. data/CHANGELOG.md +85 -0
  6. data/CLAUDE.md +133 -0
  7. data/Gemfile +2 -0
  8. data/README.md +607 -21
  9. data/Rakefile +6 -8
  10. data/bin/easy_sync +8 -1
  11. data/docs/fine-placement.md +174 -0
  12. data/docs/hardware-notes.md +71 -0
  13. data/docs/integrity-scan.md +435 -0
  14. data/docs/parallel-scrub.md +280 -0
  15. data/docs/performance.md +146 -0
  16. data/docs/tripwire.md +232 -0
  17. data/easy_sync.gemspec +25 -16
  18. data/lib/easy_sync/cli.rb +1246 -0
  19. data/lib/easy_sync/config.rb +202 -0
  20. data/lib/easy_sync/error.rb +5 -0
  21. data/lib/easy_sync/jbod/backblaze.rb +113 -0
  22. data/lib/easy_sync/jbod/benchmarker.rb +149 -0
  23. data/lib/easy_sync/jbod/cleaner.rb +93 -0
  24. data/lib/easy_sync/jbod/dashboard.rb +611 -0
  25. data/lib/easy_sync/jbod/keep_awake.rb +33 -0
  26. data/lib/easy_sync/jbod/manifest.rb +1068 -0
  27. data/lib/easy_sync/jbod/mirror.rb +204 -0
  28. data/lib/easy_sync/jbod/models.rb +165 -0
  29. data/lib/easy_sync/jbod/page_cache.rb +56 -0
  30. data/lib/easy_sync/jbod/placement.rb +71 -0
  31. data/lib/easy_sync/jbod/planner.rb +76 -0
  32. data/lib/easy_sync/jbod/purger.rb +161 -0
  33. data/lib/easy_sync/jbod/restorer.rb +142 -0
  34. data/lib/easy_sync/jbod/run_lock.rb +98 -0
  35. data/lib/easy_sync/jbod/run_log.rb +57 -0
  36. data/lib/easy_sync/jbod/runner.rb +615 -0
  37. data/lib/easy_sync/jbod/scrub_pool.rb +136 -0
  38. data/lib/easy_sync/jbod/scrubber.rb +321 -0
  39. data/lib/easy_sync/jbod/share_scan.rb +26 -0
  40. data/lib/easy_sync/jbod/sync_eta.rb +68 -0
  41. data/lib/easy_sync/jbod/tripwire.rb +80 -0
  42. data/lib/easy_sync/jbod/volume_info.rb +283 -0
  43. data/lib/easy_sync/jbod.rb +35 -0
  44. data/lib/easy_sync/shell.rb +62 -0
  45. data/lib/easy_sync/templates/dashboard.html.erb +419 -0
  46. data/lib/easy_sync/version.rb +3 -1
  47. data/lib/easy_sync.rb +7 -3
  48. metadata +84 -45
  49. data/Gemfile.lock +0 -55
  50. data/Guardfile +0 -28
  51. data/lib/easy_sync/rsync.rb +0 -60
  52. data/lib/easy_sync/sync_logger.rb +0 -20
  53. data/lib/easy_sync/sync_runner.rb +0 -44
  54. data/spec/easy_sync/rsync_spec.rb +0 -25
  55. data/spec/easy_sync/sync_runner_spec.rb +0 -54
  56. data/spec/spec_helper.rb +0 -33
  57. data/spec/support.rb +0 -89
data/easy_sync.gemspec CHANGED
@@ -1,26 +1,35 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require 'easy_sync/version'
5
6
 
6
7
  Gem::Specification.new do |spec|
7
- spec.name = "easy_sync"
8
+ spec.name = 'easy_sync'
8
9
  spec.version = EasySync::VERSION
9
- spec.authors = ["Carlos Espejo"]
10
- spec.email = ["carlosespejo@gmail.com"]
11
- spec.summary = %q{Ruby wrapper around rsync to easily create incremental backups.}
12
- #spec.description = %q{TODO: Write a longer description. Optional.}
13
- spec.homepage = "https://github.com/CarlosEspejo/easy_sync"
14
- spec.license = "MIT"
10
+ spec.authors = ['Carlos Espejo']
11
+ spec.email = ['carlosespejo@gmail.com']
12
+ spec.summary = 'Folder-level rsync backups from a NAS onto a set of independent (JBOD) drives.'
13
+ spec.description = 'Mirrors each folder of your NAS shares onto one of several independently mounted ' \
14
+ 'drives, tracks where everything lives in a SQLite manifest with a grace period ' \
15
+ 'before deletions, and writes an HTML status dashboard with SMART health.'
16
+ spec.homepage = 'https://github.com/CarlosEspejo/easy_sync'
17
+ spec.license = 'MIT'
18
+ spec.required_ruby_version = '>= 3.3'
19
+ spec.metadata['changelog_uri'] = 'https://github.com/CarlosEspejo/easy_sync/blob/main/CHANGELOG.md'
20
+ spec.metadata['platform_note'] = 'macOS only (10.13 High Sierra or later): relies on diskutil and caffeinate'
15
21
 
16
- spec.files = `git ls-files -z`.split("\x0")
22
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.start_with?('spec/', 'script/', 'docs/images/') }
17
23
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = ["lib"]
24
+ spec.require_paths = ['lib']
20
25
 
21
- spec.add_development_dependency "bundler", "~> 1.5"
22
- spec.add_development_dependency "rake"
23
- spec.add_development_dependency "guard-minitest"
24
- spec.add_development_dependency "terminal-notifier-guard"
26
+ spec.add_dependency 'sqlite3', '~> 2.9'
27
+ # logger left the standard library in Ruby 4.0 and must be declared explicitly.
28
+ spec.add_dependency 'logger', '~> 1.6'
29
+ # fiddle is a bundled (not default) gem in Ruby 4.0; scrub uses it to evict
30
+ # a file's cached pages before hashing (see Jbod::PageCache).
31
+ spec.add_dependency 'fiddle', '~> 1.1'
25
32
 
33
+ spec.add_development_dependency 'rake', '~> 13.0'
34
+ spec.add_development_dependency 'rspec', '~> 3.13'
26
35
  end