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 CHANGED
@@ -1 +1 @@
1
- 0.2.5
1
+ 0.2.6
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{checksummer}
8
- s.version = "0.2.5"
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-07-11}
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"]
@@ -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
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-07-11 00:00:00 Z
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: -2535468748837297976
168
+ hash: -652076464801799004
169
169
  segments:
170
170
  - 0
171
171
  version: "0"