flexdot 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +0 -5
- data/.github/workflows/test.yml +0 -1
- data/CHANGELOG.md +1 -68
- data/Gemfile +0 -1
- data/README.md +1 -1
- data/flexdot.gemspec +3 -1
- data/lib/flexdot.rb +2 -0
- data/lib/flexdot/backup.rb +9 -0
- data/lib/flexdot/installer.rb +2 -0
- data/lib/flexdot/version.rb +1 -1
- metadata +22 -9
- data/.github/FUNDING.yml +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d1b112b651204f8ce82ddad718e2b6673e7c0d898704b7e43aea5328040c869
|
4
|
+
data.tar.gz: 917fb9ffe2100da70b42dc5f96666104bea4f603aa71026e2aaaa497f5e220e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9718bc11bcc0181d8803b91fc62f54d515cdb52b49aa8629239ffe841eac8f7edc867bcbaae547648c1ffbe3a0f2334628eabc3cd40c8c4e71b03c4e56c8a1a3
|
7
|
+
data.tar.gz: '08e880cd0f2e81ad725b2057dcfb50fac18a6c1fa93b72e41d6f453a1d33883b3fcb25d68252f187f6fbaa966640c2dfac2b044f52a677dc8f045f609bfa7d2b'
|
data/.github/dependabot.yml
CHANGED
data/.github/workflows/test.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,68 +1 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
### Breaking Changes
|
4
|
-
|
5
|
-
Revert 'Add default_index option #2'. Please follow the instructions below to migrate:
|
6
|
-
|
7
|
-
First, modify your Rakefile as follows:
|
8
|
-
|
9
|
-
```diff
|
10
|
-
require 'flexdot'
|
11
|
-
|
12
|
-
Flexdot.setup(
|
13
|
-
+ home_dir: '..'
|
14
|
-
- home_dir: '..',
|
15
|
-
- default_index: 'macOS'
|
16
|
-
)
|
17
|
-
|
18
|
-
+ task default: 'install:macOS'
|
19
|
-
```
|
20
|
-
|
21
|
-
Then, update flexdot:
|
22
|
-
|
23
|
-
```
|
24
|
-
$ bundle update flexdot
|
25
|
-
```
|
26
|
-
|
27
|
-
Now you can run the following command to install the default index dotfiles:
|
28
|
-
|
29
|
-
```
|
30
|
-
$ rake
|
31
|
-
```
|
32
|
-
|
33
|
-
## 2.0.0
|
34
|
-
|
35
|
-
### Breaking Changes
|
36
|
-
|
37
|
-
- Change the syntax of configuration in the `Rakefile`
|
38
|
-
|
39
|
-
### Enchancements
|
40
|
-
|
41
|
-
- Add `default_index` option fixes #2
|
42
|
-
- Option renaming and simplification by default value
|
43
|
-
|
44
|
-
### Migrating from v1.0.x
|
45
|
-
|
46
|
-
First, you need to rewrite the `Rakefile` configuration to the v2.0.0 syntax.
|
47
|
-
|
48
|
-
```ruby
|
49
|
-
# v1.0.x
|
50
|
-
Flexdot.install_tasks(
|
51
|
-
target_dir: '/home/username',
|
52
|
-
base_dir: '.'
|
53
|
-
)
|
54
|
-
```
|
55
|
-
|
56
|
-
```ruby
|
57
|
-
# v2.0.0
|
58
|
-
Flexdot.setup(
|
59
|
-
home_dir: '/home/username',
|
60
|
-
dotfiles_dir: '.'
|
61
|
-
)
|
62
|
-
```
|
63
|
-
|
64
|
-
Note that If the `dotfiles_dir` option is `'.'` (current directory) , you can omit it.
|
65
|
-
|
66
|
-
Then, update flexdot to v2.0.0 and you're done.
|
67
|
-
|
68
|
-
$ bundle update flexdot
|
1
|
+
Please see [the release page](https://github.com/hidakatsuya/flexdot/releases).
|
data/Gemfile
CHANGED
data/README.md
CHANGED
data/flexdot.gemspec
CHANGED
@@ -10,10 +10,12 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.description = 'Flexdot is a Flexible and Rake based dotfile manager'
|
11
11
|
spec.homepage = 'https://github.com/hidakatsuya/flexdot'
|
12
12
|
spec.license = 'MIT'
|
13
|
-
spec.required_ruby_version = Gem::Requirement.new('>= 2.
|
13
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.6.0')
|
14
14
|
|
15
15
|
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
16
16
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test)/}) }
|
17
17
|
end
|
18
18
|
spec.require_paths = ['lib']
|
19
|
+
|
20
|
+
spec.add_dependency 'rake', '>= 12.0'
|
19
21
|
end
|
data/lib/flexdot.rb
CHANGED
data/lib/flexdot/backup.rb
CHANGED
@@ -7,6 +7,8 @@ module Flexdot
|
|
7
7
|
class Backup
|
8
8
|
BASE_DIR = 'backup'
|
9
9
|
|
10
|
+
class AlreadyFinishedError < StandardError; end
|
11
|
+
|
10
12
|
class << self
|
11
13
|
def clear_all
|
12
14
|
base_dir.glob('*').each(&:rmtree)
|
@@ -19,12 +21,19 @@ module Flexdot
|
|
19
21
|
|
20
22
|
def initialize
|
21
23
|
backup_dir.mkpath unless backup_dir.exist?
|
24
|
+
@finished = false
|
22
25
|
end
|
23
26
|
|
24
27
|
def call(file)
|
28
|
+
raise AlreadyFinishedError if @finished
|
25
29
|
FileUtils.mv(file, backup_dir)
|
26
30
|
end
|
27
31
|
|
32
|
+
def finish!
|
33
|
+
backup_dir.delete if backup_dir.empty?
|
34
|
+
@finished = true
|
35
|
+
end
|
36
|
+
|
28
37
|
private
|
29
38
|
|
30
39
|
def backup_dir
|
data/lib/flexdot/installer.rb
CHANGED
data/lib/flexdot/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flexdot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Katsuya Hidaka
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
12
|
-
dependencies:
|
11
|
+
date: 2021-07-18 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rake
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '12.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '12.0'
|
13
27
|
description: Flexdot is a Flexible and Rake based dotfile manager
|
14
28
|
email:
|
15
29
|
- hidakatsuya@gmail.com
|
@@ -17,7 +31,6 @@ executables: []
|
|
17
31
|
extensions: []
|
18
32
|
extra_rdoc_files: []
|
19
33
|
files:
|
20
|
-
- ".github/FUNDING.yml"
|
21
34
|
- ".github/dependabot.yml"
|
22
35
|
- ".github/workflows/test.yml"
|
23
36
|
- ".gitignore"
|
@@ -39,7 +52,7 @@ homepage: https://github.com/hidakatsuya/flexdot
|
|
39
52
|
licenses:
|
40
53
|
- MIT
|
41
54
|
metadata: {}
|
42
|
-
post_install_message:
|
55
|
+
post_install_message:
|
43
56
|
rdoc_options: []
|
44
57
|
require_paths:
|
45
58
|
- lib
|
@@ -47,15 +60,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
47
60
|
requirements:
|
48
61
|
- - ">="
|
49
62
|
- !ruby/object:Gem::Version
|
50
|
-
version: 2.
|
63
|
+
version: 2.6.0
|
51
64
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
52
65
|
requirements:
|
53
66
|
- - ">="
|
54
67
|
- !ruby/object:Gem::Version
|
55
68
|
version: '0'
|
56
69
|
requirements: []
|
57
|
-
rubygems_version: 3.
|
58
|
-
signing_key:
|
70
|
+
rubygems_version: 3.2.22
|
71
|
+
signing_key:
|
59
72
|
specification_version: 4
|
60
73
|
summary: A Flexible and Rake based dotfile manager
|
61
74
|
test_files: []
|
data/.github/FUNDING.yml
DELETED