Граф коммитов

105 Коммитов

Автор SHA1 Сообщение Дата
Peter deHaan 41fcdc4511 Merge pull request #45 from askhogan/patch-1
missing comma
2014-07-27 20:31:49 -07:00
Patrick Hogan 1b5efaf96e missing comma 2014-07-24 22:28:42 -07:00
Austin King ed5d13423b Merge pull request #43 from mozilla/refactor-simplify-extract
Refactor simplify extract
2014-05-09 09:43:08 -07:00
Shane Tomlinson bda79bb72c Drop node 0.6 from testing, add node 0.10 2014-05-09 17:08:48 +01:00
Shane Tomlinson b08d441fa3 refactor: More cleanup and simplification.
* Rename `opts` to `_opts` to be consistent with other global variables.

Add more helper functions:
* does_file_match_expected_hash
* get_uri
* should_skip_hashification
* get_predefined_hash
* url_to_filename
* get_resource_hash
* generate_hashed_url
* should_use_development_resources
* generate_tags_for_resources
* rename prod_or_dev_tags to generate_tags_for_filename
2014-05-09 17:08:48 +01:00
Shane Tomlinson 6e5cc4c3d0 refactor: Large refactor of the middleware, mostly extracting functions and clarifying names.
Extract helper functions:
* is_cachified_uri
* remove_prefix
* get_true_path
* check_exists
* get_expected_hash
* do_contents_match_expected_hash
* clean_options
* set_locals
* set_cache_headers
* remove_other_cache_headers
2014-05-09 17:08:10 +01:00
Shane Tomlinson bd006881e9 Bump the version to v0.0.16 2014-05-09 16:59:07 +01:00
Shane Tomlinson a5648771a5 Merge pull request #44 from shane-tomlinson/express4
Added support for express 4.x
2014-05-09 16:58:08 +01:00
Shane Tomlinson a161c998d9 Added support for express 4.x
Core code comes from https://github.com/mozilla/connect-cachify/pull/42. I took his PR and manually merged the relevant parts. Additional tests added to ensure all of the expresses are *really* being tested.

Original commits:
* 587518018b
* 62a5bd69a9
* 5a9b544b72
* 8ae7c94a48
* 9c219d1e19

Thank you very much @kmchugh!
2014-05-09 16:53:48 +01:00
Austin King 7cf3731edb Merge pull request #36 from infindex/master
Fix to handle weird scenarios where the request urls to assets contain query string
2013-09-24 08:35:56 -07:00
Manjunath G ee1bf95802 - Fixed test failures
- Handle query parameter in development mode
- Adding tests to demonstrates the problem when query string parameters
  Are introduced
