carrierwave-cascade 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c43112326672ab79459094a4a061d9c024ee1c86
4
- data.tar.gz: 00a6b125f62061e5193d40c09e27ec5994ed7aba
3
+ metadata.gz: 9746a3d779b60a48a92d241387a48d7a857541f0
4
+ data.tar.gz: cdd429f82a3125d72c9c9d0d85a6d7ef0b460c17
5
5
  SHA512:
6
- metadata.gz: 9f023fffbf2763a83ddcc708b5a15a5485c850e7840e7277ccfbdb4b5af1e63a6a970f43f4a023021cf141ab09cf1e5e1c60abf1cafd01b391fd1b130b437e4e
7
- data.tar.gz: df5b572946044c0d6faede7244539a35a6e95b6c64b7a1d40fabdefde4c79ed6f1de7ee10bfd0f96dabedd6da26370daa6f1ce47c0c25992ad82759ac9ed1e3b
6
+ metadata.gz: f189001bf4a6f8d50a3e4ca9b77af8f1acee997f0da7266b7d0f5a5daa8fffee401eb85a7889dfb9986c0bf390921e0d7e03d5c918daf82c5cb792c27ffb405d
7
+ data.tar.gz: 8bd4c2da7b78642bc8e39773521b0faea85733bfe95d6c0f0ffa77c07711ac7d9826bbe9d3a6374743224b4d32f4dacfdf015979f871d917c62bd9bfe89066e1
@@ -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($/)
@@ -1,5 +1,5 @@
1
1
  module Carrierwave
2
2
  module Cascade
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  end
5
5
  end
@@ -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? && secondary_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
- context "when file exists in secondary_storage" do
82
- before do
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
- context "when file doesn't exist in secondary_storage" do
96
- before do
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.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-14 00:00:00.000000000 Z
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: {}