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 CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.1
4
+
5
+ * Support S3 etags that are longer than 32 characters
6
+ [#18](https://github.com/laurilehmijoki/jekyll-s3/issues/18)
7
+
3
8
  ## 1.0.0
4
9
 
5
10
  * Add support for dotfiles (files starting with the '.' character)
data/filey-diff.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'filey-diff'
3
- s.version = '1.0.0'
3
+ s.version = '1.0.1'
4
4
 
5
5
  s.summary = "Compare two data sources that contain file-like objects"
6
6
  s.description =
@@ -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 == 32
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 is not valid' do
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
- 'i-am-not-a-valid-md5-hash')
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.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: 2012-12-31 00:00:00.000000000 Z
12
+ date: 2013-01-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake