Logo: Relish

  1. Sign in

Project: Piano-extraction

Use Manifest

I want to be able to fetch a source file from the
webserver that includes all the sitemap data I
need to make the extraction.

Why the CACHE MANIFEST

It is assumed that some files, whether because size
or fast changes, are not to be fetched by the extractor:
is safe to assume that a primary approach to where belongs
each file can be found in the cache.manifest file.

The default behaviour is:

  • The files listed in the cache.manifest after the CACHE separator will be included.
  • All files listed before any separator will be included.
  • If no separator is found in cache.manifest, all listed files will be included.
  • The files listed in the cache.manifest after the FALLBACK and NETWORK separators will be excluded.
  • If the extractor finds a line # Extraction start, the next files will be included, even if it's after a NETWORK or FALLBACK separator
  • If the extractor finds a line # Extraction stop, the next files will be excluded, even if it's after a CACHE separator.
Background A compliant server is started

First, lets setup a demo server:

Given
the "arena/with-manifest" folder contains "index.haml" with:
!!! 5
%html(manifest="cache.manifest")
  %head
    %title Extraction
  %body
    %h1 Just a extraction tryout for Piano
And
the "arena/with-manifest" folder contains "cache.manifest" with:
CACHE MANIFEST

index
And
the "arena/with-manifest" folder contains "Pianofile" with:
get "/cache.manifest" do
   content_type "text/cache-manifest"
   File.read "cache.manifest"
end
And
I run the server on "arena/with-manifest"
Scenarios
  • @arena
  • @piano
Connection and fetching
Given
I enter the localhost server
When
I tell the extractor to use the manifest
Then
I should get a list of included files
And
the list should include "index"
  • @arena
  • @piano
  • @temp
Getting the files
Given
I enter the localhost server
And
I tell the extractor to use the manifest
When
I order the download on "temp"
Then
I should have "Just a extraction tryout for Piano" in "temp/index"

Last published over 4 years ago by xaviervia.