renuo-cli 1.4.3 → 1.4.4

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
  SHA256:
3
- metadata.gz: 9d7d157d9741b870afa476c08d4070124399e8a512fb735b7929c53399cfda0f
4
- data.tar.gz: 68d7e571f56ac43e87601246bed713f852552476530d9ec66496c23ff9c8a127
3
+ metadata.gz: 7a14a5db957080089a5f4f809b39fe01ec7e881d9e0b5066d0d2feb6051cb345
4
+ data.tar.gz: daa82da64aea95acf2efa4ad216652f97ff0822d1b1efb426c0e464b60be7a8d
5
5
  SHA512:
6
- metadata.gz: bca5c69457b1cd7c4a67b2f571eea0f30f104f32cabf6372bd0e98e5a4c5e8c7cf84da3c0b2948fc387892ce2644a0224780bc60668bae11a65718c19ec539c7
7
- data.tar.gz: 042f2f3364b854c726e1035c5bc8b13cc0f5a4140692a6311a38c6c559c6299c6a11e3dd0bfeb3f5b43cdcaa6c162973d27913398cdff44f44def2778d102cd0
6
+ metadata.gz: 7ff506e5db3ec04bd1a207af08ee9bd1a83d20a038391fb19dca2dfe2624b1973537d18223e31ae403c73d87d13034a6e437ba3d9de402d7f6e1c4e2af6c6046
7
+ data.tar.gz: 89aa94ad40d176b73293fd475416b6aa1a745ceb62f814f1a36612eb5e47052f6be85d68bc6cfa7491e7c696974e6f0b13640786ceb62e4af3c66712e62d8153
@@ -75,16 +75,16 @@ class CreateAwsProject
75
75
  say "\n# AWS #{branch} \n".colorize :green
76
76
  # wrap_at inserts newlines, after that, the command is no longer copyable
77
77
  $terminal.wrap_at = nil if $terminal
78
- say aws_iam_setup(@aws_profile, aws_user(branch), @aws_app_group)
79
- say aws_s3_setup(@aws_profile, aws_user(branch), @aws_region, @redmine_project)
80
- say aws_s3_versioning_setup(@aws_profile, aws_user(branch)) if branch == 'master'
78
+ puts aws_iam_setup(@aws_profile, aws_user(branch), @aws_app_group)
79
+ puts aws_s3_setup(@aws_profile, aws_user(branch), @aws_region, @redmine_project)
80
+ puts aws_s3_versioning_setup(@aws_profile, aws_user(branch)) if branch == 'master'
81
81
  cloudfront_setup(aws_user(branch), branch)
82
- $terminal.wrap_at = :auto if $terminal
82
+ $terminal.wrap_at = :auto if $terminal
83
83
  end
84
84
 
85
85
  def cloudfront_setup(bucket, branch)
86
86
  return unless @setup_cloudfront
87
- say aws_cloudfront_setup(@aws_profile, bucket, branch, @redmine_project)
87
+ puts aws_cloudfront_setup(@aws_profile, bucket, branch, @redmine_project)
88
88
  if @cloudfront_alias[branch.to_sym]
89
89
  say "\n# Warning: Don't forget to set up `#{cloudfront_alias(branch)}` on the DNS "\
90
90
  'if not yet done'.colorize :yellow
@@ -128,7 +128,7 @@ class CreateAwsProject
128
128
  cloudfront_config_string = CloudfrontConfigService.new(bucket, cloudfront_alias(branch), tags).to_s
129
129
 
130
130
  <<-CLOUDFRONT_COMMANDS
131
- aws --profile #{profile} cloudfront create-distribution-with-tags --cli-input-json '#{cloudfront_config_string}'
131
+ aws --profile #{profile} cloudfront create-distribution-with-tags --distribution-config-with-tags '#{cloudfront_config_string}'
132
132
  CLOUDFRONT_COMMANDS
133
133
  end
134
134
  end
@@ -14,104 +14,103 @@ class CloudfrontConfigService
14
14
  # rubocop:disable Metrics/MethodLength
15
15
  def bucket_config
16
16
  {
17
- "DistributionConfigWithTags": {
18
- "DistributionConfig": {
19
- "CallerReference": unique_caller_reference,
20
- "Aliases": bucket_aliases,
21
- "Origins": {
22
- "Quantity": 1,
23
- "Items": [
24
- {
25
- "Id": "S3-#{@bucket}",
26
- "DomainName": "#{@bucket}.s3.amazonaws.com",
27
- "OriginPath": '',
28
- "CustomHeaders": {
29
- "Quantity": 0
30
- },
31
- "S3OriginConfig": {
32
- "OriginAccessIdentity": ''
33
- }
34
- }
35
- ]
36
- },
37
- "DefaultCacheBehavior": {
38
- "TargetOriginId": "S3-#{@bucket}",
39
- "ForwardedValues": {
40
- "QueryString": false,
41
- "Cookies": {
42
- "Forward": 'none'
43
- },
44
- "Headers": {
17
+ "DistributionConfig": {
18
+ "CallerReference": unique_caller_reference,
19
+ "Aliases": bucket_aliases,
20
+ "Origins": {
21
+ "Quantity": 1,
22
+ "Items": [
23
+ {
24
+ "Id": "S3-#{@bucket}",
25
+ "DomainName": "#{@bucket}.s3.amazonaws.com",
26
+ "OriginPath": '',
27
+ "CustomHeaders": {
45
28
  "Quantity": 0
46
29
  },
47
- "QueryStringCacheKeys": {
48
- "Quantity": 0
30
+ "S3OriginConfig": {
31
+ "OriginAccessIdentity": ''
49
32
  }
33
+ }
34
+ ]
35
+ },
36
+ "DefaultCacheBehavior": {
37
+ "TargetOriginId": "S3-#{@bucket}",
38
+ "ForwardedValues": {
39
+ "QueryString": false,
40
+ "Cookies": {
41
+ "Forward": 'none'
50
42
  },
51
- "TrustedSigners": {
52
- "Enabled": false,
43
+ "Headers": {
53
44
  "Quantity": 0
54
45
  },
55
- "ViewerProtocolPolicy": 'redirect-to-https',
56
- "MinTTL": 0,
57
- "AllowedMethods": {
46
+ "QueryStringCacheKeys": {
47
+ "Quantity": 0
48
+ }
49
+ },
50
+ "TrustedSigners": {
51
+ "Enabled": false,
52
+ "Quantity": 0
53
+ },
54
+ "ViewerProtocolPolicy": 'redirect-to-https',
55
+ "MinTTL": 0,
56
+ "AllowedMethods": {
57
+ "Quantity": 2,
58
+ "Items": %w[
59
+ HEAD
60
+ GET
61
+ ],
62
+ "CachedMethods": {
58
63
  "Quantity": 2,
59
64
  "Items": %w[
60
65
  HEAD
61
66
  GET
62
- ],
63
- "CachedMethods": {
64
- "Quantity": 2,
65
- "Items": %w[
66
- HEAD
67
- GET
68
- ]
69
- }
70
- },
71
- "SmoothStreaming": false,
72
- "DefaultTTL": 86_400,
73
- "MaxTTL": 31_536_000,
74
- "Compress": true,
75
- "LambdaFunctionAssociations": {
76
- "Quantity": 0
67
+ ]
77
68
  }
78
69
  },
79
- "CacheBehaviors": {
70
+ "SmoothStreaming": false,
71
+ "DefaultTTL": 86_400,
72
+ "MaxTTL": 31_536_000,
73
+ "Compress": true,
74
+ "LambdaFunctionAssociations": {
80
75
  "Quantity": 0
81
- },
82
- "CustomErrorResponses": {
76
+ }
77
+ },
78
+ "CacheBehaviors": {
79
+ "Quantity": 0
80
+ },
81
+ "CustomErrorResponses": {
82
+ "Quantity": 0
83
+ },
84
+ "Comment": '',
85
+ "Logging": {
86
+ "Enabled": false,
87
+ "IncludeCookies": false,
88
+ "Bucket": '',
89
+ "Prefix": ''
90
+ },
91
+ "PriceClass": 'PriceClass_100',
92
+ "Enabled": true,
93
+ "ViewerCertificate": {
94
+ "CloudFrontDefaultCertificate": true,
95
+ "MinimumProtocolVersion": 'TLSv1.2_2018',
96
+ "CertificateSource": 'cloudfront'
97
+ },
98
+ "Restrictions": {
99
+ "GeoRestriction": {
100
+ "RestrictionType": 'none',
83
101
  "Quantity": 0
84
- },
85
- "Comment": '',
86
- "Logging": {
87
- "Enabled": false,
88
- "IncludeCookies": false,
89
- "Bucket": '',
90
- "Prefix": ''
91
- },
92
- "PriceClass": 'PriceClass_100',
93
- "Enabled": true,
94
- "ViewerCertificate": {
95
- "CloudFrontDefaultCertificate": true,
96
- "MinimumProtocolVersion": 'TLSv1.2_2018',
97
- "CertificateSource": 'cloudfront'
98
- },
99
- "Restrictions": {
100
- "GeoRestriction": {
101
- "RestrictionType": 'none',
102
- "Quantity": 0
103
- }
104
- },
105
- "WebACLId": '',
106
- "HttpVersion": 'http2',
107
- "IsIPV6Enabled": true
102
+ }
108
103
  },
109
- "Tags": {
110
- "Items": @tags
111
- }
104
+ "WebACLId": '',
105
+ "HttpVersion": 'http2',
106
+ "IsIPV6Enabled": true
107
+ },
108
+ "Tags": {
109
+ "Items": @tags
112
110
  }
113
111
  }
114
112
  end
113
+
115
114
  # rubocop:enable Metrics/MethodLength
116
115
 
117
116
  def unique_caller_reference
@@ -1,6 +1,6 @@
1
1
  module Renuo
2
2
  module Cli
3
- VERSION = '1.4.3'.freeze
3
+ VERSION = '1.4.4'.freeze
4
4
  NAME = 'renuo-cli'.freeze
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: renuo-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3
4
+ version: 1.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Renuo AG
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-25 00:00:00.000000000 Z
11
+ date: 2019-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize