anaconda 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.markdown +3 -0
- data/lib/anaconda/anaconda_for.rb +2 -2
- data/lib/anaconda/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f2f581ae3f7c35f01cf722109099bd11a7aa17e
|
4
|
+
data.tar.gz: 0a70065bd87eaa9fe2c168c8ce4e68fc8b6d590a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9bb89ebfa49e1d30f03b7c8a9b05a3976b943a0bad924664f563a728fe0960f63cda5983b35aac1b72b7c6e8423210e1ae91f76c76d172c2a04220c5ceddbdce
|
7
|
+
data.tar.gz: a41891beeeb959a71ec11d267770b39a8d13f963d842787a3758d4c35901ec788688fb39de16b429f2a60712e346df3bcd5e49780ea23d1ae86e80a78c369c0f
|
data/README.markdown
CHANGED
@@ -156,6 +156,9 @@ We highly recommend the `figaro` gem [https://github.com/laserlemon/figaro](http
|
|
156
156
|
`asset_download_url` will return a signed S3 URL with content-disposition set to attachment so the file will be downloaded instead of opened in the browser.
|
157
157
|
|
158
158
|
## Changelog
|
159
|
+
* 0.11.0
|
160
|
+
* Change aws URLs to use path style URLs
|
161
|
+
|
159
162
|
* 0.10.0
|
160
163
|
* Add `download_url` magic method that uses content-disposition to force the browser to download the URL. This is a signed AWS url that is only valid for 1 hour
|
161
164
|
|
@@ -70,7 +70,7 @@ module Anaconda
|
|
70
70
|
return nil unless send("#{column_name}_file_path").present?
|
71
71
|
|
72
72
|
if send("#{column_name}_stored_privately")
|
73
|
-
aws = Fog::Storage.new({:provider => 'AWS', :aws_access_key_id => Anaconda.aws[:aws_access_key], :aws_secret_access_key => Anaconda.aws[:aws_secret_key]})
|
73
|
+
aws = Fog::Storage.new({:provider => 'AWS', :aws_access_key_id => Anaconda.aws[:aws_access_key], :aws_secret_access_key => Anaconda.aws[:aws_secret_key], :path_style => true})
|
74
74
|
aws.get_object_https_url(Anaconda.aws[:aws_bucket], send("#{column_name}_file_path"), 1.hour.from_now)
|
75
75
|
elsif self.anaconda_options[column_name.to_sym][:host]
|
76
76
|
"#{anaconda_protocol(column_name)}#{self.anaconda_options[column_name.to_sym][:host]}/#{send("#{column_name}_file_path")}"
|
@@ -83,7 +83,7 @@ module Anaconda
|
|
83
83
|
return nil unless send("#{column_name}_file_path").present?
|
84
84
|
|
85
85
|
options = {query: {"response-content-disposition" => "attachment;"}}
|
86
|
-
aws = Fog::Storage.new({:provider => 'AWS', :aws_access_key_id => Anaconda.aws[:aws_access_key], :aws_secret_access_key => Anaconda.aws[:aws_secret_key]})
|
86
|
+
aws = Fog::Storage.new({:provider => 'AWS', :aws_access_key_id => Anaconda.aws[:aws_access_key], :aws_secret_access_key => Anaconda.aws[:aws_secret_key], :path_style => true})
|
87
87
|
aws.get_object_https_url(Anaconda.aws[:aws_bucket], send("#{column_name}_file_path"), 1.hour.from_now, options)
|
88
88
|
|
89
89
|
end
|
data/lib/anaconda/version.rb
CHANGED