middleman-s3_sync 3.0.44 → 3.0.45
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 +4 -4
- data/README.md +4 -0
- data/lib/middleman/s3_sync.rb +14 -4
- data/lib/middleman/s3_sync/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: 10ed99e03229c37d05e89b9d54f7ca3fa5ed9c61
|
4
|
+
data.tar.gz: bc853f7697f4288928a281b208fd348f47135f76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52ccf37f0217581071d908e9010fd9d3ccfa20e19b12dcfbf4d4c6547d6bb224910103ff1dcbc12e8c1288212b727c8d5820dc01c8a595e44bf406e1bd09d777
|
7
|
+
data.tar.gz: 403f0678c256ae11d43028093ce7d82c842d5a82312432fc198c11c3026ab6fe27743678d954abca200aa7d67102220875d79356a5f7feecd9de60ae5d91a093
|
data/README.md
CHANGED
@@ -117,6 +117,10 @@ map to the following values:
|
|
117
117
|
The environment is used when the credentials are not set in the activate
|
118
118
|
method or passed through the ```.s3_sync``` configuration file.
|
119
119
|
|
120
|
+
#### Through IAM role
|
121
|
+
|
122
|
+
Alternatively, if you are running builds on EC2 instance which has approrpiate IAM role, then you don't need to think about specifying credentials at all – they will be pulled from AWS metadata server.
|
123
|
+
|
120
124
|
### IAM Policy
|
121
125
|
|
122
126
|
Here's a sample IAM policy that will allow a user to update the site
|
data/lib/middleman/s3_sync.rb
CHANGED
@@ -58,12 +58,22 @@ module Middleman
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def connection
|
61
|
-
|
62
|
-
|
63
|
-
:aws_secret_access_key => s3_sync_options.aws_secret_access_key,
|
61
|
+
|
62
|
+
connection_options = {
|
64
63
|
:region => s3_sync_options.region,
|
65
64
|
:path_style => s3_sync_options.path_style
|
66
|
-
}
|
65
|
+
}
|
66
|
+
|
67
|
+
if s3_sync_options.aws_access_key_id && s3_sync_options.aws_secret_access_key
|
68
|
+
connection_options.merge!({
|
69
|
+
:aws_access_key_id => s3_sync_options.aws_access_key_id,
|
70
|
+
:aws_secret_access_key => s3_sync_options.aws_secret_access_key
|
71
|
+
})
|
72
|
+
else
|
73
|
+
connection_options.merge!({ :use_iam_profile => true })
|
74
|
+
end
|
75
|
+
|
76
|
+
@connection ||= Fog::Storage::AWS.new(connection_options)
|
67
77
|
end
|
68
78
|
|
69
79
|
def resources
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-s3_sync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.45
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frederic Jean
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-04-
|
12
|
+
date: 2015-04-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: middleman-core
|