Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
093db8bdac | ||
|
|
04602efd6e | ||
|
|
3265de0c1d | ||
|
|
e4a428e0c5 | ||
|
|
6cc28450a4 | ||
|
|
a0c7fbacb7 | ||
|
|
b750094934 | ||
|
|
d953a964cd | ||
|
|
aa95ffac82 |
2
Rakefile
2
Rakefile
@@ -22,7 +22,7 @@ Jeweler::Tasks.new do |gem|
|
|||||||
gem.email = ["josh@technicalpickles.com", "info@muratayusuke.com"]
|
gem.email = ["josh@technicalpickles.com", "info@muratayusuke.com"]
|
||||||
gem.homepage = "http://github.com/technicalpickles/homesick"
|
gem.homepage = "http://github.com/technicalpickles/homesick"
|
||||||
gem.authors = ["Joshua Nichols", "Yusuke Murata"]
|
gem.authors = ["Joshua Nichols", "Yusuke Murata"]
|
||||||
gem.version = "0.9.5"
|
gem.version = "0.9.6"
|
||||||
gem.license = "MIT"
|
gem.license = "MIT"
|
||||||
# Have dependencies? Add them to Gemfile
|
# Have dependencies? Add them to Gemfile
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,11 @@
|
|||||||
|
|
||||||
Gem::Specification.new do |s|
|
Gem::Specification.new do |s|
|
||||||
s.name = "homesick"
|
s.name = "homesick"
|
||||||
s.version = "0.9.5"
|
s.version = "0.9.6"
|
||||||
|
|
||||||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
||||||
s.authors = ["Joshua Nichols", "Yusuke Murata"]
|
s.authors = ["Joshua Nichols", "Yusuke Murata"]
|
||||||
s.date = "2013-09-18"
|
s.date = "2013-10-18"
|
||||||
s.description = "\n A man's home (directory) is his castle, so don't leave home with out it.\n\n 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. \n\n "
|
s.description = "\n A man's home (directory) is his castle, so don't leave home with out it.\n\n 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. \n\n "
|
||||||
s.email = ["josh@technicalpickles.com", "info@muratayusuke.com"]
|
s.email = ["josh@technicalpickles.com", "info@muratayusuke.com"]
|
||||||
s.executables = ["homesick"]
|
s.executables = ["homesick"]
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ class Homesick < Thor
|
|||||||
|
|
||||||
add_runtime_options!
|
add_runtime_options!
|
||||||
|
|
||||||
GITHUB_NAME_REPO_PATTERN = /\A([A-Za-z_-]+\/[A-Za-z_-]+)\Z/
|
GITHUB_NAME_REPO_PATTERN = /\A([A-Za-z0-9_-]+\/[A-Za-z0-9_-]+)\Z/
|
||||||
SUBDIR_FILENAME = '.homesick_subdir'
|
SUBDIR_FILENAME = '.homesick_subdir'
|
||||||
|
|
||||||
DEFAULT_CASTLE_NAME = 'dotfiles'
|
DEFAULT_CASTLE_NAME = 'dotfiles'
|
||||||
@@ -33,7 +33,7 @@ class Homesick < Thor
|
|||||||
|
|
||||||
ln_s uri, destination
|
ln_s uri, destination
|
||||||
elsif uri =~ GITHUB_NAME_REPO_PATTERN
|
elsif uri =~ GITHUB_NAME_REPO_PATTERN
|
||||||
destination = Pathname.new($1)
|
destination = Pathname.new(uri).basename
|
||||||
git_clone "https://github.com/#{$1}.git", :destination => destination
|
git_clone "https://github.com/#{$1}.git", :destination => destination
|
||||||
elsif uri =~ /%r([^%r]*?)(\.git)?\Z/
|
elsif uri =~ /%r([^%r]*?)(\.git)?\Z/
|
||||||
destination = Pathname.new($1)
|
destination = Pathname.new($1)
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ describe 'homesick' do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'should clone a github repo' do
|
it 'should clone a github repo' do
|
||||||
homesick.should_receive(:git_clone).with('https://github.com/wfarr/dotfiles.git', :destination => Pathname.new('wfarr/dotfiles'))
|
homesick.should_receive(:git_clone).with('https://github.com/wfarr/dotfiles.git', :destination => Pathname.new('dotfiles'))
|
||||||
|
|
||||||
homesick.clone 'wfarr/dotfiles'
|
homesick.clone 'wfarr/dotfiles'
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user