concord_cacher 0.0.3 → 0.0.4
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.tar.gz.sig +0 -0
- data/Rakefile +1 -1
- data/concord_cacher.gemspec +1 -1
- data/lib/concord/diy_local_cacher.rb +4 -4
- data/spec/diy_local_cacher_spec.rb +4 -3
- metadata +2 -2
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/Rakefile
CHANGED
@@ -6,7 +6,7 @@ require 'spec/rake/spectask'
|
|
6
6
|
require './lib/concord_cacher.rb'
|
7
7
|
|
8
8
|
require 'echoe'
|
9
|
-
Echoe.new('concord_cacher', '0.0.
|
9
|
+
Echoe.new('concord_cacher', '0.0.4') do |p|
|
10
10
|
p.description = "concord_cacher provides support for locally caching a resource and all referenced resources in multiple different ways. It is intended for using with other Concord Consortium projects and not necessarily for outside projects."
|
11
11
|
p.summary = "Support for locally caching a resource and all referenced resources in multiple different ways"
|
12
12
|
p.url = "http://github.com/psndcsrv/concord_cacher"
|
data/concord_cacher.gemspec
CHANGED
@@ -27,9 +27,9 @@ class ::Concord::DiyLocalCacher < ::Concord::Cacher
|
|
27
27
|
uri_path = uri.path.split('/')
|
28
28
|
uri_path = ["","index.html"] if uri_path.size == 0
|
29
29
|
uri_path.unshift("") if uri_path.size == 1
|
30
|
-
|
31
|
-
file =
|
32
|
-
|
33
|
-
return
|
30
|
+
file_ext = uri_path[-1].split('.')[-1]
|
31
|
+
file = ::Digest::SHA1.hexdigest(uri.to_s)
|
32
|
+
file += ".#{file_ext}" if file_ext
|
33
|
+
return file
|
34
34
|
end
|
35
35
|
end
|
@@ -52,9 +52,10 @@ describe 'DIY Local Cacher' do
|
|
52
52
|
uri_path = uri.path.split('/')
|
53
53
|
uri_path = ["","index.html"] if uri_path.size == 0
|
54
54
|
uri_path.unshift("") if uri_path.size == 1
|
55
|
-
|
56
|
-
|
57
|
-
|
55
|
+
file = ::Digest::SHA1.hexdigest(uri.to_s)
|
56
|
+
file_ext = uri_path[-1].split('.')[-1]
|
57
|
+
file += ".#{file_ext}" if file_ext
|
58
|
+
return file
|
58
59
|
end
|
59
60
|
|
60
61
|
describe 'empty otml' do
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|