mrpin-sdk 1.0.50 → 1.0.51
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: 231ffd2a47007343c8ba67b6f816843b15d845df
|
4
|
+
data.tar.gz: 16ad8c7c15128fbee1a8789c89e0a936765532e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8d33190dc494fa0fb2406ef4f7f945db104d1c98b85add4e3b5e1dc341622f29867704fb0d639f0fc5f2fc5a89459153cc2f0d9734d86428ed5a4dfad70a99d
|
7
|
+
data.tar.gz: f88e6741722dc7425089dd1b4c85fd2fa8e434955d2fb79ae5a77d7d13e5dec234b9b5359b34749ce0febbaae444ada086cc89dc74243154100fc823638e01a0
|
@@ -44,6 +44,8 @@ module UploaderHelperLocal
|
|
44
44
|
path_relative_old = self.send(field_name)
|
45
45
|
|
46
46
|
UtilsIO.try_remove_file_relative(path_relative_old)
|
47
|
+
#try remove gz file too
|
48
|
+
UtilsIO.try_remove_file_relative("#{path_relative_old}.gz")
|
47
49
|
|
48
50
|
path_absolute = get_path_for_uploader_absolute(field_name)
|
49
51
|
|
@@ -72,6 +74,9 @@ module UploaderHelperLocal
|
|
72
74
|
|
73
75
|
FileUtils.copy(path_source, path_destination)
|
74
76
|
|
77
|
+
#compress file
|
78
|
+
%x(gzip -6 -k #{path_destination})
|
79
|
+
|
75
80
|
path_relative = UtilsIO.to_path_relative(path_destination)
|
76
81
|
|
77
82
|
self.send("#{field_name}=", path_relative)
|
@@ -84,7 +89,7 @@ module UploaderHelperLocal
|
|
84
89
|
|
85
90
|
protected
|
86
91
|
def get_upload_file_name(field_name, file_path)
|
87
|
-
result =
|
92
|
+
result = SecureRandom.uuid.to_s
|
88
93
|
|
89
94
|
extension = File.extname(file_path)
|
90
95
|
|
data/mrpin-sdk.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'mrpin-sdk'
|
7
|
-
spec.version = '1.0.
|
7
|
+
spec.version = '1.0.51'
|
8
8
|
spec.authors = %w(Gregory Tkach Yakupov Dmitrij)
|
9
9
|
spec.email = %w(gregory.tkach@gmail.com yakupov.dmitrij@gmail.com)
|
10
10
|
spec.description = %q{Mrpin sdk for backend development.}
|