filestack-rails 4.0.4 → 4.0.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0382cb6fbca8442f67208a68949845a97c895211'
|
4
|
+
data.tar.gz: 67ff05ab56ad4524fad9ced697963148e7d52679
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aec24f02d40e451d6d6bff9e515ac132e7bdd8bdbd7ebe421f89fa84aa2c24ad82938366abbe9f1767e3d288c171d2bc3af1380c056178bbddee32b4a4f4e2ca
|
7
|
+
data.tar.gz: cb91b9a683922e6902fef6f6c81b2daaa1be07ecfc887f13e48d4297752e097ffc85182f81d2d4f4e32d1a2ff45dd39ae541cdd52300f77f35d6039411ff2928
|
@@ -82,14 +82,11 @@ module FilestackRails
|
|
82
82
|
end
|
83
83
|
|
84
84
|
def get_policy_and_signature
|
85
|
-
if
|
86
|
-
signature =
|
87
|
-
policy =
|
88
|
-
else
|
89
|
-
signature = nil
|
90
|
-
policy = nil
|
85
|
+
if security
|
86
|
+
signature = security.signature
|
87
|
+
policy = security.policy
|
91
88
|
end
|
92
|
-
|
89
|
+
[signature, policy]
|
93
90
|
end
|
94
91
|
|
95
92
|
def get_policy_and_signature_string
|
@@ -104,5 +101,13 @@ module FilestackRails
|
|
104
101
|
"''"
|
105
102
|
end
|
106
103
|
end
|
104
|
+
|
105
|
+
def security
|
106
|
+
security_options = ::Rails.application.config.filestack_rails.security
|
107
|
+
app_secret = ::Rails.application.config.filestack_rails.app_secret
|
108
|
+
|
109
|
+
return nil unless security_options
|
110
|
+
FilestackSecurity.new(app_secret, options: security_options)
|
111
|
+
end
|
107
112
|
end
|
108
113
|
end
|
@@ -22,8 +22,11 @@ module FilestackRails
|
|
22
22
|
if @app_secret.nil?
|
23
23
|
raise 'You must have secret key to use security'
|
24
24
|
end
|
25
|
-
@security =
|
25
|
+
@security = security_options
|
26
26
|
end
|
27
27
|
|
28
|
+
def app_secret
|
29
|
+
@app_secret or nil
|
30
|
+
end
|
28
31
|
end
|
29
32
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: filestack-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- filestack
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|