carrierwave-cascade 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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9746a3d779b60a48a92d241387a48d7a857541f0
|
4
|
+
data.tar.gz: cdd429f82a3125d72c9c9d0d85a6d7ef0b460c17
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f189001bf4a6f8d50a3e4ca9b77af8f1acee997f0da7266b7d0f5a5daa8fffee401eb85a7889dfb9986c0bf390921e0d7e03d5c918daf82c5cb792c27ffb405d
|
7
|
+
data.tar.gz: 8bd4c2da7b78642bc8e39773521b0faea85733bfe95d6c0f0ffa77c07711ac7d9826bbe9d3a6374743224b4d32f4dacfdf015979f871d917c62bd9bfe89066e1
|
data/carrierwave-cascade.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.summary = %q{Retrieve from a secondary storage when the file is
|
18
18
|
not in the primary storage.
|
19
19
|
}
|
20
|
-
spec.homepage = ""
|
20
|
+
spec.homepage = "https://github.com/kjg/carrierwave-cascade"
|
21
21
|
spec.license = "MIT"
|
22
22
|
|
23
23
|
spec.files = `git ls-files`.split($/)
|
@@ -16,9 +16,9 @@ module CarrierWave
|
|
16
16
|
|
17
17
|
def retrieve!(*args)
|
18
18
|
primary_file = primary_storage.retrieve!(*args)
|
19
|
-
secondary_file = secondary_storage.retrieve!(*args)
|
20
19
|
|
21
|
-
if !primary_file.exists?
|
20
|
+
if !primary_file.exists?
|
21
|
+
secondary_file = secondary_storage.retrieve!(*args)
|
22
22
|
return SecondaryFileProxy.new(uploader, secondary_file)
|
23
23
|
else
|
24
24
|
return primary_file
|
@@ -78,29 +78,14 @@ describe CarrierWave::Storage::Cascade do
|
|
78
78
|
primary_file.stub(:exists? => false)
|
79
79
|
end
|
80
80
|
|
81
|
-
|
82
|
-
|
83
|
-
secondary_file.stub(:exists? => true)
|
84
|
-
end
|
85
|
-
|
86
|
-
it "returns a secondary_file proxy" do
|
87
|
-
cascade.retrieve!('file').should be_a(CarrierWave::Storage::Cascade::SecondaryFileProxy)
|
88
|
-
end
|
89
|
-
|
90
|
-
it "returns a proxy to the real secondary_file" do
|
91
|
-
cascade.retrieve!('file').real_file.should == secondary_file
|
92
|
-
end
|
81
|
+
it "returns a secondary_file proxy" do
|
82
|
+
cascade.retrieve!('file').should be_a(CarrierWave::Storage::Cascade::SecondaryFileProxy)
|
93
83
|
end
|
94
84
|
|
95
|
-
|
96
|
-
|
97
|
-
secondary_file.stub(:exists? => false)
|
98
|
-
end
|
99
|
-
|
100
|
-
it "returns the primary_file" do
|
101
|
-
cascade.retrieve!('file').should == primary_file
|
102
|
-
end
|
85
|
+
it "returns a proxy to the real secondary_file" do
|
86
|
+
cascade.retrieve!('file').real_file.should == secondary_file
|
103
87
|
end
|
88
|
+
|
104
89
|
end
|
105
90
|
end
|
106
91
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: carrierwave-cascade
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Glowacz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-04-
|
11
|
+
date: 2013-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: carrierwave
|
@@ -105,7 +105,7 @@ files:
|
|
105
105
|
- spec/carrierwave-cascade_spec.rb
|
106
106
|
- spec/carrierwave/storage/cascade_spec.rb
|
107
107
|
- spec/spec_helper.rb
|
108
|
-
homepage:
|
108
|
+
homepage: https://github.com/kjg/carrierwave-cascade
|
109
109
|
licenses:
|
110
110
|
- MIT
|
111
111
|
metadata: {}
|