To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaboratorServing assets
In order that I can use my assets
As a developer
I want to a Rack server that can serve assets
- Background
-
- Given
-
this code has executed
require 'pannier/mounted'
- And
-
the file "input/styles/foo.css" contains
html { color: red; }
- And
-
the file "input/scripts/bar.js" contains
var a = 1;
- Scenarios
-
- Requesting a CSS file in production
-
- Given
-
the file ".assets.rb" contains
input 'input' output 'output' package :styles do input 'styles' assets '*.css' end
- And
- the app is loaded in a production environment
- And
- the app has been processed
- When
- I request "/foo.css"
- Then
- the response status should be 200
- And
-
I should see these headers
Content-Type text/css Content-Length 20 - And
-
the response body should be
html { color: red; }
- Requesting a JavaScript file in production
-
- Given
-
the file ".assets.rb" contains
input 'input' output 'output' package :scripts do input 'scripts' assets '*.js' end
- And
- the app is loaded in a production environment
- And
- the app has been processed
- When
- I request "/bar.js"
- Then
- the response status should be 200
- And
-
I should see these headers
Content-Type application/javascript Content-Length 10 - And
-
the response body should be
var a = 1;
Last published over 5 years ago by joecorcoran.