middleman-s3_sync 3.3.5 → 3.3.6
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 -5
- data/lib/middleman-s3_sync/extension.rb +2 -2
- data/lib/middleman/s3_sync.rb +7 -3
- data/lib/middleman/s3_sync/options.rb +1 -1
- 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: 3b9f5ece891e9dbddd91b614c8d49ef1e734e39e
         | 
| 4 | 
            +
              data.tar.gz: 2441ef3bf923065c7b13c8b3f44117301d05f559
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 31f4b4ee2d16237c81f82979862f77fe10182e61b56393fc6d9a73fdeee6be5791ba73ff2a2259e71aec4963dd015aacc7d270fdc16ad0688c8e3ccb55af81f1
         | 
| 7 | 
            +
              data.tar.gz: 0ecc8e6b6bb67412c680928b9264da7323b80a4719c6f5bbb2ea318c9228a035dd0708f104f0f8d2501abe9367f2b9487183d53d6345f1061478210407543397
         | 
    
        data/README.md
    CHANGED
    
    | @@ -47,8 +47,8 @@ activate :s3_sync do |s3_sync| | |
| 47 47 | 
             
              s3_sync.encryption                 = false
         | 
| 48 48 | 
             
              s3_sync.prefix                     = ''
         | 
| 49 49 | 
             
              s3_sync.version_bucket             = false
         | 
| 50 | 
            +
              s3_sync.index_document             = 'index.html'
         | 
| 50 51 | 
             
              s3_sync.error_document             = '404.html'
         | 
| 51 | 
            -
              s3_sync.index_suffix               = 'index.html'
         | 
| 52 52 | 
             
            end
         | 
| 53 53 | 
             
            ```
         | 
| 54 54 |  | 
| @@ -71,7 +71,6 @@ The following defaults apply to the configuration items: | |
| 71 71 | 
             
            | encryption                 | ```false```                        |
         | 
| 72 72 | 
             
            | acl                        | ```'public-read'```                |
         | 
| 73 73 | 
             
            | version_bucket             | ```false```                        |
         | 
| 74 | 
            -
            | index_suffix               | ```index.html```                   |
         | 
| 75 74 |  | 
| 76 75 | 
             
            You do not need to specify the settings that match the defaults. This
         | 
| 77 76 | 
             
            simplify the configuration of the extension:
         | 
| @@ -306,11 +305,11 @@ headers will be set correctly. This will cause Amazon to serve the | |
| 306 305 | 
             
            compressed version of the resource. In order for this to work, you need to
         | 
| 307 306 | 
             
            have the `:gzip` extension activated in your `config.rb`.
         | 
| 308 307 |  | 
| 309 | 
            -
            #### Custom  | 
| 308 | 
            +
            #### Custom S3 Index and Error Documents
         | 
| 310 309 |  | 
| 311 | 
            -
            You can enable a custom [index  | 
| 310 | 
            +
            You can enable a custom [index document](http://docs.aws.amazon.com/AmazonS3/latest/dev/IndexDocumentSupport.html)
         | 
| 312 311 | 
             
            and [error document](http://docs.aws.amazon.com/AmazonS3/latest/dev/CustomErrorDocSupport.html)
         | 
| 313 | 
            -
            settings. The ``` | 
| 312 | 
            +
            settings. The ```index_document``` option tells which file name gets used as
         | 
| 314 313 | 
             
            the index document of a directory (typically, ```index.html```), while
         | 
| 315 314 | 
             
            ```error_document``` specifies the document to display for 4xx errors (ie,
         | 
| 316 315 | 
             
            the 404 page).
         | 
| @@ -23,8 +23,8 @@ module Middleman | |
| 23 23 | 
             
                option :version_bucket, false, 'Whether to enable versionning on the S3 bucket content'
         | 
| 24 24 | 
             
                option :verbose, false, 'Whether to provide more verbose output'
         | 
| 25 25 | 
             
                option :dry_run, false, 'Whether to perform a dry-run'
         | 
| 26 | 
            -
                option : | 
| 27 | 
            -
                option :error_document, nil, ' | 
| 26 | 
            +
                option :index_document, nil, 'S3 custom index document path'
         | 
| 27 | 
            +
                option :error_document, nil, 'S3 custom error document path'
         | 
| 28 28 |  | 
| 29 29 | 
             
                def initialize(app, options_hash = {}, &block)
         | 
| 30 30 | 
             
                  super
         | 
    
        data/lib/middleman/s3_sync.rb
    CHANGED
    
    | @@ -82,10 +82,14 @@ module Middleman | |
| 82 82 |  | 
| 83 83 | 
             
                  def update_bucket_website
         | 
| 84 84 | 
             
                    opts = {}
         | 
| 85 | 
            -
                    opts[: | 
| 86 | 
            -
                    opts[: | 
| 85 | 
            +
                    opts[:IndexDocument] = s3_sync_options.index_document if s3_sync_options.index_document
         | 
| 86 | 
            +
                    opts[:ErrorDocument] = s3_sync_options.error_document if s3_sync_options.error_document
         | 
| 87 | 
            +
             | 
| 88 | 
            +
                    if opts[:ErrorDocument] && !opts[:IndexDocument]
         | 
| 89 | 
            +
                      raise 'S3 requires `index_document` if `error_document` is specified'
         | 
| 90 | 
            +
                    end
         | 
| 91 | 
            +
             | 
| 87 92 | 
             
                    unless opts.empty?
         | 
| 88 | 
            -
                      opts[:IndexDocument] ||= 'index.html' # IndexDocument is mandatory in put_bucket_website
         | 
| 89 93 | 
             
                      say_status "Putting bucket website: #{opts.to_json}"
         | 
| 90 94 | 
             
                      connection.put_bucket_website(s3_sync_options.bucket, opts)
         | 
| 91 95 | 
             
                    end
         | 
    
        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.3. | 
| 4 | 
            +
              version: 3.3.6
         | 
| 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- | 
| 12 | 
            +
            date: 2015-12-03 00:00:00.000000000 Z
         | 
| 13 13 | 
             
            dependencies:
         | 
| 14 14 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 15 15 | 
             
              name: middleman-core
         |