fog-aws 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fog/aws.rb +1 -1
- data/lib/fog/aws/storage.rb +17 -0
- data/lib/fog/aws/version.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3fe29ce48c8320ccf8c25c90b13c56ceb6ea94c3
|
4
|
+
data.tar.gz: dde71551b86d3333f8e85cbae203fd85cef1cb8b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddd00c675fb5dee5a7eeccbb255e380342b4a819278071d9c7ed1b746f6b2d03125ef5b0844bdb111d007d238812d10f9807cb925874f7685026369faf47f588
|
7
|
+
data.tar.gz: d31c7bbd8cb8b18d2a0ffdfc54a09c8f7bb6adb678c8d571aba151624e8912f6190bd3f16475dab04e3a1901ccb3d302b68ec832a84f73a9fdbacd70e7431593
|
data/lib/fog/aws.rb
CHANGED
@@ -224,7 +224,7 @@ module Fog
|
|
224
224
|
end
|
225
225
|
|
226
226
|
def self.regions
|
227
|
-
@regions ||= ['ap-northeast-1', 'ap-southeast-1', 'ap-southeast-2', 'eu-central-1', 'eu-west-1', 'us-east-1', 'us-west-1', 'us-west-2', 'sa-east-1', 'cn-north-1', 'us-gov-west-1']
|
227
|
+
@regions ||= ['ap-northeast-1', 'ap-northeast-2', 'ap-southeast-1', 'ap-southeast-2', 'eu-central-1', 'eu-west-1', 'us-east-1', 'us-west-1', 'us-west-2', 'sa-east-1', 'cn-north-1', 'us-gov-west-1']
|
228
228
|
end
|
229
229
|
|
230
230
|
def self.validate_region!(region, host=nil)
|
data/lib/fog/aws/storage.rb
CHANGED
@@ -133,6 +133,20 @@ module Fog
|
|
133
133
|
https_url(params, expires)
|
134
134
|
end
|
135
135
|
|
136
|
+
def require_mime_types
|
137
|
+
begin
|
138
|
+
# Use mime/types/columnar if available, for reduced memory usage
|
139
|
+
require 'mime/types/columnar'
|
140
|
+
rescue LoadError
|
141
|
+
begin
|
142
|
+
require 'mime/types'
|
143
|
+
rescue LoadError
|
144
|
+
Fog::Logger.warning("'mime-types' missing, please install and try again.")
|
145
|
+
exit(1)
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
136
150
|
def request_url(params)
|
137
151
|
params = request_params(params)
|
138
152
|
params_to_url(params)
|
@@ -406,6 +420,8 @@ module Fog
|
|
406
420
|
end
|
407
421
|
|
408
422
|
def initialize(options={})
|
423
|
+
require_mime_types
|
424
|
+
|
409
425
|
@use_iam_profile = options[:use_iam_profile]
|
410
426
|
|
411
427
|
@region = options[:region] || DEFAULT_REGION
|
@@ -473,6 +489,7 @@ module Fog
|
|
473
489
|
# ==== Returns
|
474
490
|
# * S3 object with connection to aws.
|
475
491
|
def initialize(options={})
|
492
|
+
require_mime_types
|
476
493
|
|
477
494
|
@use_iam_profile = options[:use_iam_profile]
|
478
495
|
@instrumentor = options[:instrumentor]
|
data/lib/fog/aws/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fog-aws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Lane
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-01-
|
12
|
+
date: 2016-01-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -1589,4 +1589,3 @@ signing_key:
|
|
1589
1589
|
specification_version: 4
|
1590
1590
|
summary: Module for the 'fog' gem to support Amazon Web Services.
|
1591
1591
|
test_files: []
|
1592
|
-
has_rdoc:
|