configure-s3-website 1.5.5 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5c48fd17739c820dc1815620ffea2be61c6ed80d
4
- data.tar.gz: 85edace37966e11f2dc31fd2bb299caff97d91d4
3
+ metadata.gz: c2b02182749485194d57831fcd02c2fe2b328ea6
4
+ data.tar.gz: 50289dd829211e426e3bd8c54ea4175b8cc80a1e
5
5
  SHA512:
6
- metadata.gz: 701833e462856b30ee7827b29bf62bb64b4fad47b15819cfe0a7358a32ab1388f5581f6ec857b7e442b664437669a46c2997cfe1ae169168cb7ae4a44bf2c63e
7
- data.tar.gz: 6a0894ba61a81f4850ffd5796dccda125d97a52dd8f85d3368f24a50a429c261732cd154b3aef3e746662354e2aaeacf074c9d2b0436b14a6efe65e508ff6dd1
6
+ metadata.gz: 67eb44a82bbd10d1292b0323e684b8ab5a6d8c28169df1799348ae8410118321b2591db50e6dcb520379dc99c9844ecf00c494cfe2dcad987f04dce1a4e15a52
7
+ data.tar.gz: c115618f31f06838f99d9c6da135f4e0b44cab5a491b4034fbb4158d505624ddcac130a91b5017736c7703fc9622c1794a6d11a7d5107ba37be9972761f3dea2
data/README.md CHANGED
@@ -229,6 +229,12 @@ Distribution](http://docs.aws.amazon.com/AmazonCloudFront/latest/APIReference/Cr
229
229
  [GET
230
230
  Distribution](http://docs.aws.amazon.com/AmazonCloudFront/latest/APIReference/GetDistribution.html) and [PUT Distribution Config](http://docs.aws.amazon.com/AmazonCloudFront/latest/APIReference/PutConfig.html) APIs.
231
231
 
232
+ ### Running headlessly
233
+
234
+ Use the `--headless` option to run without user interaction. If you add the
235
+ `--autocreate-cloudfront-dist` option, `configure-s3-website` will automatically
236
+ create a CloudFront distribution for your S3 website.
237
+
232
238
  ## Development
233
239
 
234
240
  * This project uses [Semantic Versioning](http://semver.org)
@@ -2,6 +2,10 @@
2
2
 
3
3
  This project uses [Semantic Versioning](http://semver.org).
4
4
 
5
+ ## 1.6.0
6
+
7
+ * Add switches `--headless` and `--autocreate-cloudfront-dist`
8
+
5
9
  ## 1.5.5
6
10
 
7
11
  * Fix bug that prevented creating new CloudFront distributions in the EU region
@@ -20,6 +20,40 @@ Feature: Create a CloudFront distribution
20
20
  """
21
21
  And the config file should contain the distribution id
22
22
 
23
+ @create-cf-dist
24
+ Scenario: The user wants to go headless
25
+ When I run the configure-s3-website command with parameters
26
+ | option | value |
27
+ | --config-file | features/support/sample_config_files/create_cf_dist.yml |
28
+ | --headless | |
29
+ Then the output should be
30
+ """
31
+ Bucket website-via-cf now functions as a website
32
+ Bucket website-via-cf is now readable to the whole world
33
+ No redirects to configure for website-via-cf bucket
34
+
35
+ """
36
+
37
+ @create-cf-dist
38
+ Scenario: The user wants to go headless and automatically create a CloudFront dist
39
+ When I run the configure-s3-website command with parameters
40
+ | option | value |
41
+ | --config-file | features/support/sample_config_files/create_cf_dist.yml |
42
+ | --headless | |
43
+ | --autocreate-cloudfront-dist | |
44
+ Then the output should be
45
+ """
46
+ Bucket website-via-cf now functions as a website
47
+ Bucket website-via-cf is now readable to the whole world
48
+ No redirects to configure for website-via-cf bucket
49
+ Creating a CloudFront distribution for your S3 website ...
50
+ The distribution E45H2VN49KPDU at d3feoe9t5ufu01.cloudfront.net now delivers the origin website-via-cf.s3-website-us-east-1.amazonaws.com
51
+ Please allow up to 15 minutes for the distribution to initialise
52
+ For more information on the distribution, see https://console.aws.amazon.com/cloudfront
53
+ Added setting 'cloudfront_distribution_id: E45H2VN49KPDU' into features/support/sample_config_files/create_cf_dist.yml
54
+
55
+ """
56
+
23
57
  @create-cf-dist
24
58
  Scenario: The user wants create a CloudFront distribution with his own settings
25
59
  Given I answer 'yes' to 'do you want to use CloudFront'
@@ -4,6 +4,8 @@ When /^I run the configure-s3-website command with parameters$/ do |table|
4
4
  options, optparse = ConfigureS3Website::CLI.optparse_and_options
5
5
  optparse.parse! args_array_from_cucumber_table(table)
6
6
  @config_source = options[:config_source]
7
+ @headless = options[:headless]
8
+ @autocreate_cloudfront_dist = options[:autocreate_cloudfront_dist]
7
9
  @reset = create_reset_config_file_function @config_source.description
8
10
  @console_output = capture_stdout {
9
11
  ConfigureS3Website::Runner.run(options, stub_stdin)
@@ -4,6 +4,14 @@ module ConfigureS3Website
4
4
  options = {}
5
5
  optparse = OptionParser.new do |opts|
6
6
  opts.banner = banner
7
+ opts.on('--headless',
8
+ 'Run without interaction from the user. See the --autocreate-cloudfront-dist for more info.') do
9
+ options[:headless] = true
10
+ end
11
+ opts.on('--autocreate-cloudfront-dist',
12
+ 'When running with --headless, automatically create a CloudFront distribution for your S3 website.') do
13
+ options['autocreate-cloudfront-dist'] = true
14
+ end
7
15
  opts.on('-f', '--config-file FILE',
8
16
  'Pick credentials and the S3 bucket name from a config file') do
9
17
  |yaml_file_path|
@@ -44,9 +44,16 @@ module ConfigureS3Website
44
44
  end
45
45
 
46
46
  def self.create_distribution_if_user_agrees(options, standard_input)
47
- puts 'Do you want to deliver your website via CloudFront, the CDN of Amazon? [y/N]'
48
- case standard_input.gets.chomp
49
- when /(y|Y)/ then create_distribution options
47
+ if options['autocreate-cloudfront-dist'] and options[:headless]
48
+ puts 'Creating a CloudFront distribution for your S3 website ...'
49
+ create_distribution options
50
+ elsif options[:headless]
51
+ # Do nothing
52
+ else
53
+ puts 'Do you want to deliver your website via CloudFront, the CDN of Amazon? [y/N]'
54
+ case standard_input.gets.chomp
55
+ when /(y|Y)/ then create_distribution options
56
+ end
50
57
  end
51
58
  end
52
59
 
@@ -1,3 +1,3 @@
1
1
  module ConfigureS3Website
2
- VERSION = '1.5.5'
2
+ VERSION = '1.6.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: configure-s3-website
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.5
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lauri Lehmijoki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-29 00:00:00.000000000 Z
11
+ date: 2014-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: deep_merge
@@ -28,112 +28,112 @@ dependencies:
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: 2.10.0
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: 2.10.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec-expectations
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: 2.10.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: 2.10.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: cucumber
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: 1.2.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: 1.2.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: aruba
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
75
  version: 0.4.0
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ~>
81
81
  - !ruby/object:Gem::Version
82
82
  version: 0.4.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
89
  version: 0.9.0
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ~>
95
95
  - !ruby/object:Gem::Version
96
96
  version: 0.9.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: vcr
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ~>
102
102
  - !ruby/object:Gem::Version
103
103
  version: 2.3.0
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ~>
109
109
  - !ruby/object:Gem::Version
110
110
  version: 2.3.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: webmock
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - "~>"
115
+ - - ~>
116
116
  - !ruby/object:Gem::Version
117
117
  version: 1.8.0
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - "~>"
122
+ - - ~>
123
123
  - !ruby/object:Gem::Version
124
124
  version: 1.8.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: json
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - "~>"
129
+ - - ~>
130
130
  - !ruby/object:Gem::Version
131
131
  version: 1.7.7
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - "~>"
136
+ - - ~>
137
137
  - !ruby/object:Gem::Version
138
138
  version: 1.7.7
139
139
  description:
@@ -143,8 +143,8 @@ executables:
143
143
  extensions: []
144
144
  extra_rdoc_files: []
145
145
  files:
146
- - ".gitignore"
147
- - ".travis.yml"
146
+ - .gitignore
147
+ - .travis.yml
148
148
  - Gemfile
149
149
  - LICENSE
150
150
  - README.md
@@ -202,17 +202,17 @@ require_paths:
202
202
  - lib
203
203
  required_ruby_version: !ruby/object:Gem::Requirement
204
204
  requirements:
205
- - - ">="
205
+ - - '>='
206
206
  - !ruby/object:Gem::Version
207
207
  version: '0'
208
208
  required_rubygems_version: !ruby/object:Gem::Requirement
209
209
  requirements:
210
- - - ">="
210
+ - - '>='
211
211
  - !ruby/object:Gem::Version
212
212
  version: '0'
213
213
  requirements: []
214
214
  rubyforge_project:
215
- rubygems_version: 2.2.2
215
+ rubygems_version: 2.2.1
216
216
  signing_key:
217
217
  specification_version: 4
218
218
  summary: Configure your AWS S3 bucket to function as a web site