saviour 0.5.5 → 0.5.6
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 +4 -4
- data/lib/saviour/file.rb +1 -1
- data/lib/saviour/version.rb +1 -1
- data/spec/feature/crud_workflows_spec.rb +22 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '084a405456f0b11741e0f8a92a96a85620b26aca9209b53835acfecebaf13fdc'
|
4
|
+
data.tar.gz: 20e26cc51b5d6867907c9f656169d9929a4d3e3fe081c22d9cb28ec972557149
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edffce475e7dc22aca7fc71c2a96867eff9ad24d4c4fd1284420247c00dac571630a5117345900fb03288ebd7d97cff81bf395cfa71a2da029b2f71aab434164
|
7
|
+
data.tar.gz: 7a58495b5e89f4b04724c0364d90f25885dff7105b3b0cdf175296b2125d699c364e4986812d91d21e4946f135dc68e92cddf8a3eea7e6aedbe65a87dd2d009e
|
data/lib/saviour/file.rb
CHANGED
data/lib/saviour/version.rb
CHANGED
@@ -193,6 +193,28 @@ describe "saving a new file" do
|
|
193
193
|
}
|
194
194
|
}
|
195
195
|
|
196
|
+
it "with no attachment" do
|
197
|
+
a = klass.create!
|
198
|
+
b = a.dup
|
199
|
+
b.save!
|
200
|
+
expect(b[:file]).to be_nil
|
201
|
+
end
|
202
|
+
|
203
|
+
it "on non persisted object with no attachment" do
|
204
|
+
a = klass.new
|
205
|
+
b = a.dup
|
206
|
+
b.save!
|
207
|
+
expect(b[:file]).to be_nil
|
208
|
+
end
|
209
|
+
|
210
|
+
it "on non persisted object with attachment" do
|
211
|
+
a = klass.new file: Saviour::StringSource.new("contents", "file.txt")
|
212
|
+
b = a.dup
|
213
|
+
b.save!
|
214
|
+
expect(b[:file]).to_not be_nil
|
215
|
+
expect(Saviour::Config.storage.exists?(b[:file])).to be_truthy
|
216
|
+
end
|
217
|
+
|
196
218
|
it "creates a non persisted file attachment" do
|
197
219
|
a = klass.create! file: Saviour::StringSource.new("contents", "file.txt")
|
198
220
|
expect(Saviour::Config.storage.exists?(a[:file])).to be_truthy
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: saviour
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roger Campos
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|