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: 10d1dda21215faca411b6cc61d5d367279174a05
4
- data.tar.gz: 977a30972e6bde9364b8368ffc0318215400e483
3
+ metadata.gz: '0382cb6fbca8442f67208a68949845a97c895211'
4
+ data.tar.gz: 67ff05ab56ad4524fad9ced697963148e7d52679
5
5
  SHA512:
6
- metadata.gz: 9d3946f531f957521478f5613a5c5a0e5a48b7b611e26dc1b3f2128e6ff983f0c43d829957f8737281fad8d0d529edf0f392792069f86de06e01705ae18cef61
7
- data.tar.gz: 0ae8c8d88a06a860a0db5b602f0829261b7b6b9b588d104ffaafe752a6e583aad84c47b3005e41af21df156fbc606570f2de58b19dca6e2937471f8fbefe4cfa
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 ::Rails.application.config.filestack_rails.security
86
- signature = ::Rails.application.config.filestack_rails.security.signature
87
- policy = ::Rails.application.config.filestack_rails.security.policy
88
- else
89
- signature = nil
90
- policy = nil
85
+ if security
86
+ signature = security.signature
87
+ policy = security.policy
91
88
  end
92
- return [signature, policy]
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 = FilestackSecurity.new(@app_secret, options: security_options)
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
@@ -14,7 +14,7 @@ class FilestackVersion
14
14
  end
15
15
 
16
16
  module FilestackRails
17
- VERSION = '4.0.4'
17
+ VERSION = '4.0.5'
18
18
 
19
19
  module Version
20
20
  def get_filestack_js_result(results)
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
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-19 00:00:00.000000000 Z
11
+ date: 2019-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails