homesick 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,6 @@
1
+ # 0.9.1
2
+ * Fixed small bugs: #35, #40
3
+
1
4
  # 0.9.0
2
5
  * Introduce .homesick_subdir #39
3
6
 
data/Rakefile CHANGED
@@ -22,7 +22,7 @@ Jeweler::Tasks.new do |gem|
22
22
  gem.email = ["josh@technicalpickles.com", "info@muratayusuke.com"]
23
23
  gem.homepage = "http://github.com/technicalpickles/homesick"
24
24
  gem.authors = ["Joshua Nichols", "Yusuke Murata"]
25
- gem.version = "0.9.0"
25
+ gem.version = "0.9.1"
26
26
  gem.license = "MIT"
27
27
  # Have dependencies? Add them to Gemfile
28
28
 
@@ -4,15 +4,20 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = "homesick"
8
- s.version = "0.9.0"
7
+ s.name = %q{homesick}
8
+ s.version = "0.9.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Joshua Nichols", "Yusuke Murata"]
12
- s.date = "2013-06-06"
13
- 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 "
14
- s.email = ["josh@technicalpickles.com", "info@muratayusuke.com"]
15
- s.executables = ["homesick"]
11
+ s.authors = [%q{Joshua Nichols}, %q{Yusuke Murata}]
12
+ s.date = %q{2013-06-17}
13
+ s.description = %q{
14
+ A man's home (directory) is his castle, so don't leave home with out it.
15
+
16
+ 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.
17
+
18
+ }
19
+ s.email = [%q{josh@technicalpickles.com}, %q{info@muratayusuke.com}]
20
+ s.executables = [%q{homesick}]
16
21
  s.extra_rdoc_files = [
17
22
  "ChangeLog.markdown",
18
23
  "LICENSE",
@@ -37,11 +42,11 @@ Gem::Specification.new do |s|
37
42
  "spec/spec.opts",
38
43
  "spec/spec_helper.rb"
39
44
  ]
