dotlayer 0.2.1 → 0.2.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/README.md +10 -0
- data/lib/dotlayer/cli.rb +5 -5
- data/lib/dotlayer/commands/doctor.rb +5 -1
- data/lib/dotlayer/config.rb +1 -1
- data/lib/dotlayer/detector.rb +1 -1
- data/lib/dotlayer/resolver.rb +0 -2
- data/lib/dotlayer/stow.rb +1 -1
- data/lib/dotlayer.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: b0489157f2a066cbd4729f51ad5dff3800e75c0144061ea85f49cd4005bcb297
|
|
4
|
+
data.tar.gz: 21e4467266812d237318d0ca70aab7491ae3e87dcf95d66dd2db1c85c74a5e65
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8062c90a687287e5f0e1e2205064f537be913f5e6a91f844d3d3cdc994d280eeb14428f808ebd2e5e268bd2f01ff603f1be431bbcac2abcff0ff77d5d20eb58b
|
|
7
|
+
data.tar.gz: 6bcc1d1000022e64bda327a7a60a15b65bf77b2c4e394a6077482204bdb2a7ae46911f2502d5e95f50c1c30f65cf1388dc6ee5296aa364f3bbeb4011c92fc60b
|
data/README.md
CHANGED
|
@@ -266,6 +266,16 @@ dotlayer adopt --dry-run ~/.config/lazygit config
|
|
|
266
266
|
|
|
267
267
|
The last argument is always the package name. Dotlayer finds the first repo containing that package, or falls back to the first repo for new packages.
|
|
268
268
|
|
|
269
|
+
## Development
|
|
270
|
+
|
|
271
|
+
```sh
|
|
272
|
+
bundle exec rake test # run tests
|
|
273
|
+
bundle exec standardrb # lint
|
|
274
|
+
bundle exec rubycritic lib/ # code quality report
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
See [Contributing](CONTRIBUTING.md) for full setup, testing, and contribution guidelines.
|
|
278
|
+
|
|
269
279
|
## Documentation
|
|
270
280
|
|
|
271
281
|
- [Architecture](docs/architecture.md) — system design, data flow, and class responsibilities
|
data/lib/dotlayer/cli.rb
CHANGED
|
@@ -13,11 +13,11 @@ module Dotlayer
|
|
|
13
13
|
config = Config.new(options[:config])
|
|
14
14
|
|
|
15
15
|
case command
|
|
16
|
-
when "status"
|
|
16
|
+
when "status" then Commands::Status.new(config:).run
|
|
17
17
|
when "install" then Commands::Install.new(config:, dry_run: options[:dry_run], verbose: options[:verbose]).run
|
|
18
|
-
when "update"
|
|
19
|
-
when "doctor"
|
|
20
|
-
when "adopt"
|
|
18
|
+
when "update" then Commands::Update.new(config:, dry_run: options[:dry_run], verbose: options[:verbose]).run
|
|
19
|
+
when "doctor" then Commands::Doctor.new(config:).run
|
|
20
|
+
when "adopt" then run_adopt(config:, argv:, options:)
|
|
21
21
|
when "version"
|
|
22
22
|
puts "dotlayer #{VERSION}"
|
|
23
23
|
else
|
|
@@ -28,7 +28,7 @@ module Dotlayer
|
|
|
28
28
|
private
|
|
29
29
|
|
|
30
30
|
def parse_global_options(argv)
|
|
31
|
-
options = {
|
|
31
|
+
options = {dry_run: false, verbose: false, config: nil, private: false}
|
|
32
32
|
|
|
33
33
|
OptionParser.new do |opts|
|
|
34
34
|
opts.on("-c", "--config PATH", "Config file path") { |v| options[:config] = v }
|
|
@@ -72,7 +72,11 @@ module Dotlayer
|
|
|
72
72
|
else
|
|
73
73
|
warning "#{broken.size} found"
|
|
74
74
|
broken.each do |link|
|
|
75
|
-
target =
|
|
75
|
+
target = begin
|
|
76
|
+
File.readlink(link)
|
|
77
|
+
rescue
|
|
78
|
+
"(deleted)"
|
|
79
|
+
end
|
|
76
80
|
@issues << "Broken symlink: #{link} -> #{target}"
|
|
77
81
|
end
|
|
78
82
|
end
|
data/lib/dotlayer/config.rb
CHANGED
|
@@ -23,7 +23,7 @@ module Dotlayer
|
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
def repos
|
|
26
|
-
@repos ||= @data.fetch("repos", [{
|
|
26
|
+
@repos ||= @data.fetch("repos", [{"path" => "~/.public_dotfiles"}]).filter_map do |entry|
|
|
27
27
|
path = entry["path"]&.to_s
|
|
28
28
|
next if path.nil? || path.empty?
|
|
29
29
|
|
data/lib/dotlayer/detector.rb
CHANGED
data/lib/dotlayer/resolver.rb
CHANGED
data/lib/dotlayer/stow.rb
CHANGED
data/lib/dotlayer.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dotlayer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Douglas Andrade
|
|
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '0'
|
|
55
55
|
requirements: []
|
|
56
|
-
rubygems_version: 4.0.
|
|
56
|
+
rubygems_version: 4.0.8
|
|
57
57
|
specification_version: 4
|
|
58
58
|
summary: Layered dotfiles management with GNU Stow
|
|
59
59
|
test_files: []
|