5 Commits

Author SHA1 Message Date
Joshua Nichols
39c5142ee7 Regenerated gemspec for version 0.1.1 2010-03-17 11:46:09 -04:00
Joshua Nichols
a7d2dfebb3 Version bump to 0.1.1, and added ChangeLog. 2010-03-17 11:45:50 -04:00
Joshua Nichols
8add88a1dc Make sure castle dir exists before trying to link from it, preventing empty dirs from being created. 2010-03-17 11:38:03 -04:00
Martinos
c6a517e100 Correcting listing of dotfiles in home directory 2010-03-13 12:42:50 -05:00
Joshua Nichols
863567382a Fixed summary + description. 2010-03-10 15:23:08 -05:00
4 changed files with 95 additions and 10 deletions

9
ChangeLog.markdown Normal file
View File

@@ -0,0 +1,9 @@
# 0.1.1
* Fixed trying to link against castles that don't exist
* Fixed linking, which tries to exclude . and .. from the list of files to
link (thanks Martinos)
# 0.1.0
* Initial release

View File

@@ -12,16 +12,22 @@ require 'rake'
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "homesick"
gem.summary = %Q{TODO: one-line summary of your gem}
gem.description = %Q{TODO: longer description of your gem}
gem.summary = %Q{A man's home is his castle. Never leave your dotfiles behind.}
gem.description = %Q{
A mans home (directory) is his castle, so dont leave home with out it.
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.
}
gem.email = "josh@technicalpickles.com"
gem.homepage = "http://github.com/technicalpickles/homesick"
gem.authors = ["Joshua Nichols"]
gem.version = "0.1.0"
gem.version = "0.1.1"
# Have dependencies? Add them to Gemfile
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
end
Jeweler::GemcutterTasks.new
require 'spec/rake/spectask'

62
homesick.gemspec Normal file
View File

@@ -0,0 +1,62 @@
# Generated by jeweler
# DO NOT EDIT THIS FILE DIRECTLY
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
# -*- encoding: utf-8 -*-
Gem::Specification.new do |s|
s.name = %q{homesick}
s.version = "0.1.1"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Joshua Nichols"]
s.date = %q{2010-03-17}
s.default_executable = %q{homesick}
s.description = %q{
A mans home (directory) is his castle, so dont leave home with out it.
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.
}
s.email = %q{josh@technicalpickles.com}
s.executables = ["homesick"]
s.extra_rdoc_files = [
"ChangeLog.markdown",
"LICENSE",
"README.rdoc"
]
s.files = [
".document",
".gitignore",
"ChangeLog.markdown",
"Gemfile",
"LICENSE",
"README.rdoc",
"Rakefile",
"bin/homesick",
"homesick.gemspec",
"lib/homesick.rb",
"spec/homesick/homesick_spec.rb",
"spec/spec.opts",
"spec/spec_helper.rb"
]
s.homepage = %q{http://github.com/technicalpickles/homesick}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.6}
s.summary = %q{A man's home is his castle. Never leave your dotfiles behind.}
s.test_files = [
"spec/homesick/homesick_spec.rb",
"spec/spec_helper.rb"
]
if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 3
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
else
end
else
end
end

View File

@@ -41,8 +41,14 @@ class Homesick < Thor
desc "link NAME", "Symlinks all dotfiles from the specified castle"
def link(home)
unless castle_dir(home).exist?
say_status :error, "Castle #{home} did not exist in #{repos_dir}", :red
exit(1)
else
inside castle_dir(home) do
files = Pathname.glob('.*')[2..-1] # skip . and .., ie the first two
files = Pathname.glob('.*').reject{|a| [".",".."].include?(a.to_s)}
files.each do |path|
absolute_path = path.expand_path
@@ -55,6 +61,8 @@ class Homesick < Thor
end
end
end
desc "list", "List cloned castles"
def list
inside repos_dir do