filey-diff 1.0.0 → 1.0.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/changelog.md +5 -0
- data/filey-diff.gemspec +1 -1
- data/lib/filey-diff/filey.rb +1 -1
- data/spec/filey_spec.rb +12 -2
- metadata +2 -2
data/changelog.md
CHANGED
data/filey-diff.gemspec
CHANGED
data/lib/filey-diff/filey.rb
CHANGED
@@ -6,7 +6,7 @@ module Filey
|
|
6
6
|
raise InvalidPathError unless path.match(/^\..*\/$/)
|
7
7
|
raise InvalidTimeError unless last_modified.instance_of?(Time)
|
8
8
|
raise InvalidNameError if name.match(/\//)
|
9
|
-
raise InvalidMd5Error unless md5.length
|
9
|
+
raise InvalidMd5Error unless md5.length >= 32
|
10
10
|
@path = path
|
11
11
|
@name = name
|
12
12
|
@last_modified = last_modified
|
data/spec/filey_spec.rb
CHANGED
@@ -71,11 +71,21 @@ describe Filey::Filey do
|
|
71
71
|
end
|
72
72
|
|
73
73
|
context 'md5 validation' do
|
74
|
-
it 'raises an error if the md5 hash
|
74
|
+
it 'raises an error if the md5 hash shorter than 32 characters' do
|
75
75
|
expect {
|
76
76
|
Filey::Filey.new('./ripley/', 'aliens.txt', Time.now,
|
77
|
-
|
77
|
+
'ca022be4a1c56c770b9700df99473d0')
|
78
78
|
}.to raise_error(Filey::Filey::InvalidMd5Error)
|
79
79
|
end
|
80
|
+
|
81
|
+
it 'accepts md5s longer than 31' do
|
82
|
+
Filey::Filey.new('./ripley/', 'aliens.txt', Time.now,
|
83
|
+
'ca022be4a1c56c770b9700df99473d01')
|
84
|
+
end
|
85
|
+
|
86
|
+
it 'accepts md5s longer than 31' do
|
87
|
+
Filey::Filey.new('./ripley/', 'aliens.txt', Time.now,
|
88
|
+
'f392c1602cd1d9a0176853c41b366db5-5')
|
89
|
+
end
|
80
90
|
end
|
81
91
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: filey-diff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-01-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|