2013-09-20 00:24:16 -07:00
Manjunath G 3ea6980fa7 Merge remote-tracking branch 'upstream/master' 2013-09-19 22:14:02 -07:00
Austin King d65733f965 Merge pull request #40 from pdehaan/patch-1
Update package.json
2013-09-19 13:39:01 -07:00
Peter deHaan 7385e0b4f0 Update package.json
Adding license info
2013-09-19 13:05:07 -07:00
Manjunath G 6a792d3cf2 Fix to handle weird scenarios where the request urls contain query
parameters
2013-07-25 17:48:49 -07:00
Austin King ba6275d010 Adding unit test to make sure non-SHA like prefixes don't get stripped 2013-07-23 09:57:53 -07:00
Austin King 76ad397c51 Merge pull request #34 from machuga/patch-1
Correct misspelling of "Cachify" in readme
2013-07-12 12:55:07 -07:00
Matthew Machuga a89846112c Correct misspelling of "Cachify" in readme 2013-07-12 15:53:22 -04:00
Austin King a575217217 Bump 0.0.15 2013-05-29 10:28:20 -07:00
Austin King 76a91806a2 Merge pull request #33 from mozilla/async_defer_script_attributes
Add the ability to add the `defer` or `async` attributes to scripts.
2013-05-29 10:24:25 -07:00
Shane Tomlinson 594d9185d6 Add default value docs for async and defer 2013-05-29 17:53:57 +01:00
Shane Tomlinson e2e2a57871 Simplify the defer/async API options.
* defer and async are only added to scripts in production mode.
2013-05-29 17:42:57 +01:00
Shane Tomlinson f059fcc172 Add the ability to add the `defer` or `async` attributes to scripts.
Helpers for mozilla/browserid#3454
2013-05-29 16:42:40 +01:00
Lloyd Hilaiel 87ebacfc86 v0.0.14 2013-04-26 16:38:55 -06:00
Austin King d85dfe5270 Merge pull request #32 from mozilla/issue31
always check file checksum and ensure that in-url hash matches file cont...
2013-04-25 16:09:45 -07:00
Lloyd Hilaiel f2f175a34c make the file read that happens on every request async, and document the test that verifies mismatched checksums don't result in url re-writing 2013-04-25 15:23:59 -06:00
Lloyd Hilaiel c9b04320ae always check file checksum and ensure that in-url hash matches file contents. issue #31 2013-04-24 16:59:13 -06:00
Austin King 9f879dc1c8 Publishing 0.0.13 2013-02-08 09:52:49 -08:00
Austin King ae4fbbc11c Merge pull request #27 from shane-tomlinson/url_to_path
Add the ability to specify a url_to_path table.
2013-02-08 09:14:48 -08:00
Shane Tomlinson 44cfcf60f8 Beef up the test for url_to_paths.
* Add a file to the repo, test/test-data/test-file.js which is used as a stable file from which to calculate the md5. This is used to make sure url_to_paths is operating as expected.
2013-02-08 10:14:19 +00:00
Shane Tomlinson f3c1c406db Add url_to_paths to initial example in README.md 2013-02-07 11:48:22 +00:00
Shane Tomlinson eafa4a2fc8 Update docs for the new url_to_paths option. 2013-02-07 11:40:31 +00:00
Shane Tomlinson a876c343c1 Clean up the test for url_to_paths functionality. 2013-02-07 11:14:18 +00:00
Austin King 5f400abd2b Merge pull request #26 from mozilla/mock_resp
Remove duplicate resp code in unit tests by creating a generic "get_resp" funciton.
2013-01-27 11:51:47 -08:00
Shane Tomlinson a12c9a6e89 Add the ability to specify a url_to_path table.
This allows files to be looked up that may not be in the root path.
2013-01-27 09:22:46 +00:00
Shane Tomlinson f2ec7c64e3 Remove duplicate resp code by creating a generic "get_resp" funciton. 2013-01-27 08:55:10 +00:00
Austin King 894cd11a4a Publishing 0.0.13alpha 2013-01-23 15:02:58 -08:00
Austin King 3f7f97a4a4 Merge branch 'master' of github.com:mozilla/connect-cachify 2013-01-23 15:00:06 -08:00
Austin King f550b17abd Check fs for existsSync. Fixes #21
Updated test to exercise more of the codepaths.
2013-01-23 14:58:53 -08:00
Austin King b25e9ecf17 Merge pull request #22 from wolfeidau/master
Added example for use in Jade templates
2013-01-23 14:02:38 -08:00
Austin King 79cef164e5 Merge pull request #23 from fmarier/prefetch
Prefetch
2013-01-23 14:01:42 -08:00
Austin King ea11e6e6ba Merge pull request #25 from mozilla/issue_24_hash_in_url
Allow development resources to contain fragment identifiers.
2013-01-23 13:41:52 -08:00
Shane Tomlinson fd49baf2a7 Allow development resources to contain fragment identifiers.
When looking for the filename, strip the fragment identifier (#partofurl) from the resource name.
2013-01-23 17:38:21 +00:00
Francois Marier 0e2abd3be1 Add tests for the new prefetch helper function 2012-11-28 15:38:35 +13:00
Francois Marier 162423e97a Add a new cachify_prefetch helper
This generates <link rel="prefetch"> tags which provide prefetching
hints to browsers that support this HTML5 feature.
2012-11-28 14:47:38 +13:00
Francois Marier ada022e23c Typo in README 2012-11-23 15:10:13 +13:00
Mark Wolfe c402c0ff77 Few updates to match sample data. 2012-11-22 10:52:53 +11:00
Mark Wolfe e38444c7b3 Added jade template example. 2012-11-22 10:50:14 +11:00
Austin King adea4dcc21 Version 0.0.12 Express 3 support 2012-10-24 13:19:28 -07:00
Austin King 4354893e6b Merge branch 'master' of github.com:mozilla/connect-cachify 2012-10-24 13:18:47 -07:00