homesick 0.4.0 → 0.4.1
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 +4 -0
- data/Rakefile +1 -1
- data/homesick.gemspec +2 -2
- data/lib/homesick.rb +11 -13
- metadata +3 -3
data/ChangeLog.markdown
CHANGED
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.4.
|
|
25
|
+
gem.version = "0.4.1"
|
|
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/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.4.
|
|
8
|
+
s.version = "0.4.1"
|
|
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-04-
|
|
12
|
+
s.date = %q{2010-04-02}
|
|
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.
|
data/lib/homesick.rb
CHANGED
|
@@ -45,27 +45,25 @@ class Homesick < Thor
|
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
desc "symlink NAME", "Symlinks all dotfiles from the specified castle"
|
|
48
|
-
def symlink(
|
|
49
|
-
unless castle_dir(
|
|
50
|
-
say_status :error, "
|
|
48
|
+
def symlink(name)
|
|
49
|
+
unless castle_dir(name).exist?
|
|
50
|
+
say_status :error, "Could not symlink #{name}, expected #{castle_dir(name)} exist and contain dotfiles", :red
|
|
51
51
|
|
|
52
52
|
exit(1)
|
|
53
|
+
end
|
|
53
54
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
absolute_path = path.expand_path
|
|
55
|
+
inside castle_dir(name) do
|
|
56
|
+
files = Pathname.glob('.*').reject{|a| [".",".."].include?(a.to_s)}
|
|
57
|
+
files.each do |path|
|
|
58
|
+
absolute_path = path.expand_path
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
inside home_dir do
|
|
61
|
+
adjusted_path = (home_dir + path).basename
|
|
62
62
|
|
|
63
|
-
|
|
64
|
-
end
|
|
63
|
+
ln_s absolute_path, adjusted_path
|
|
65
64
|
end
|
|
66
65
|
end
|
|
67
66
|
end
|
|
68
|
-
|
|
69
67
|
end
|
|
70
68
|
|
|
71
69
|
desc "list", "List cloned castles"
|
metadata
CHANGED
|
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
|
5
5
|
segments:
|
|
6
6
|
- 0
|
|
7
7
|
- 4
|
|
8
|
-
-
|
|
9
|
-
version: 0.4.
|
|
8
|
+
- 1
|
|
9
|
+
version: 0.4.1
|
|
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-04-
|
|
17
|
+
date: 2010-04-02 00:00:00 -04:00
|
|
18
18
|
default_executable: homesick
|
|
19
19
|
dependencies:
|
|
20
20
|
- !ruby/object:Gem::Dependency
|