s3_website 2.5.1 → 2.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: 38040b21ec9c146a9fded6561fb1157a183f7328
4
- data.tar.gz: 5a5b95aa468aff45052775d45fbcdf2d9be6673d
3
+ metadata.gz: 092f7440dce07a7188fa3c262eb670ee1ce3fcfa
4
+ data.tar.gz: f33f91a77cebaefdfd7cb37783184a210ab06222
5
5
  SHA512:
6
- metadata.gz: 8f4a9252e3c1c05f14a103e000e320d2a8045d38d17e7ecbd4bf663ce0e973baf8091257df8d7101dcfaf3489b08d366c76120f7d6ce14c294c0cb2694514a1a
7
- data.tar.gz: e9884f5c0b07daf658c36c4665c3b9e1990e3509726746cd85ea11bb2a7e014b78234829982c0d74461a3f1ccafb0e1adfc5bddad8d0e0288f6e48ea9e453cd2
6
+ metadata.gz: fb3f83a880087f6b7f71ac89fdfe356db8c53e28c9f8b899b8bf4da8d96d1f8df4f0001af67e487d8fbee995a9c7dd4a4a5bbaac2f2b3fadee804c80b287c3df
7
+ data.tar.gz: f25b7a9f0d394497adfd2af1b672fcefc1514d739547a2bba2b83ed68b34984cf837552b457abf293f85f61f6dec46d95e3763118c7675ffdf3ab209b47c4c1f
data/README.md CHANGED
@@ -429,6 +429,8 @@ Contributors (in alphabetical order)
429
429
  * Philip I. Thomas
430
430
  * Philippe Creux
431
431
  * Piotr Janik
432
+ * Rodrigo Reis
433
+ * Ross Hunter
432
434
  * Shigeaki Matsumura
433
435
  * stanislas
434
436
  * Tate Johnson
@@ -44,6 +44,28 @@ environment variables. It's convenient, since you can keep the `s3_website.yml`
44
44
  in a public Git repo, and thus have your deployment configurations
45
45
  version-controlled.
46
46
 
47
+ Sometimes you want to use multiple CNAMEs aliases in your CloudFront distribution:
48
+
49
+ ````yaml
50
+ s3_id: <%= ENV['your_domain_net_aws_key'] %>
51
+ s3_secret: <%= ENV['your_domain_net_aws_secret'] %>
52
+ s3_bucket: your.domain.net
53
+ cloudfront_distribution_id: <%= ENV['your_domain_net_cloudfront_distribution_id'] %>
54
+ cloudfront_distribution_config:
55
+ default_cache_behavior:
56
+ min_TTL: <%= 60 * 60 * 24 %>
57
+ aliases:
58
+ quantity: 3
59
+ items:
60
+ CNAME0: your1.domain.net
61
+ CNAME1: your2.domain.net
62
+ CNAME2: your3.domain.net
63
+ max_age: 120
64
+ gzip: true
65
+ ````
66
+
67
+ Always remember to set the 'quantity' property to match the number of items you have.
68
+
47
69
  ## Using redirects
48
70
 
49
71
  ````yaml
data/bin/s3_website CHANGED
@@ -33,6 +33,12 @@ class Cfg < Thor
33
33
  :type => :boolean,
34
34
  :desc => "When used with --headless, automatically create a CloudFront distribution for your S3 website."
35
35
  )
36
+ option(
37
+ 'config-dir',
38
+ :type => :string,
39
+ :desc => "The directory where your config file is. When not defined, s3_website will look in the current working directory.",
40
+ :default => "."
41
+ )
36
42
  desc 'apply', 'Apply the configuration on the AWS services'
37
43
  long_desc <<-LONGDESC
38
44
  `s3_website cfg apply` will apply the configuration the S3 bucket.
@@ -45,7 +51,7 @@ class Cfg < Thor
45
51
  def apply
46
52
  puts 'Applying the configurations in s3_website.yml on the AWS services ...'
47
53
  require 'configure-s3-website'
48
- config_source = ConfigureS3Website::FileConfigSource.new 's3_website.yml'
54
+ config_source = ConfigureS3Website::FileConfigSource.new "#{options['config-dir']}/s3_website.yml"
49
55
  ConfigureS3Website::Runner.run({
50
56
  :config_source => config_source,
51
57
  :headless => options[:headless],
data/changelog.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  This project uses [Semantic Versioning](http://semver.org).
4
4
 
5
+ ## 2.6.0
6
+
7
+ * Support `--config-dir` in `cfg apply`
8
+
5
9
  ## 2.5.1
6
10
 
7
11
  * Print **Would have updated|redirected|created** when running with `--dry-run`
@@ -1,3 +1,3 @@
1
1
  module S3Website
2
- VERSION = '2.5.1'
2
+ VERSION = '2.6.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: s3_website
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.1
4
+ version: 2.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-10-15 00:00:00.000000000 Z
11
+ date: 2014-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor