fclay 0.1.15 → 0.1.16
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/fclay/attachment.rb +1 -16
- data/lib/fclay/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7b8520381d36825f0c270e76f752885959461707
|
|
4
|
+
data.tar.gz: 7d451666771b64c9017b8baa45c4ddaab088306c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f46029345e4f85cd75ffa91d2cb3895b23cec0302c1bcce26143421ecb0975329f513bac976fd6aecfe32314be9b0261332ec3317641f368fb85358b91dc573c
|
|
7
|
+
data.tar.gz: 803890d5f2e7b85bd3663eebc67dffc29e45565cbfd7833103dd98a2c0b58a0224b279ebc07626cba290fecfc4ec47ba838c44597fe7e5ca382df85f9518a914
|
data/lib/fclay/attachment.rb
CHANGED
|
@@ -111,7 +111,6 @@ module Fclay
|
|
|
111
111
|
url += "#{Fclay.configuration.local_url}/#{self.class.name.tableize}"
|
|
112
112
|
url += "/#{style.to_s}" if style
|
|
113
113
|
url += "/#{file_name}"
|
|
114
|
-
url += "##{file_key}" if self.class.fclay_options[:encrypted]
|
|
115
114
|
url
|
|
116
115
|
end
|
|
117
116
|
|
|
@@ -163,22 +162,8 @@ module Fclay
|
|
|
163
162
|
create_dirs
|
|
164
163
|
fetch_file_name
|
|
165
164
|
|
|
166
|
-
|
|
167
|
-
if self.class.fclay_options[:encoded] == "base64"
|
|
168
|
-
encoded_string = Base64.encode64(File.open(path, "rb").read)
|
|
169
|
-
File.open(path, "wb") do |file|
|
|
170
|
-
file.write(encoded_string)
|
|
171
|
-
end
|
|
172
|
-
end
|
|
173
165
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
if self.class.fclay_options[:encrypted]
|
|
177
|
-
self.file_key = SecureRandom.hex
|
|
178
|
-
`openssl aes-256-cbc -a -salt -in #{path} -out #{local_file_path} -k #{self.file_key}`
|
|
179
|
-
else
|
|
180
|
-
FileUtils.mv(path,local_file_path)
|
|
181
|
-
end
|
|
166
|
+
FileUtils.mv(path,local_file_path)
|
|
182
167
|
|
|
183
168
|
`chmod 0755 #{local_file_path}`
|
|
184
169
|
|
data/lib/fclay/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fclay
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.16
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rustam Galiev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-03-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|