checksummer 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/checksummer.gemspec +2 -2
- data/lib/checksummer_file.rb +1 -1
- data/spec/checksummer_file_spec.rb +5 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.6
|
data/checksummer.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{checksummer}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.6"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Tobias Schwab"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-08-10}
|
13
13
|
s.description = %q{Replace files with links to md5 files}
|
14
14
|
s.email = %q{tobias.schwab@dynport.de}
|
15
15
|
s.executables = ["checksummer"]
|
data/lib/checksummer_file.rb
CHANGED
@@ -51,7 +51,7 @@ class ChecksummerFile
|
|
51
51
|
status[:checksum] = File.basename(new_path)
|
52
52
|
mtime = File.mtime(path)
|
53
53
|
FileUtils.ln_sf(new_path, path)
|
54
|
-
FileUtils.touch(path, :mtime => mtime)
|
54
|
+
FileUtils.touch(path, :mtime => mtime) rescue nil
|
55
55
|
else
|
56
56
|
status[:status] = :was_symlink
|
57
57
|
status[:realpath] = Pathname.new(path).realpath
|
@@ -121,6 +121,11 @@ describe ChecksummerFile do
|
|
121
121
|
FileUtils.should_receive(:touch).with("/some/text.csv", :mtime => time)
|
122
122
|
file.checksum_to!("/tmp/data")
|
123
123
|
end
|
124
|
+
|
125
|
+
it "does not break when touch raises an error" do
|
126
|
+
FileUtils.should_receive(:touch).and_raise("not allowed")
|
127
|
+
file.checksum_to!("/tmp/data")[:status].should == :copied
|
128
|
+
end
|
124
129
|
end
|
125
130
|
|
126
131
|
describe "with the file being checksummed already" do
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: checksummer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.2.
|
5
|
+
version: 0.2.6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Tobias Schwab
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-08-10 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: json
|
@@ -165,7 +165,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
165
165
|
requirements:
|
166
166
|
- - ">="
|
167
167
|
- !ruby/object:Gem::Version
|
168
|
-
hash: -
|
168
|
+
hash: -652076464801799004
|
169
169
|
segments:
|
170
170
|
- 0
|
171
171
|
version: "0"
|