40
- s.homepage = "http://github.com/technicalpickles/homesick"
41
- s.licenses = ["MIT"]
42
- s.require_paths = ["lib"]
43
- s.rubygems_version = "1.8.25"
44
- s.summary = "A man's home is his castle. Never leave your dotfiles behind."
45
+ s.homepage = %q{http://github.com/technicalpickles/homesick}
46
+ s.licenses = [%q{MIT}]
47
+ s.require_paths = [%q{lib}]
48
+ s.rubygems_version = %q{1.8.5}
49
+ s.summary = %q{A man's home is his castle. Never leave your dotfiles behind.}
45
50
 
46
51
  if s.respond_to? :specification_version then
47
52
  s.specification_version = 3
@@ -3,10 +3,7 @@ class Homesick
3
3
  # TODO move this to be more like thor's template, empty_directory, etc
4
4
  def git_clone(repo, config = {})
5
5
  config ||= {}
6
- destination = config[:destination] || begin
7
- repo =~ /([^\/]+)(?:\.git)?$/
8
- $1
9
- end
6
+ destination = config[:destination] || File.basename(repo, '.git')
10
7
 
11
8
  destination = Pathname.new(destination) unless destination.kind_of?(Pathname)
12
9
  FileUtils.mkdir_p destination.dirname
@@ -109,6 +106,7 @@ class Homesick
109
106
  say_status :conflict, "#{destination} exists", :red unless options[:quiet]
110
107
 
111
108
  if options[:force] || shell.file_collision(destination) { source }
109
+ system "rm -rf #{destination}" unless options[:pretend]
112
110
  system "ln -sf #{source} #{destination}" unless options[:pretend]
113
111
  end
114
112
  else
@@ -39,6 +39,14 @@ describe "homesick" do
39
39
  end
40
40
  end
41
41
 
42
+ it "should clone git repo like file:///path/to.git" do
43
+ bare_repo = File.join(create_construct.to_s, "dotfiles.git")
44
+ system "git init --bare #{bare_repo} >/dev/null 2>&1"
45
+
46
+ homesick.clone "file://#{bare_repo}"
47
+ File.directory?(File.join(home.to_s, '.homesick/repos/dotfiles')).should be_true
48
+ end
49
+
42
50
  it "should clone git repo like git://host/path/to.git" do
43
51
  homesick.should_receive(:git_clone).with('git://github.com/technicalpickles/pickled-vim.git')
44
52
 
@@ -119,6 +127,17 @@ describe "homesick" do
119
127
 
120
128
  existing_dotdir_link.readlink.should == dotdir
121
129
  end
130
+
131
+ it "can override existing directory" do
132
+ somewhere_else = create_construct
133
+ existing_dotdir = home.directory(".vim")
134
+
135
+ dotdir = castle.directory(".vim")
136
+
137
+ homesick.symlink("glencairn")
138
+
139
+ existing_dotdir.readlink.should == dotdir
140
+ end
122
141
  end
123
142
 
124
143
  context "with '.config' in .homesick_subdir" do
metadata CHANGED
@@ -1,144 +1,141 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: homesick
3
- version: !ruby/object:Gem::Version
4
- version: 0.9.0
3
+ version: !ruby/object:Gem::Version
4
+ hash: 57
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 9
9
+ - 1
10
+ version: 0.9.1
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Joshua Nichols
9
14
  - Yusuke Murata
10
15
  autorequire:
11
16
  bindir: bin
12
17
  cert_chain: []
13
- date: 2013-06-06 00:00:00.000000000 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: thor
17
- requirement: !ruby/object:Gem::Requirement
18
- none: false
19
- requirements:
20
- - - ! '>='
21
- - !ruby/object:Gem::Version
22
- version: 0.14.0
23
- type: :runtime
18
+
19
+ date: 2013-06-17 00:00:00 Z
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
24
22
  prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
23
+ type: :runtime
24
+ requirement: &id001 !ruby/object:Gem::Requirement
26
25
  none: false
27
- requirements:
28
- - - ! '>='
29
- - !ruby/object:Gem::Version
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 39
30
+ segments:
31
+ - 0
32
+ - 14
33
+ - 0
30
34
  version: 0.14.0
31
- - !ruby/object:Gem::Dependency
32
- name: rake
33
- requirement: !ruby/object:Gem::Requirement
34
- none: false
35
- requirements:
36
- - - ! '>='
37
- - !ruby/object:Gem::Version
38
- version: 0.8.7
39
- type: :development
35
+ name: thor
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
40
38
  prerelease: false
41
- version_requirements: !ruby/object:Gem::Requirement
39
+ type: :development
40
+ requirement: &id002 !ruby/object:Gem::Requirement
42
41
  none: false
43
- requirements:
44
- - - ! '>='
45
- - !ruby/object:Gem::Version
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ hash: 49
46
+ segments:
47
+ - 0
48
+ - 8
49
+ - 7
46
50
  version: 0.8.7
47
- - !ruby/object:Gem::Dependency
48
- name: rspec
49
- requirement: !ruby/object:Gem::Requirement
50
- none: false
51
- requirements:
52
- - - ~>
53
- - !ruby/object:Gem::Version
54
- version: '2.10'
55
- type: :development
51
+ name: rake
52
+ version_requirements: *id002
53
+ - !ruby/object:Gem::Dependency
56
54
  prerelease: false
57
- version_requirements: !ruby/object:Gem::Requirement
55
+ type: :development
56
+ requirement: &id003 !ruby/object:Gem::Requirement
58
57
  none: false
59
- requirements:
58
+ requirements:
60
59
  - - ~>
61
- - !ruby/object:Gem::Version
62
- version: '2.10'
63
- - !ruby/object:Gem::Dependency
64
- name: jeweler
65
- requirement: !ruby/object:Gem::Requirement
60
+ - !ruby/object:Gem::Version
61
+ hash: 23
62
+ segments:
63
+ - 2
64
+ - 10
65
+ version: "2.10"
66
+ name: rspec
67
+ version_requirements: *id003
68
+ - !ruby/object:Gem::Dependency
69
+ prerelease: false
70
+ type: :development
71
+ requirement: &id004 !ruby/object:Gem::Requirement
66
72
  none: false
67
- requirements:
68
- - - ! '>='
69
- - !ruby/object:Gem::Version
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ hash: 11
77
+ segments:
78
+ - 1
79
+ - 6
80
+ - 2
70
81
  version: 1.6.2
71
- type: :development
82
+ name: jeweler
83
+ version_requirements: *id004
84
+ - !ruby/object:Gem::Dependency
72
85
  prerelease: false
73
- version_requirements: !ruby/object:Gem::Requirement
86
+ type: :development
87
+ requirement: &id005 !ruby/object:Gem::Requirement
74
88
  none: false
75
- requirements:
76
- - - ! '>='
77
- - !ruby/object:Gem::Version
78
- version: 1.6.2
79
- - !ruby/object:Gem::Dependency
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ hash: 3
93
+ segments:
94
+ - 0
95
+ version: "0"
80
96
  name: rcov
81
- requirement: !ruby/object:Gem::Requirement
82
- none: false
83
- requirements:
84
- - - ! '>='
85
- - !ruby/object:Gem::Version
86
- version: '0'
87
- type: :development
97
+ version_requirements: *id005
98
+ - !ruby/object:Gem::Dependency
88
99
  prerelease: false
89
- version_requirements: !ruby/object:Gem::Requirement
100
+ type: :development
101
+ requirement: &id006 !ruby/object:Gem::Requirement
90
102
  none: false
91
- requirements:
92
- - - ! '>='
93
- - !ruby/object:Gem::Version
94
- version: '0'
95
- - !ruby/object:Gem::Dependency
103
+ requirements:
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ hash: 3
107
+ segments:
108
+ - 0
109
+ version: "0"
96
110
  name: simplecov
97
- requirement: !ruby/object:Gem::Requirement
98
- none: false
99
- requirements:
100
- - - ! '>='
101
- - !ruby/object:Gem::Version
102
- version: '0'
103
- type: :development
111
+ version_requirements: *id006
112
+ - !ruby/object:Gem::Dependency
104
113
  prerelease: false
105
- version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
- requirements:
108
- - - ! '>='
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: test-construct
113
- requirement: !ruby/object:Gem::Requirement
114
- none: false
115
- requirements:
116
- - - ! '>='
117
- - !ruby/object:Gem::Version
118
- version: '0'
119
114
  type: :development
120
- prerelease: false
121
- version_requirements: !ruby/object:Gem::Requirement
115
+ requirement: &id007 !ruby/object:Gem::Requirement
122
116
  none: false
123
- requirements:
124
- - - ! '>='
125
- - !ruby/object:Gem::Version
126
- version: '0'
127
- description: ! "\n A man's home (directory) is his castle, so don't leave home
128
- with out it.\n\n Homesick is sorta like rip, but for dotfiles. It uses git to
129
- clone a repository containing dotfiles, and saves them in ~/.homesick. It then allows
130
- you to symlink all the dotfiles into place with a single command. \n\n "
131
- email:
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ hash: 3
121
+ segments:
122
+ - 0
123
+ version: "0"
124
+ name: test-construct
125
+ version_requirements: *id007
126
+ 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 "
127
+ email:
132
128
  - josh@technicalpickles.com
133
129
  - info@muratayusuke.com
134
- executables:
130
+ executables:
135
131
  - homesick
136
132
  extensions: []
137
- extra_rdoc_files:
133
+
134
+ extra_rdoc_files:
138
135
  - ChangeLog.markdown
139
136
  - LICENSE
140
137
  - README.markdown
141
- files:
138
+ files:
142
139
  - .document
143
140
  - .rspec
144
141
  - .travis.yml
@@ -157,31 +154,37 @@ files:
157
154
  - spec/spec.opts
158
155
  - spec/spec_helper.rb
159
156
  homepage: http://github.com/technicalpickles/homesick
160
- licenses:
157
+ licenses:
161
158
  - MIT
162
159
  post_install_message:
163
160
  rdoc_options: []
164
- require_paths:
161
+
162
+ require_paths:
165
163
  - lib
166
- required_ruby_version: !ruby/object:Gem::Requirement
164
+ required_ruby_version: !ruby/object:Gem::Requirement
167
165
  none: false
168
- requirements:
169
- - - ! '>='
170
- - !ruby/object:Gem::Version
171
- version: '0'
172
- segments:
166
+ requirements:
167
+ - - ">="
168
+ - !ruby/object:Gem::Version
169
+ hash: 3
170
+ segments:
173
171
  - 0
174
- hash: -1508111784299001289
175
- required_rubygems_version: !ruby/object:Gem::Requirement
172
+ version: "0"
173
+ required_rubygems_version: !ruby/object:Gem::Requirement
176
174
  none: false
177
- requirements:
178
- - - ! '>='
179
- - !ruby/object:Gem::Version
180
- version: '0'
175
+ requirements:
176
+ - - ">="
177
+ - !ruby/object:Gem::Version
178
+ hash: 3
179
+ segments:
180
+ - 0
181
+ version: "0"
181
182
  requirements: []
183
+
182
184
  rubyforge_project:
183
- rubygems_version: 1.8.25
185
+ rubygems_version: 1.8.5
184
186
  signing_key:
185
187
  specification_version: 3
186
188
  summary: A man's home is his castle. Never leave your dotfiles behind.
187
189
  test_files: []
190
+