munkey 0.4.0 → 0.4.1
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/lib/munkey.rb +1 -1
- data/test/munkey_test.rb +13 -1
- metadata +10 -10
data/lib/munkey.rb
CHANGED
@@ -80,7 +80,7 @@ class Munkey
|
|
80
80
|
dst ||= @gitpath
|
81
81
|
gitignore = GitignoreParser.parse(dst)
|
82
82
|
ftp = FtpSync.new(@ftpdetails[:host], @ftpdetails[:user], @ftpdetails[:password], :ignore => gitignore, :verbose => @verbose)
|
83
|
-
ftp.pull_dir(dst, @ftpdetails[:path],
|
83
|
+
ftp.pull_dir(dst, @ftpdetails[:path], :delete => true, :since => (since || nil), :skip_errors => true) do |p|
|
84
84
|
Dir.chdir(dst) do
|
85
85
|
relpath = p.gsub %r{^#{Regexp.escape(dst)}\/}, ''
|
86
86
|
system("git rm -r#{git_quiet} '#{relpath}'")
|
data/test/munkey_test.rb
CHANGED
@@ -118,7 +118,19 @@ class MunkeyTest < Test::Unit::TestCase
|
|
118
118
|
munkey.pull(:merge => false)
|
119
119
|
assert_equal munkey_commits + 1, `git log --format=oneline munkey`.strip.split("\n").size
|
120
120
|
assert_equal master_commits, `git log --format=oneline master`.strip.split("\n").size
|
121
|
-
end
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
def test_pull_skips_files_with_bad_permissions
|
125
|
+
FileUtils.chmod 0200, File.join(Net::FTP.ftp_src, 'fileA')
|
126
|
+
assert_nothing_raised do
|
127
|
+
munkey = Munkey.clone('ftp://user:pass@test.server/', @gitdir)
|
128
|
+
end
|
129
|
+
Dir.chdir(@gitdir) do
|
130
|
+
assert File.exists?('README')
|
131
|
+
assert !File.exists?('fileA')
|
132
|
+
assert File.exists?('fileB')
|
133
|
+
end
|
122
134
|
end
|
123
135
|
|
124
136
|
def test_quick_pull_includes_changed_files
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: munkey
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 1
|
10
|
+
version: 0.4.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- jebw
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-11-30 00:00:00 +00:00
|
19
19
|
default_executable: munkey
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -26,15 +26,15 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
hash:
|
29
|
+
hash: 11
|
30
30
|
segments:
|
31
31
|
- 0
|
32
32
|
- 4
|
33
|
-
-
|
34
|
-
version: 0.4.
|
33
|
+
- 2
|
34
|
+
version: 0.4.2
|
35
35
|
type: :runtime
|
36
36
|
version_requirements: *id001
|
37
|
-
description:
|
37
|
+
description: Use git to push and pull from ftp servers
|
38
38
|
email: jeb@jdwilkins.co.uk
|
39
39
|
executables:
|
40
40
|
- munkey
|
@@ -57,7 +57,7 @@ post_install_message:
|
|
57
57
|
rdoc_options:
|
58
58
|
- --line-numbers
|
59
59
|
- --title
|
60
|
-
-
|
60
|
+
- Use git to push and pull from ftp servers
|
61
61
|
- --main
|
62
62
|
- README.rdoc
|
63
63
|
require_paths:
|
@@ -86,7 +86,7 @@ rubyforge_project:
|
|
86
86
|
rubygems_version: 1.3.7
|
87
87
|
signing_key:
|
88
88
|
specification_version: 3
|
89
|
-
summary:
|
89
|
+
summary: Use git to push and pull from ftp servers
|
90
90
|
test_files:
|
91
91
|
- test/gitignore_test.rb
|
92
92
|
- test/munkey_test.rb
|