homesick 0.2.0 → 0.3.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.
- data/ChangeLog.markdown +6 -1
- data/{README.rdoc → README.markdown} +9 -6
- data/Rakefile +1 -1
- data/bin/homesick +1 -1
- data/homesick.gemspec +4 -4
- data/lib/homesick.rb +3 -3
- data/lib/homesick/actions.rb +7 -1
- metadata +5 -5
data/ChangeLog.markdown
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
# 3.0.0
|
2
|
+
|
3
|
+
* Renamed 'link' to 'symlink'
|
4
|
+
* Fixed conflict resolution when symlink destination exists and is a normal file
|
5
|
+
|
1
6
|
# 2.0.0
|
2
7
|
|
3
8
|
* Better support for recognizing git urls (thanks jacobat!)
|
@@ -12,6 +17,6 @@
|
|
12
17
|
* Fixed linking, which tries to exclude . and .. from the list of files to
|
13
18
|
link (thanks Martinos!)
|
14
19
|
|
15
|
-
|
20
|
+
# 0.1.0
|
16
21
|
|
17
22
|
* Initial release
|
@@ -1,14 +1,13 @@
|
|
1
|
-
|
1
|
+
# homesick
|
2
2
|
|
3
3
|
A man's home (directory) is his castle, so don't leave home with out it.
|
4
4
|
|
5
|
-
Homesick is sorta like rip, but for dotfiles. It uses git to clone a repository containing dotfiles, and saves them in
|
5
|
+
Homesick is sorta like rip, but for dotfiles. It uses git to clone a repository containing dotfiles, and saves them in `~/.homesick`. It then allows you to symlink all the dotfiles into place with a single command.
|
6
6
|
|
7
7
|
We call a repository that is compatible with homesick to be a 'castle'. To act as a castle, a repository must be organized like so:
|
8
8
|
|
9
9
|
* Contains a 'home' directory
|
10
10
|
* 'home' contains any number of files and directories that begin with '.'
|
11
|
-
* Optionally has a README file
|
12
11
|
|
13
12
|
To get started, install homesick first:
|
14
13
|
|
@@ -24,13 +23,17 @@ Alternatively, if it's on github, there's a slightly shorter way:
|
|
24
23
|
|
25
24
|
With the castle cloned, you can now link its contents into your home dir:
|
26
25
|
|
27
|
-
homesick
|
26
|
+
homesick symlink pickled-vim
|
28
27
|
|
29
28
|
If you're not sure what castles you have around, you can easily list them:
|
30
29
|
|
31
30
|
homesick list
|
32
31
|
|
33
|
-
|
32
|
+
Not sure what else homesick has up its sleeve? There's always the built in help:
|
33
|
+
|
34
|
+
homesick help
|
35
|
+
|
36
|
+
## Note on Patches/Pull Requests
|
34
37
|
|
35
38
|
* Fork the project.
|
36
39
|
* Make your feature addition or bug fix.
|
@@ -38,6 +41,6 @@ If you're not sure what castles you have around, you can easily list them:
|
|
38
41
|
* Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
39
42
|
* Send me a pull request. Bonus points for topic branches.
|
40
43
|
|
41
|
-
|
44
|
+
## Copyright
|
42
45
|
|
43
46
|
Copyright (c) 2010 Joshua Nichols. See LICENSE for details.
|
data/Rakefile
CHANGED
@@ -22,7 +22,7 @@ Jeweler::Tasks.new do |gem|
|
|
22
22
|
gem.email = "josh@technicalpickles.com"
|
23
23
|
gem.homepage = "http://github.com/technicalpickles/homesick"
|
24
24
|
gem.authors = ["Joshua Nichols"]
|
25
|
-
gem.version = "0.
|
25
|
+
gem.version = "0.3.0"
|
26
26
|
# Have dependencies? Add them to Gemfile
|
27
27
|
|
28
28
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
data/bin/homesick
CHANGED
data/homesick.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{homesick}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.3.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Joshua Nichols"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-04-01}
|
13
13
|
s.default_executable = %q{homesick}
|
14
14
|
s.description = %q{
|
15
15
|
A man’s home (directory) is his castle, so don’t leave home with out it.
|
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.extra_rdoc_files = [
|
23
23
|
"ChangeLog.markdown",
|
24
24
|
"LICENSE",
|
25
|
-
"README.
|
25
|
+
"README.markdown"
|
26
26
|
]
|
27
27
|
s.files = [
|
28
28
|
".document",
|
@@ -30,7 +30,7 @@ Gem::Specification.new do |s|
|
|
30
30
|
"ChangeLog.markdown",
|
31
31
|
"Gemfile",
|
32
32
|
"LICENSE",
|
33
|
-
"README.
|
33
|
+
"README.markdown",
|
34
34
|
"Rakefile",
|
35
35
|
"bin/homesick",
|
36
36
|
"homesick.gemspec",
|
data/lib/homesick.rb
CHANGED
@@ -28,8 +28,8 @@ class Homesick < Thor
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
-
desc "
|
32
|
-
def
|
31
|
+
desc "symlink NAME", "Symlinks all dotfiles from the specified castle"
|
32
|
+
def symlink(home)
|
33
33
|
unless castle_dir(home).exist?
|
34
34
|
say_status :error, "Castle #{home} did not exist in #{repos_dir}", :red
|
35
35
|
|
@@ -44,7 +44,7 @@ class Homesick < Thor
|
|
44
44
|
inside user_dir do
|
45
45
|
adjusted_path = (user_dir + path).basename
|
46
46
|
|
47
|
-
|
47
|
+
ln_s absolute_path, adjusted_path
|
48
48
|
end
|
49
49
|
end
|
50
50
|
end
|
data/lib/homesick/actions.rb
CHANGED
@@ -18,7 +18,7 @@ class Homesick
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
def
|
21
|
+
def ln_s(source, destination, config = {})
|
22
22
|
destination = Pathname.new(destination)
|
23
23
|
|
24
24
|
if destination.symlink?
|
@@ -31,6 +31,12 @@ class Homesick
|
|
31
31
|
system "ln -sf #{source} #{destination}" unless options[:pretend]
|
32
32
|
end
|
33
33
|
end
|
34
|
+
elsif destination.exist?
|
35
|
+
say_status :conflict, "#{destination} exists", :red unless options[:quiet]
|
36
|
+
|
37
|
+
if shell.file_collision(destination) { source }
|
38
|
+
system "ln -sf #{source} #{destination}" unless options[:pretend]
|
39
|
+
end
|
34
40
|
else
|
35
41
|
say_status :symlink, "#{source.expand_path} to #{destination.expand_path}", :green unless options[:quiet]
|
36
42
|
system "ln -s #{source} #{destination}" unless options[:pretend]
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
7
|
+
- 3
|
8
8
|
- 0
|
9
|
-
version: 0.
|
9
|
+
version: 0.3.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Joshua Nichols
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-04-01 00:00:00 -04:00
|
18
18
|
default_executable: homesick
|
19
19
|
dependencies: []
|
20
20
|
|
@@ -27,14 +27,14 @@ extensions: []
|
|
27
27
|
extra_rdoc_files:
|
28
28
|
- ChangeLog.markdown
|
29
29
|
- LICENSE
|
30
|
-
- README.
|
30
|
+
- README.markdown
|
31
31
|
files:
|
32
32
|
- .document
|
33
33
|
- .gitignore
|
34
34
|
- ChangeLog.markdown
|
35
35
|
- Gemfile
|
36
36
|
- LICENSE
|
37
|
-
- README.
|
37
|
+
- README.markdown
|
38
38
|
- Rakefile
|
39
39
|
- bin/homesick
|
40
40
|
- homesick.gemspec
|