homesick 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog.markdown +9 -0
- data/Rakefile +1 -1
- data/homesick.gemspec +5 -3
- data/lib/homesick.rb +15 -7
- metadata +5 -3
data/ChangeLog.markdown
ADDED
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.1.
|
25
|
+
gem.version = "0.1.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.1.
|
8
|
+
s.version = "0.1.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-03-
|
12
|
+
s.date = %q{2010-03-17}
|
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.
|
@@ -20,12 +20,14 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.email = %q{josh@technicalpickles.com}
|
21
21
|
s.executables = ["homesick"]
|
22
22
|
s.extra_rdoc_files = [
|
23
|
-
"
|
23
|
+
"ChangeLog.markdown",
|
24
|
+
"LICENSE",
|
24
25
|
"README.rdoc"
|
25
26
|
]
|
26
27
|
s.files = [
|
27
28
|
".document",
|
28
29
|
".gitignore",
|
30
|
+
"ChangeLog.markdown",
|
29
31
|
"Gemfile",
|
30
32
|
"LICENSE",
|
31
33
|
"README.rdoc",
|
data/lib/homesick.rb
CHANGED
@@ -41,18 +41,26 @@ class Homesick < Thor
|
|
41
41
|
|
42
42
|
desc "link NAME", "Symlinks all dotfiles from the specified castle"
|
43
43
|
def link(home)
|
44
|
-
|
45
|
-
|
46
|
-
files.each do |path|
|
47
|
-
absolute_path = path.expand_path
|
44
|
+
unless castle_dir(home).exist?
|
45
|
+
say_status :error, "Castle #{home} did not exist in #{repos_dir}", :red
|
48
46
|
|
49
|
-
|
50
|
-
adjusted_path = (user_dir + path).basename
|
47
|
+
exit(1)
|
51
48
|
|
52
|
-
|
49
|
+
else
|
50
|
+
inside castle_dir(home) do
|
51
|
+
files = Pathname.glob('.*').reject{|a| [".",".."].include?(a.to_s)}
|
52
|
+
files.each do |path|
|
53
|
+
absolute_path = path.expand_path
|
54
|
+
|
55
|
+
inside user_dir do
|
56
|
+
adjusted_path = (user_dir + path).basename
|
57
|
+
|
58
|
+
symlink absolute_path, adjusted_path
|
59
|
+
end
|
53
60
|
end
|
54
61
|
end
|
55
62
|
end
|
63
|
+
|
56
64
|
end
|
57
65
|
|
58
66
|
desc "list", "List cloned castles"
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 1
|
9
|
+
version: 0.1.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-03-
|
17
|
+
date: 2010-03-17 00:00:00 -04:00
|
18
18
|
default_executable: homesick
|
19
19
|
dependencies: []
|
20
20
|
|
@@ -25,11 +25,13 @@ executables:
|
|
25
25
|
extensions: []
|
26
26
|
|
27
27
|
extra_rdoc_files:
|
28
|
+
- ChangeLog.markdown
|
28
29
|
- LICENSE
|
29
30
|
- README.rdoc
|
30
31
|
files:
|
31
32
|
- .document
|
32
33
|
- .gitignore
|
34
|
+
- ChangeLog.markdown
|
33
35
|
- Gemfile
|
34
36
|
- LICENSE
|
35
37
|
- README.rdoc
|