Sha256: b7705656a26feb1cfdd588065b9ff2da2211f0e348d4f67df8dd799ed75eaae2

Contents?: true

Size: 1.76 KB

Versions: 34

Compression:

Stored size: 1.76 KB

Contents

Feature: Alternate between multiple asset hosts
  In order to speed up page loading
  
  Scenario: Set single host globally
    Given a fixture app "asset-host-app"
    And a file named "config.rb" with:
      """
      activate :asset_host
      set :asset_host, "http://assets1.example.com"
      """
    And the Server is running
    When I go to "/asset_host.html"
    Then I should see "http://assets1"
    When I go to "/stylesheets/asset_host.css"
    Then I should see "http://assets1"

  Scenario: Set proc host globally
    Given a fixture app "asset-host-app"
    And a file named "config.rb" with:
      """
      activate :asset_host
      set :asset_host do |asset|
        "http://assets%d.example.com" % (asset.hash % 4)
      end
      """
    And the Server is running
    When I go to "/asset_host.html"
    Then I should see "http://assets"
    When I go to "/stylesheets/asset_host.css"
    Then I should see "http://assets"

  Scenario: Set single host with inline-option
    Given a fixture app "asset-host-app"
    And a file named "config.rb" with:
      """
      activate :asset_host, :host => "http://assets1.example.com"
      """
    And the Server is running
    When I go to "/asset_host.html"
    Then I should see "http://assets1"
    When I go to "/stylesheets/asset_host.css"
    Then I should see "http://assets1"

  Scenario: Set proc host with inline-option
    Given a fixture app "asset-host-app"
    And a file named "config.rb" with:
      """
      activate :asset_host, :host => Proc.new { |asset|
        "http://assets%d.example.com" % (asset.hash % 4)
      }
      """
    And the Server is running
    When I go to "/asset_host.html"
    Then I should see "http://assets"
    When I go to "/stylesheets/asset_host.css"
    Then I should see "http://assets"

Version data entries

34 entries across 34 versions & 3 rubygems

Version Path
middleman-core-3.4.1 features/asset_host.feature
middleman-core-3.4.0 features/asset_host.feature
middleman-core-3.3.12 features/asset_host.feature
middleman-core-3.3.11 features/asset_host.feature
middleman-core-3.3.10 features/asset_host.feature
middleman-core-3.3.9 features/asset_host.feature
middleman-core-3.3.8 features/asset_host.feature
middleman-core-3.3.7 features/asset_host.feature
middleman-core-3.3.6 features/asset_host.feature
middleman-core-3.3.5 features/asset_host.feature
middleman-core-cj-3.3.6 features/asset_host.feature
middleman-core-cj-3.3.5 features/asset_host.feature
middleman-core-cj-3.3.4 features/asset_host.feature
middleman-core-3.3.4 features/asset_host.feature
middleman-core-3.3.3 features/asset_host.feature
middleman-core-3.3.2 features/asset_host.feature
middleman-core-3.3.1 features/asset_host.feature
middleman-core-3.3.0 features/asset_host.feature
middleman-core-3.2.2 features/asset_host.feature
middleman-core-3.2.1 features/asset_host.feature