bearcat 1.3.27 → 1.3.28
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bearcat/client/file_helper.rb +3 -2
- data/lib/bearcat/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: f647eb5f21166dc1aa4383ff33184be11d127b60
|
4
|
+
data.tar.gz: ce49a99cbdb58e448c2738696a8aea07a2cc441d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 78df1f29163a3d1aa42a1dfdb2801ba5c623000d3e2c3ed644ec2c41fca00ebe3fcc4048c62217a584600fc6952ba5d70adfc51512a3bba836e80a5aa485d535
|
7
|
+
data.tar.gz: a128860bd32263d21ddceee32fced977f3b86016609022dc3b3757d8a2a3ef6592398ded9d6c4215ded32d2fb3be394c76100a531738d3ec7bc9b92fe02351c4
|
@@ -15,7 +15,7 @@ module FileHelper
|
|
15
15
|
params['Filename'] = File.basename(file_path)
|
16
16
|
params['file'] = Faraday::UploadIO.new(file_path, params['content-type'])
|
17
17
|
response = upload_connection.post(url, params)
|
18
|
-
if [302, 303].include? response.status #success if it is a redirect
|
18
|
+
if [201, 302, 303].include? response.status #success if it is a redirect or 201
|
19
19
|
response.headers['Location']
|
20
20
|
else
|
21
21
|
raise 'FailedFileUpload'
|
@@ -24,7 +24,8 @@ module FileHelper
|
|
24
24
|
|
25
25
|
def confirm_file_upload(url)
|
26
26
|
uri = URI(url)
|
27
|
-
|
27
|
+
query = uri.query
|
28
|
+
query.blank? ? get(uri.path) : get(uri.path, CGI::parse(query))
|
28
29
|
end
|
29
30
|
|
30
31
|
def upload_connection
|
data/lib/bearcat/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bearcat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.28
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Mills, Jake Sorce
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|