sbfaulkner-astrovan 0.5.6 → 0.5.7
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/README.rdoc +3 -3
- data/VERSION.yml +1 -1
- data/lib/astrovan/util.rb +1 -1
- data/test/util_test.rb +34 -4
- metadata +2 -2
data/README.rdoc
CHANGED
@@ -28,16 +28,16 @@ This is my attempt.
|
|
28
28
|
|
29
29
|
== CHANGES
|
30
30
|
|
31
|
-
=== 0.5.
|
31
|
+
=== 0.5.7
|
32
|
+
- fix bug when symlink to directory already exists
|
32
33
|
|
34
|
+
=== 0.5.6
|
33
35
|
- support for specification of git and rake command paths
|
34
36
|
|
35
37
|
=== 0.5.5
|
36
|
-
|
37
38
|
- change working directory for rake tasks
|
38
39
|
|
39
40
|
=== 0.5.4
|
40
|
-
|
41
41
|
- handle github private repository urls
|
42
42
|
|
43
43
|
== TODO
|
data/VERSION.yml
CHANGED
data/lib/astrovan/util.rb
CHANGED
data/test/util_test.rb
CHANGED
@@ -63,12 +63,42 @@ class UtilTest < Test::Unit::TestCase
|
|
63
63
|
assert_equal data, File.open(target) { |f| f.gets.chomp }
|
64
64
|
end
|
65
65
|
|
66
|
+
def test_should_symlink_to_directory
|
67
|
+
system "mkdir -p #{@path}"
|
68
|
+
data = create_file("#{@path}/hello")
|
69
|
+
target = @path + ".lnk"
|
70
|
+
assert File.exist?(@path)
|
71
|
+
assert File.directory?(@path)
|
72
|
+
using 'astrovan.local', :password => ENV['PASSWORD'], :path => @path, :target => target do
|
73
|
+
symlink path, :to => target
|
74
|
+
end
|
75
|
+
assert File.exist?(target)
|
76
|
+
assert File.symlink?(target)
|
77
|
+
assert_equal data, File.open("#{target}/hello") { |f| f.gets.chomp }
|
78
|
+
end
|
79
|
+
|
80
|
+
def test_should_replace_symlink_to_directory
|
81
|
+
system "mkdir -p #{@path}"
|
82
|
+
data = create_file("#{@path}/hello")
|
83
|
+
target = @path + ".lnk"
|
84
|
+
assert File.exist?(@path)
|
85
|
+
assert File.directory?(@path)
|
86
|
+
system "ln -s /var/tmp #{target}"
|
87
|
+
using 'astrovan.local', :password => ENV['PASSWORD'], :path => @path, :target => target do
|
88
|
+
symlink path, :to => target
|
89
|
+
end
|
90
|
+
assert File.exist?(target)
|
91
|
+
assert File.symlink?(target)
|
92
|
+
assert_equal data, File.open("#{target}/hello") { |f| f.gets.chomp }
|
93
|
+
end
|
94
|
+
|
66
95
|
protected
|
67
|
-
def create_file
|
96
|
+
def create_file(path = nil)
|
97
|
+
path ||= @path
|
68
98
|
data = Time.now.utc.to_s
|
69
|
-
File.open(
|
70
|
-
assert File.exist?(
|
71
|
-
assert !File.directory?(
|
99
|
+
File.open(path,'w') { |f| f.puts data }
|
100
|
+
assert File.exist?(path)
|
101
|
+
assert !File.directory?(path)
|
72
102
|
data
|
73
103
|
end
|
74
104
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sbfaulkner-astrovan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- S. Brent Faulkner
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-02-
|
12
|
+
date: 2009-02-23 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|