Sha256: 37acf8cde13ccd05c91fa92c6a03756f0d4e34e094306ce8e5a5f0292d7810a2

Contents?: true

Size: 1.76 KB

Versions: 39

Compression:

Stored size: 1.76 KB

Contents

Feature: GZIP assets during build

  Scenario: Built assets should be gzipped
    Given a successfully built app at "gzip-app"
    Then the following files should exist:
      | build/index.html |
      | build/index.html.gz |
      | build/javascripts/test.js |
      | build/javascripts/test.js.gz |
      | build/stylesheets/test.css |
      | build/stylesheets/test.css.gz |
    And the file "build/javascripts/test.js.gz" should be gzipped

  Scenario: Preview server doesn't change
    Given the Server is running at "gzip-app"
    When I go to "/javascripts/test.js"
    Then I should see "test_function"
    When I go to "/stylesheets/test.css"
    Then I should see "test_selector"

  Scenario: Only specified extensions should be gzipped
    Given a fixture app "gzip-app"
    And a file named "config.rb" with:
      """
      activate :gzip, exts: %w(.htm .html .js .xhtml)
      """
    And a successfully built app at "gzip-app"
    Then the following files should exist:
      | build/index.html |
      | build/index.html.gz |
      | build/javascripts/test.js |
      | build/javascripts/test.js.gz |
      | build/stylesheets/test.css |
    And the following files should not exist:
      | build/stylesheets/test.css.gz |

  Scenario: Gzipped files are not produced for ignored paths
    Given a fixture app "gzip-app"
    And a file named "config.rb" with:
      """
      activate :gzip, ignore: ['index.html', %r(javascripts/.*)]
      """
    And a successfully built app at "gzip-app"
    Then the following files should exist:
      | build/index.html |
      | build/javascripts/test.js |
      | build/stylesheets/test.css |
      | build/stylesheets/test.css.gz |
    And the following files should not exist:
      | build/index.html.gz |
      | build/javascripts/test.js.gz |

Version data entries

39 entries across 39 versions & 3 rubygems

Version Path
middleman-core-4.5.1 features/gzip.feature
middleman-core-4.5.0 features/gzip.feature
middleman-core-4.4.3 features/gzip.feature
middleman-core-4.4.2 features/gzip.feature
middleman-core-4.4.0 features/gzip.feature
middleman-core-4.3.11 features/gzip.feature
middleman-core-4.3.10 features/gzip.feature
middleman-core-4.3.8 features/gzip.feature
middleman-core-4.3.7 features/gzip.feature
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/middleman-core-4.3.3/features/gzip.feature
middleman-core-4.3.6 features/gzip.feature
middleman-core-4.3.5 features/gzip.feature
middleman-core-4.3.4 features/gzip.feature
middleman-core-4.3.3 features/gzip.feature
middleman-core-4.3.2 features/gzip.feature
middleman-core-4.3.1 features/gzip.feature
middleman-core-4.3.0 features/gzip.feature
middleman-core-4.3.0.rc.4 features/gzip.feature
middleman-core-4.3.0.rc.3 features/gzip.feature
middleman-core-4.3.0.rc.2 features/gzip.feature