anaconda 0.10.0 → 0.11.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 830e53717f29f2229e104f5fedbe270bf7ae0fec
4
- data.tar.gz: 744677a55ffeb7cfe4f8ff5590aa67b2eb6f5031
3
+ metadata.gz: 7f2f581ae3f7c35f01cf722109099bd11a7aa17e
4
+ data.tar.gz: 0a70065bd87eaa9fe2c168c8ce4e68fc8b6d590a
5
5
  SHA512:
6
- metadata.gz: 9287ef9d60d71561104edb806c5f571a0729fb55831286e21a287e191402d932fab6d135645f00f3c6233cf27a7dcf7eb8749f221f7251249001c3010b66852f
7
- data.tar.gz: 1d31ca5e855d8a361752685e2b0add17ca3faddb2c4a2913d95607d86935f7c5ac4b9380dafb8da85226b9bad7fb64b973bf4ddd03517c47c71b534569fdf841
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
@@ -1,5 +1,5 @@
1
1
  module Anaconda
2
2
  module Rails
3
- VERSION = "0.10.0"
3
+ VERSION = "0.11.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anaconda
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben McFadden