configure-s3-website-ng 3.0.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 +7 -0
- data/.gitignore +3 -0
- data/.travis.yml +5 -0
- data/Gemfile +2 -0
- data/LICENSE +19 -0
- data/README.md +280 -0
- data/Rakefile +11 -0
- data/bin/configure-s3-website +12 -0
- data/changelog.md +157 -0
- data/configure-s3-website.gemspec +23 -0
- data/lib/configure-s3-website/cli.rb +43 -0
- data/lib/configure-s3-website/cloudfront_client.rb +172 -0
- data/lib/configure-s3-website/config_source/config_source.rb +30 -0
- data/lib/configure-s3-website/config_source/file_config_source.rb +87 -0
- data/lib/configure-s3-website/endpoint_helper.rb +26 -0
- data/lib/configure-s3-website/http_helper.rb +74 -0
- data/lib/configure-s3-website/runner.rb +31 -0
- data/lib/configure-s3-website/s3_client.rb +129 -0
- data/lib/configure-s3-website/version.rb +3 -0
- data/lib/configure-s3-website/xml_helper.rb +15 -0
- data/lib/configure-s3-website.rb +10 -0
- data/spec/cloudfront_client_spec.rb +138 -0
- data/spec/config_source/file_config_source_spec.rb +68 -0
- data/spec/s3_client_spec.rb +162 -0
- data/spec/sample_files/_config_file.yml +3 -0
- data/spec/sample_files/_config_file_EU.yml +4 -0
- data/spec/sample_files/_config_file_no_credentials.yml +1 -0
- data/spec/sample_files/_config_file_oregon.yml +4 -0
- data/spec/sample_files/_config_file_with_eruby.yml +3 -0
- data/spec/sample_files/_custom_index_and_error_docs.yml +5 -0
- data/spec/sample_files/_custom_index_and_error_docs_with_routing_rules.yml +12 -0
- data/spec/xml_helper_spec.rb +39 -0
- metadata +145 -0
@@ -0,0 +1,138 @@
|
|
1
|
+
require 'rspec'
|
2
|
+
require 'configure-s3-website'
|
3
|
+
|
4
|
+
describe ConfigureS3Website::CloudFrontClient do
|
5
|
+
RSpec::Matchers.define :lambda_matcher do |lmbda, expected_value|
|
6
|
+
match { |create_distribution_args|
|
7
|
+
lmbda.call(create_distribution_args) == expected_value
|
8
|
+
}
|
9
|
+
end
|
10
|
+
|
11
|
+
def config_source_mock(cloudfront_distribution_config, region)
|
12
|
+
mock = double('config_source')
|
13
|
+
allow(mock).to receive(:s3_bucket_name).and_return('test-bucket')
|
14
|
+
allow(mock).to receive(:s3_endpoint).and_return(region)
|
15
|
+
allow(mock).to receive(:s3_access_key_id).and_return('foo')
|
16
|
+
allow(mock).to receive(:s3_secret_access_key).and_return('bar')
|
17
|
+
allow(mock).to receive(:cloudfront_distribution_id).and_return('AEEEE')
|
18
|
+
allow(mock).to receive(:cloudfront_distribution_id=).with(anything).and_return(nil)
|
19
|
+
allow(mock).to receive(:description)
|
20
|
+
allow(mock).to receive(:cloudfront_distribution_config).and_return(cloudfront_distribution_config)
|
21
|
+
mock
|
22
|
+
end
|
23
|
+
|
24
|
+
let(:aws_cloudfront_client) {
|
25
|
+
cloudfront_client = double('cloudfront_client')
|
26
|
+
create_distribution_response = double('create_dist_response')
|
27
|
+
allow(create_distribution_response).to receive_message_chain(:distribution, :id) { 'bar' }
|
28
|
+
allow(create_distribution_response).to receive_message_chain(:distribution, :domain_name) { 'foo' }
|
29
|
+
allow(create_distribution_response).to receive_message_chain(:distribution, :distribution_config, :origins, :items) {
|
30
|
+
[double( :domain_name => 'foo' )]
|
31
|
+
}
|
32
|
+
allow(cloudfront_client).to receive(:create_distribution).and_return(create_distribution_response)
|
33
|
+
get_distribution_response = double('get_distribution_response')
|
34
|
+
allow(get_distribution_response).to receive(:etag).and_return('tag')
|
35
|
+
allow(get_distribution_response).to receive_message_chain(:distribution, :distribution_config).and_return({
|
36
|
+
:default_cache_behavior => {
|
37
|
+
:viewer_protocol_policy => 'allow_all',
|
38
|
+
:min_ttl => 5000
|
39
|
+
}
|
40
|
+
})
|
41
|
+
allow(get_distribution_response).to receive_message_chain(:distribution, :distribution_config, :caller_reference) { 'ref' }
|
42
|
+
allow(cloudfront_client).to receive(:get_distribution).with(:id => 'AEEEE').and_return(get_distribution_response)
|
43
|
+
cloudfront_client
|
44
|
+
}
|
45
|
+
before {
|
46
|
+
allow(ConfigureS3Website::CloudFrontClient).to receive(:cloudfront).and_return(aws_cloudfront_client)
|
47
|
+
}
|
48
|
+
describe 'letting the user to override the default values' do
|
49
|
+
cloudfront_distribution_config = {
|
50
|
+
'default_cache_behavior' => {
|
51
|
+
'min_ttl' => 900
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
context "update distribution" do
|
56
|
+
it "let's the user to override the default ttl" do
|
57
|
+
expect(aws_cloudfront_client).to receive(:update_distribution).with(
|
58
|
+
lambda_matcher(lambda { |update_distribution_args|
|
59
|
+
update_distribution_args[:distribution_config][:default_cache_behavior][:min_ttl]
|
60
|
+
}, 900)
|
61
|
+
)
|
62
|
+
ConfigureS3Website::CloudFrontClient.send(
|
63
|
+
:apply_distribution_config,
|
64
|
+
{:config_source => config_source_mock(cloudfront_distribution_config, region = 'something') }
|
65
|
+
)
|
66
|
+
end
|
67
|
+
|
68
|
+
it 'retains the default values that are not overriden' do
|
69
|
+
expect(aws_cloudfront_client).to receive(:update_distribution).with(
|
70
|
+
lambda_matcher(lambda { |update_distribution_args|
|
71
|
+
update_distribution_args[:distribution_config][:default_cache_behavior][:viewer_protocol_policy]
|
72
|
+
}, 'allow_all')
|
73
|
+
)
|
74
|
+
ConfigureS3Website::CloudFrontClient.send(
|
75
|
+
:apply_distribution_config,
|
76
|
+
{:config_source => config_source_mock(cloudfront_distribution_config, region = 'something') }
|
77
|
+
)
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
context "create distribution" do
|
82
|
+
it "let's the user to override the default ttl" do
|
83
|
+
expect(aws_cloudfront_client).to receive(:create_distribution).with(
|
84
|
+
lambda_matcher(lambda { |create_distribution_args|
|
85
|
+
create_distribution_args[:distribution_config][:default_cache_behavior][:min_ttl]
|
86
|
+
}, 900)
|
87
|
+
)
|
88
|
+
ConfigureS3Website::CloudFrontClient.send(
|
89
|
+
:create_distribution,
|
90
|
+
{:config_source => config_source_mock(cloudfront_distribution_config, region = 'something') }
|
91
|
+
)
|
92
|
+
end
|
93
|
+
|
94
|
+
it 'retains the default values that are not overriden' do
|
95
|
+
expect(aws_cloudfront_client).to receive(:create_distribution).with(
|
96
|
+
lambda_matcher(lambda { |create_distribution_args|
|
97
|
+
create_distribution_args[:distribution_config][:default_cache_behavior][:viewer_protocol_policy]
|
98
|
+
}, 'allow-all')
|
99
|
+
)
|
100
|
+
ConfigureS3Website::CloudFrontClient.send(
|
101
|
+
:create_distribution,
|
102
|
+
{:config_source => config_source_mock(cloudfront_distribution_config, region = 'something') }
|
103
|
+
)
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
[
|
109
|
+
{ :region => 'us-east-1', :website_endpoint => 's3-website-us-east-1.amazonaws.com' },
|
110
|
+
{ :region => 'us-west-1', :website_endpoint => 's3-website-us-west-1.amazonaws.com' },
|
111
|
+
{ :region => 'us-west-2', :website_endpoint => 's3-website-us-west-2.amazonaws.com' },
|
112
|
+
{ :region => 'ap-south-1', :website_endpoint => 's3-website.ap-south-1.amazonaws.com' },
|
113
|
+
{ :region => 'ap-northeast-2', :website_endpoint => 's3-website.ap-northeast-2.amazonaws.com' },
|
114
|
+
{ :region => 'ap-southeast-1', :website_endpoint => 's3-website-ap-southeast-1.amazonaws.com' },
|
115
|
+
{ :region => 'ap-southeast-2', :website_endpoint => 's3-website-ap-southeast-2.amazonaws.com' },
|
116
|
+
{ :region => 'ap-northeast-1', :website_endpoint => 's3-website-ap-northeast-1.amazonaws.com' },
|
117
|
+
{ :region => 'eu-central-1', :website_endpoint => 's3-website.eu-central-1.amazonaws.com' },
|
118
|
+
{ :region => 'eu-west-1', :website_endpoint => 's3-website-eu-west-1.amazonaws.com' },
|
119
|
+
{ :region => 'sa-east-1', :website_endpoint => 's3-website-sa-east-1.amazonaws.com' },
|
120
|
+
].each { |conf|
|
121
|
+
region = conf[:region]
|
122
|
+
website_endpoint = conf[:website_endpoint]
|
123
|
+
|
124
|
+
describe "create distribution in #{region}" do
|
125
|
+
it "honors the endpoint of the S3 website (#{region})" do
|
126
|
+
expect(aws_cloudfront_client).to receive(:create_distribution).with(
|
127
|
+
lambda_matcher(lambda { |create_distribution_args|
|
128
|
+
create_distribution_args[:distribution_config][:origins][:items][0][:domain_name]
|
129
|
+
}, "test-bucket.#{website_endpoint}")
|
130
|
+
)
|
131
|
+
ConfigureS3Website::CloudFrontClient.send(
|
132
|
+
:create_distribution,
|
133
|
+
{:config_source => config_source_mock({}, region = region) }
|
134
|
+
)
|
135
|
+
end
|
136
|
+
end
|
137
|
+
}
|
138
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
require 'rspec'
|
2
|
+
require 'configure-s3-website'
|
3
|
+
require 'tempfile'
|
4
|
+
|
5
|
+
describe ConfigureS3Website::FileConfigSource do
|
6
|
+
let(:yaml_file_path) {
|
7
|
+
'spec/sample_files/_config_file_with_eruby.yml'
|
8
|
+
}
|
9
|
+
|
10
|
+
let(:config_source) {
|
11
|
+
ConfigureS3Website::FileConfigSource.new(yaml_file_path)
|
12
|
+
}
|
13
|
+
|
14
|
+
it 'can parse files that contain eRuby code' do
|
15
|
+
expect(config_source.s3_access_key_id).to eq('hello world')
|
16
|
+
expect(config_source.s3_secret_access_key).to eq('secret world')
|
17
|
+
expect(config_source.s3_bucket_name).to eq('my-bucket')
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'returns the yaml file path as description' do
|
21
|
+
expect(config_source.description).to eq(yaml_file_path)
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'does not require s3_id, s3_secret or profile ' do
|
25
|
+
config_no_credentials = ConfigureS3Website::FileConfigSource.new('spec/sample_files/_config_file_no_credentials.yml')
|
26
|
+
expect(config_no_credentials.s3_access_key_id).to be_nil
|
27
|
+
expect(config_no_credentials.s3_secret_access_key).to be_nil
|
28
|
+
expect(config_no_credentials.profile).to be_nil
|
29
|
+
expect(config_no_credentials.s3_bucket_name).to eq('my-bucket')
|
30
|
+
end
|
31
|
+
|
32
|
+
describe 'setter for cloudfront_distribution_id' do
|
33
|
+
let(:original_yaml_contents) {
|
34
|
+
%Q{
|
35
|
+
s3_id: foo
|
36
|
+
s3_secret: <%= ENV['my-s3-secret'] %>
|
37
|
+
s3_bucket: helloworld.com
|
38
|
+
|
39
|
+
# This is a comment
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
let(:result) {
|
44
|
+
config_file = Tempfile.new 'testfile'
|
45
|
+
config_file.write original_yaml_contents
|
46
|
+
config_file.close
|
47
|
+
config_source = ConfigureS3Website::FileConfigSource.new(config_file.path)
|
48
|
+
config_source.cloudfront_distribution_id = 'xxyyzz'
|
49
|
+
File.open(config_file.path).read
|
50
|
+
}
|
51
|
+
|
52
|
+
it 'retains the ERB code' do
|
53
|
+
expect(result).to include "<%= ENV['my-s3-secret'] %>"
|
54
|
+
end
|
55
|
+
|
56
|
+
it 'appends the CloudFront id as the last enabled value in the YAML file' do
|
57
|
+
expected = %Q{
|
58
|
+
s3_id: foo
|
59
|
+
s3_secret: <%= ENV['my-s3-secret'] %>
|
60
|
+
s3_bucket: helloworld.com
|
61
|
+
cloudfront_distribution_id: xxyyzz
|
62
|
+
|
63
|
+
# This is a comment
|
64
|
+
}
|
65
|
+
expect(result).to eq(expected)
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
@@ -0,0 +1,162 @@
|
|
1
|
+
require 'rspec'
|
2
|
+
require 'configure-s3-website'
|
3
|
+
|
4
|
+
Aws.config[:stub_responses] = true
|
5
|
+
|
6
|
+
describe ConfigureS3Website::S3Client do
|
7
|
+
context 'bucket name' do
|
8
|
+
let(:config_source) {
|
9
|
+
ConfigureS3Website::FileConfigSource.new('spec/sample_files/_custom_index_and_error_docs.yml')
|
10
|
+
}
|
11
|
+
|
12
|
+
it 'calls the S3 API with the correct bucket name' do
|
13
|
+
allow_any_instance_of(Aws::S3::Client).to receive(:put_bucket_website).with(
|
14
|
+
hash_including(
|
15
|
+
:bucket => "my-bucket"
|
16
|
+
)
|
17
|
+
)
|
18
|
+
ConfigureS3Website::S3Client.configure_website({config_source: config_source})
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
describe 'the EU region alias' do
|
23
|
+
let(:config_source) {
|
24
|
+
ConfigureS3Website::FileConfigSource.new('spec/sample_files/_config_file_EU.yml')
|
25
|
+
}
|
26
|
+
|
27
|
+
it 'translates into eu-west-1' do
|
28
|
+
allow_any_instance_of(Aws::S3::Client).to receive(:create_bucket).with(
|
29
|
+
hash_including(
|
30
|
+
create_bucket_configuration: {
|
31
|
+
location_constraint: 'eu-west-1'
|
32
|
+
}
|
33
|
+
)
|
34
|
+
)
|
35
|
+
ConfigureS3Website::S3Client.send(:create_bucket, config_source)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
context 'custom index and error documents' do
|
40
|
+
let(:config_source) {
|
41
|
+
ConfigureS3Website::FileConfigSource.new('spec/sample_files/_custom_index_and_error_docs.yml')
|
42
|
+
}
|
43
|
+
|
44
|
+
it 'calls the S3 API with the custom index and error documents' do
|
45
|
+
allow_any_instance_of(Aws::S3::Client).to receive(:put_bucket_website).with(
|
46
|
+
hash_including(
|
47
|
+
:website_configuration=> {
|
48
|
+
:index_document => {
|
49
|
+
:suffix => "default.html"
|
50
|
+
},
|
51
|
+
:error_document => {
|
52
|
+
:key => "404.html"
|
53
|
+
},
|
54
|
+
:routing_rules => nil
|
55
|
+
}
|
56
|
+
)
|
57
|
+
)
|
58
|
+
ConfigureS3Website::S3Client.configure_website({config_source: config_source})
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
context 'create bucket' do
|
63
|
+
[
|
64
|
+
{ :region => 'us-east-1' },
|
65
|
+
{ :region => 'us-west-1' },
|
66
|
+
{ :region => 'us-west-2' },
|
67
|
+
{ :region => 'ap-south-1' },
|
68
|
+
{ :region => 'ap-northeast-2' },
|
69
|
+
{ :region => 'ap-southeast-1' },
|
70
|
+
{ :region => 'ap-southeast-2' },
|
71
|
+
{ :region => 'ap-northeast-1' },
|
72
|
+
{ :region => 'eu-central-1' },
|
73
|
+
{ :region => 'eu-west-1' },
|
74
|
+
{ :region => 'sa-east-1' },
|
75
|
+
].each { |conf|
|
76
|
+
it 'calls the S3 CreateBucket API with the correct location constraint' do
|
77
|
+
allow_any_instance_of(Aws::S3::Client).to receive(:create_bucket).with(
|
78
|
+
hash_including(
|
79
|
+
create_bucket_configuration:
|
80
|
+
if conf[:region] == 'us-east-1'
|
81
|
+
nil
|
82
|
+
else
|
83
|
+
{
|
84
|
+
location_constraint: conf[:region]
|
85
|
+
}
|
86
|
+
end
|
87
|
+
)
|
88
|
+
)
|
89
|
+
config_source = double('config_source')
|
90
|
+
allow(config_source).to receive(:s3_access_key_id).and_return('test')
|
91
|
+
allow(config_source).to receive(:s3_secret_access_key).and_return('test')
|
92
|
+
allow(config_source).to receive(:s3_bucket_name).and_return('test-bucket')
|
93
|
+
allow(config_source).to receive(:s3_endpoint).and_return(conf[:region])
|
94
|
+
ConfigureS3Website::S3Client.send(:create_bucket, config_source)
|
95
|
+
end
|
96
|
+
}
|
97
|
+
end
|
98
|
+
|
99
|
+
context 'bucket policy' do
|
100
|
+
let(:config_source) {
|
101
|
+
ConfigureS3Website::FileConfigSource.new('spec/sample_files/_custom_index_and_error_docs.yml')
|
102
|
+
}
|
103
|
+
|
104
|
+
it 'sets the bucket readable to the whole world' do
|
105
|
+
allow_any_instance_of(Aws::S3::Client).to receive(:put_bucket_policy).with(
|
106
|
+
hash_including(
|
107
|
+
:policy => "{\n \"Version\":\"2008-10-17\",\n \"Statement\":[{\n \"Sid\":\"PublicReadForGetBucketObjects\",\n \"Effect\":\"Allow\",\n \"Principal\": { \"AWS\": \"*\" },\n \"Action\":[\"s3:GetObject\"],\n \"Resource\":[\"arn:aws:s3:::my-bucket/*\"]\n }]\n }"
|
108
|
+
)
|
109
|
+
)
|
110
|
+
ConfigureS3Website::S3Client.configure_website({config_source: config_source})
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
context 'redirect rules' do
|
115
|
+
let(:config_source) {
|
116
|
+
ConfigureS3Website::FileConfigSource.new('spec/sample_files/_custom_index_and_error_docs_with_routing_rules.yml')
|
117
|
+
}
|
118
|
+
|
119
|
+
it 'calls the S3 API with the redirect rules settings' do
|
120
|
+
allow_any_instance_of(Aws::S3::Client).to receive(:put_bucket_website).with(
|
121
|
+
hash_including(
|
122
|
+
:website_configuration => {
|
123
|
+
:index_document => {
|
124
|
+
:suffix => "default.html"
|
125
|
+
},
|
126
|
+
:error_document => {
|
127
|
+
:key => "missing.html"
|
128
|
+
},
|
129
|
+
:routing_rules => [
|
130
|
+
{
|
131
|
+
:condition => {
|
132
|
+
:key_prefix_equals => "blog/some_path"
|
133
|
+
},
|
134
|
+
:redirect => {
|
135
|
+
:host_name => "blog.example.com",
|
136
|
+
:replace_key_prefix_with => "some_new_path/",
|
137
|
+
:http_redirect_code => "301"
|
138
|
+
}
|
139
|
+
}
|
140
|
+
]
|
141
|
+
}
|
142
|
+
)
|
143
|
+
)
|
144
|
+
ConfigureS3Website::S3Client.configure_website({config_source: config_source})
|
145
|
+
end
|
146
|
+
end
|
147
|
+
|
148
|
+
context 's3_id, s3_secret and profile not required' do
|
149
|
+
let(:config_source) {
|
150
|
+
ConfigureS3Website::FileConfigSource.new('spec/sample_files/_config_file_no_credentials.yml')
|
151
|
+
}
|
152
|
+
|
153
|
+
it 'calls the S3 API successfully' do
|
154
|
+
allow_any_instance_of(Aws::S3::Client).to receive(:put_bucket_website).with(
|
155
|
+
hash_including(
|
156
|
+
:bucket => "my-bucket"
|
157
|
+
)
|
158
|
+
)
|
159
|
+
ConfigureS3Website::S3Client.configure_website({config_source: config_source})
|
160
|
+
end
|
161
|
+
end
|
162
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
s3_bucket: my-bucket
|
@@ -0,0 +1,12 @@
|
|
1
|
+
s3_id: <%= 'hello world' %>
|
2
|
+
s3_secret: <%= 'secret world' %>
|
3
|
+
s3_bucket: my-bucket
|
4
|
+
index_document: default.html
|
5
|
+
error_document: missing.html
|
6
|
+
routing_rules:
|
7
|
+
- condition:
|
8
|
+
key_prefix_equals: blog/some_path
|
9
|
+
redirect:
|
10
|
+
host_name: blog.example.com
|
11
|
+
replace_key_prefix_with: some_new_path/
|
12
|
+
http_redirect_code: 301
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'rspec'
|
2
|
+
require 'configure-s3-website'
|
3
|
+
|
4
|
+
describe ConfigureS3Website::XmlHelper do
|
5
|
+
context '#hash_to_api_xml' do
|
6
|
+
it 'returns an empty string, if the hash is empty' do
|
7
|
+
str = ConfigureS3Website::XmlHelper.send(:hash_to_api_xml,
|
8
|
+
{ })
|
9
|
+
expect(str).to eq('')
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'capitalises hash keys but not values' do
|
13
|
+
str = ConfigureS3Website::XmlHelper.send(:hash_to_api_xml,
|
14
|
+
{ 'key' => 'value' })
|
15
|
+
expect(str).to eq("\n<Key>value</Key>")
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'removes underscores and capitalises the following letter' do
|
19
|
+
str = ConfigureS3Website::XmlHelper.send(:hash_to_api_xml,
|
20
|
+
{ 'hello_key' => 'value' })
|
21
|
+
expect(str).to eq("\n<HelloKey>value</HelloKey>")
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'can handle hash values as well' do
|
25
|
+
str = ConfigureS3Website::XmlHelper.send(:hash_to_api_xml,
|
26
|
+
{ 'key' => { 'subkey' => 'subvalue' } })
|
27
|
+
expect(str).to eq("\n<Key>\n <Subkey>subvalue</Subkey></Key>")
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'indents' do
|
31
|
+
str = ConfigureS3Website::XmlHelper.send(
|
32
|
+
:hash_to_api_xml,
|
33
|
+
{ 'key' => { 'subkey' => 'subvalue' } },
|
34
|
+
indent = 1
|
35
|
+
)
|
36
|
+
expect(str).to eq("\n <Key>\n <Subkey>subvalue</Subkey></Key>")
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
metadata
ADDED
@@ -0,0 +1,145 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: configure-s3-website-ng
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 3.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ingelabs
|
8
|
+
- Lauri Lehmijoki
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2023-07-11 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: deep_merge
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
requirements:
|
18
|
+
- - "~>"
|
19
|
+
- !ruby/object:Gem::Version
|
20
|
+
version: 1.0.0
|
21
|
+
type: :runtime
|
22
|
+
prerelease: false
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - "~>"
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: 1.0.0
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
name: aws-sdk
|
30
|
+
requirement: !ruby/object:Gem::Requirement
|
31
|
+
requirements:
|
32
|
+
- - "~>"
|
33
|
+
- !ruby/object:Gem::Version
|
34
|
+
version: '2'
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '2'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
name: rspec
|
44
|
+
requirement: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '3'
|
49
|
+
type: :development
|
50
|
+
prerelease: false
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - "~>"
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '3'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: rspec-expectations
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - "~>"
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '3'
|
63
|
+
type: :development
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '3'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: rake
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - "~>"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: 0.9.0
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - "~>"
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: 0.9.0
|
84
|
+
description:
|
85
|
+
email: info@ingelabs.com
|
86
|
+
executables:
|
87
|
+
- configure-s3-website
|
88
|
+
extensions: []
|
89
|
+
extra_rdoc_files: []
|
90
|
+
files:
|
91
|
+
- ".gitignore"
|
92
|
+
- ".travis.yml"
|
93
|
+
- Gemfile
|
94
|
+
- LICENSE
|
95
|
+
- README.md
|
96
|
+
- Rakefile
|
97
|
+
- bin/configure-s3-website
|
98
|
+
- changelog.md
|
99
|
+
- configure-s3-website.gemspec
|
100
|
+
- lib/configure-s3-website.rb
|
101
|
+
- lib/configure-s3-website/cli.rb
|
102
|
+
- lib/configure-s3-website/cloudfront_client.rb
|
103
|
+
- lib/configure-s3-website/config_source/config_source.rb
|
104
|
+
- lib/configure-s3-website/config_source/file_config_source.rb
|
105
|
+
- lib/configure-s3-website/endpoint_helper.rb
|
106
|
+
- lib/configure-s3-website/http_helper.rb
|
107
|
+
- lib/configure-s3-website/runner.rb
|
108
|
+
- lib/configure-s3-website/s3_client.rb
|
109
|
+
- lib/configure-s3-website/version.rb
|
110
|
+
- lib/configure-s3-website/xml_helper.rb
|
111
|
+
- spec/cloudfront_client_spec.rb
|
112
|
+
- spec/config_source/file_config_source_spec.rb
|
113
|
+
- spec/s3_client_spec.rb
|
114
|
+
- spec/sample_files/_config_file.yml
|
115
|
+
- spec/sample_files/_config_file_EU.yml
|
116
|
+
- spec/sample_files/_config_file_no_credentials.yml
|
117
|
+
- spec/sample_files/_config_file_oregon.yml
|
118
|
+
- spec/sample_files/_config_file_with_eruby.yml
|
119
|
+
- spec/sample_files/_custom_index_and_error_docs.yml
|
120
|
+
- spec/sample_files/_custom_index_and_error_docs_with_routing_rules.yml
|
121
|
+
- spec/xml_helper_spec.rb
|
122
|
+
homepage: https://github.com/ingelabs/configure-s3-website
|
123
|
+
licenses: []
|
124
|
+
metadata: {}
|
125
|
+
post_install_message:
|
126
|
+
rdoc_options: []
|
127
|
+
require_paths:
|
128
|
+
- lib
|
129
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
130
|
+
requirements:
|
131
|
+
- - ">="
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
134
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
requirements: []
|
140
|
+
rubygems_version: 3.1.2
|
141
|
+
signing_key:
|
142
|
+
specification_version: 4
|
143
|
+
summary: Fork of configure-s3-website - Configure your AWS S3 bucket to function as
|
144
|
+
a web site
|
145
|
+
test_files: []
|