saviour 0.5.3 → 0.5.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.
- checksums.yaml +4 -4
- data/lib/saviour/file.rb +2 -0
- data/lib/saviour/validator.rb +2 -1
- data/lib/saviour/version.rb +1 -1
- 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: aa1f391c8a5de6122466ff36e4a88ba51e6302ac84c409b48cdf5573d22f8887
|
|
4
|
+
data.tar.gz: 8b5f761c48ab60964dd3816605292578cf8c8f006d57a38b331590d6e024afd5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 13ade6b994f50132f67d441c32caa60590e708d55b6cde8e769f976ab964bf5eae679d2278ab66c2183391199992f0448dcab1da713fc28e76abd2a2f3e5a8a2
|
|
7
|
+
data.tar.gz: 22c541fa37afd30bda4caf22234bae643c22919242d69e14621f513ce41ee61bd20b74ded7aa3b57fd555216f1b97854633751c280611783072a1cab8ff08c24
|
data/lib/saviour/file.rb
CHANGED
|
@@ -106,6 +106,7 @@ module Saviour
|
|
|
106
106
|
raise CannotCopy, "must be persisted" unless persisted?
|
|
107
107
|
|
|
108
108
|
temp_file = Tempfile.new([::File.basename(filename, ".*"), ::File.extname(filename)])
|
|
109
|
+
temp_file.binmode
|
|
109
110
|
|
|
110
111
|
begin
|
|
111
112
|
Config.storage.read_to_file(@persisted_path, temp_file)
|
|
@@ -124,6 +125,7 @@ module Saviour
|
|
|
124
125
|
return yield if source_type == :stream
|
|
125
126
|
|
|
126
127
|
tmpfile = Tempfile.new([::File.basename(file.path, ".*"), ::File.extname(file.path)])
|
|
128
|
+
tmpfile.binmode
|
|
127
129
|
FileUtils.cp(file.path, tmpfile.path)
|
|
128
130
|
|
|
129
131
|
begin
|
data/lib/saviour/validator.rb
CHANGED
|
@@ -48,11 +48,12 @@ module Saviour
|
|
|
48
48
|
def source_as_file
|
|
49
49
|
@source_as_file ||= begin
|
|
50
50
|
f = Tempfile.new("")
|
|
51
|
+
f.binmode
|
|
51
52
|
|
|
52
53
|
if source_type == :file
|
|
53
54
|
FileUtils.cp(@file.source.path, f.path)
|
|
54
55
|
else
|
|
55
|
-
::File.
|
|
56
|
+
::File.binwrite(f.path, source_as_memory)
|
|
56
57
|
end
|
|
57
58
|
|
|
58
59
|
f
|
data/lib/saviour/version.rb
CHANGED
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.4
|
|
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-04-
|
|
11
|
+
date: 2018-04-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|