Deploying to gh-pages from @ 081ec4c286
🚀
This commit is contained in:
parent
e5f40b4cef
commit
068efecd28
3 changed files with 115 additions and 181 deletions
|
@ -1,7 +1,7 @@
|
|||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Module describing file processor that changes filenames to setup cache-busting"><meta name="keywords" content="rust, rustlang, rust-lang, processor"><title>cache_buster::processor - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../ayu.css" disabled ><script id="default-settings"></script><script src="../../storage.js"></script><script src="../../crates.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../../favicon.svg">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-16x16.png">
|
||||
<link rel="alternate icon" type="image/png" href="../../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">☰</div><a href='../../cache_buster/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><p class="location">Module processor</p><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li></ul></div><p class="location"><a href="../index.html">cache_buster</a></p><div id="sidebar-vars" data-name="processor" data-ty="mod" data-relpath="../"></div><script defer src="../sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../../brush.svg" width="18" height="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"></div><button type="button" class="help-button">?</button>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">cache_buster</a>::<wbr><a class="mod" href="">processor</a><button id="copy-path" onclick="copy_path(this)">⎘</button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/cache_buster/processor.rs.html#8-451" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Module describing file processor that changes filenames to setup cache-busting</p>
|
||||
<a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" height="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">cache_buster</a>::<wbr><a class="mod" href="">processor</a><button id="copy-path" onclick="copy_path(this)">⎘</button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">−</span>]</a></span><a class="srclink" href="../../src/cache_buster/processor.rs.html#8-418" title="goto source code">[src]</a></span></h1><div class="docblock"><p>Module describing file processor that changes filenames to setup cache-busting</p>
|
||||
<p>Run the following during build using <code>build.rs</code>:</p>
|
||||
|
||||
<div class="example-wrap"><pre class="rust rust-example-rendered">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
var searchIndex = JSON.parse('{\
|
||||
"actix_web":{"doc":"","t":[3,17,3,3,3,12,12,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,3,11,11,11,11,11,11,11,11,11,11,11,5,5,0,11,11,11,11,11,11,11,11,11,11,11,11,11,5,11,11,11,3,5,3,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,5],"n":["Asset","CACHE_AGE","FILES","Favicons","INDEX","__private_field","__private_field","borrow","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","deref","deref","favicons","from","from","from","from","from","from","from","get","get","get","get","handle_assets","handle_favicons","index","initialize","initialize","into","into","into","into","into","into","into","iter","iter","iter","iter","main","register","register","register","serve_index","services","static_files","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","type_id","vzip","vzip","vzip","vzip","vzip","vzip","vzip","get_index"],"q":["actix_web","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","actix_web::index"],"d":["Embed files. Or not. You can also read files dynamically","Set a riddicolusly high cache age","create filemap","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"i":[0,0,0,0,0,1,2,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,0,1,2,3,4,5,6,7,3,3,6,6,0,0,0,1,2,1,2,3,4,5,6,7,3,3,6,6,0,4,5,7,0,0,0,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7,0],"f":[null,null,null,null,null,null,null,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],["files",3]],[[],["string",3]],null,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[["str",15]],[["option",4],["cow",4]]],[[["str",15]],[["option",4],["cow",4]]],[[["str",15]],[["option",4],["cow",4]]],[[["str",15]],[["option",4],["cow",4]]],[[["str",15]],["httpresponse",3]],[[["str",15]],["httpresponse",3]],null,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],["filenames",4]],[[],["filenames",4]],[[]],[[],["result",6]],[[["appservice",3]]],[[["appservice",3]]],[[["appservice",3]]],null,[[["serviceconfig",3]]],null,[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[],["string",3]]],"p":[[3,"FILES"],[3,"INDEX"],[3,"Asset"],[3,"static_files"],[3,"serve_index"],[3,"Favicons"],[3,"favicons"]]},\
|
||||
"cache_buster":{"doc":"What is cache busting?","t":[17,0,0,3,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,3,3,4,13,13,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11],"n":["CACHE_BUSTER_DATA_FILE","filemap","processor","Files","borrow","borrow_mut","clone","clone_into","deserialize","eq","fmt","from","get","get_full_path","into","ne","new","serialize","to_owned","try_from","try_into","type_id","Buster","BusterBuilder","BusterBuilderError","UninitializedField","ValidationError","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","build","clone","clone","clone_into","clone_into","copy","default","fmt","fmt","fmt","follow_links","from","from","from","from","from","into","into","into","mime_types","no_hash","prefix","process","result","source","to_owned","to_owned","to_string","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id"],"q":["cache_buster","","","cache_buster::filemap","","","","","","","","","","","","","","","","","","","cache_buster::processor","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"d":["file to which filemap is written during compilation …","Module describing runtime compoenet for fetching modified …","Module describing file processor that changes filenames …","Filemap struct","","","","","","","","","Get relative file path","Get file path","","","Load filemap in main program. Should be called from main …","","","","","","Configuration for setting up cache-busting","Builder for <code>Buster</code>.","Error type for BusterBuilder","Uninitialized field","Custom validation error","","","","","","","Builds a new <code>Buster</code>.","","","","","copy other non-hashed files from source dire to result …","","","","","follow symlinks?","","","","","","","","","mime_types for hashing","exclude these files for hashing. They will be copied over …","route prefixes","Processes files.","directory for writing results","source directory","","","","","","","","","","","",""],"i":[0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,2,2,3,2,4,3,2,4,3,3,4,3,4,3,3,2,2,4,3,3,2,2,2,4,3,2,4,3,3,3,4,3,3,3,4,2,3,2,4,3,2,4,3,2,4],"f":[null,null,null,null,[[]],[[]],[[],["files",3]],[[]],[[],["result",4]],[[["files",3]],["bool",15]],[[["formatter",3]],["result",6]],[[]],[[["str",15]],[["option",4],["str",15]]],[[["str",15]],[["option",4],["string",3]]],[[]],[[["files",3]],["bool",15]],[[["str",15]]],[[],["result",4]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],null,null,null,null,null,[[]],[[]],[[]],[[]],[[]],[[]],[[],[["result",4],["buster",3],["busterbuildererror",4]]],[[],["busterbuilder",3]],[[],["buster",3]],[[]],[[]],[[["bool",15]]],[[]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["bool",15]]],[[]],[[["uninitializedfielderror",3]]],[[]],[[["string",3]]],[[]],[[]],[[]],[[]],[[["into",8],["vec",3]]],[[["vec",3],["str",15]]],[[["into",8],["string",3]]],[[],[["result",4],["error",3]]],[[["into",8],["string",3]]],[[["into",8],["string",3]]],[[]],[[]],[[],["string",3]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]]],"p":[[3,"Files"],[4,"BusterBuilderError"],[3,"BusterBuilder"],[3,"Buster"]]}\
|
||||
"cache_buster":{"doc":"What is cache busting?","t":[17,0,0,3,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,3,3,4,13,13,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11],"n":["CACHE_BUSTER_DATA_FILE","filemap","processor","Files","borrow","borrow_mut","clone","clone_into","deserialize","eq","fmt","from","get","get_full_path","into","ne","new","serialize","to_owned","try_from","try_into","type_id","Buster","BusterBuilder","BusterBuilderError","UninitializedField","ValidationError","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","build","clone","clone","clone_into","clone_into","copy","default","fmt","fmt","fmt","follow_links","from","from","from","from","from","into","into","into","mime_types","no_hash","prefix","process","result","source","to_owned","to_owned","to_string","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id"],"q":["cache_buster","","","cache_buster::filemap","","","","","","","","","","","","","","","","","","","cache_buster::processor","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""],"d":["file to which filemap is written during compilation …","Module describing runtime compoenet for fetching modified …","Module describing file processor that changes filenames …","Filemap struct","","","","","","","","","Get relative file path","Get file path","","","Load filemap in main program. Should be called from main …","","","","","","Configuration for setting up cache-busting","Builder for <code>Buster</code>.","Error type for BusterBuilder","Uninitialized field","Custom validation error","","","","","","","Builds a new <code>Buster</code>.","","","","","copy other non-hashed files from source dire to result …","","","","","follow symlinks?","","","","","","","","","mime_types for hashing","exclude these files for hashing. They will be copied over …","route prefixes","Processes files.","directory for writing results","source directory","","","","","","","","","","","",""],"i":[0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,2,2,3,2,4,3,2,4,3,3,4,3,4,3,3,2,2,4,3,3,2,2,2,4,3,2,4,3,3,3,4,3,3,3,4,2,3,2,4,3,2,4,3,2,4],"f":[null,null,null,null,[[]],[[]],[[],["files",3]],[[]],[[],["result",4]],[[["files",3]],["bool",15]],[[["formatter",3]],["result",6]],[[]],[[["str",15]],[["option",4],["str",15]]],[[["str",15]],[["option",4],["string",3]]],[[]],[[["files",3]],["bool",15]],[[["str",15]]],[[],["result",4]],[[]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],null,null,null,null,null,[[]],[[]],[[]],[[]],[[]],[[]],[[],[["busterbuildererror",4],["result",4],["buster",3]]],[[],["busterbuilder",3]],[[],["buster",3]],[[]],[[]],[[["bool",15]]],[[]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["formatter",3]],["result",6]],[[["bool",15]]],[[]],[[["uninitializedfielderror",3]]],[[]],[[["string",3]]],[[]],[[]],[[]],[[]],[[["into",8],["vec",3]]],[[["vec",3],["str",15]]],[[["into",8],["string",3]]],[[],[["result",4],["error",3]]],[[["into",8],["string",3]]],[[["into",8],["string",3]]],[[]],[[]],[[],["string",3]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["result",4]],[[],["typeid",3]],[[],["typeid",3]],[[],["typeid",3]]],"p":[[3,"Files"],[4,"BusterBuilderError"],[3,"BusterBuilder"],[3,"Buster"]]}\
|
||||
}');
|
||||
if (window.initSearch) {window.initSearch(searchIndex)};
|
|
@ -419,39 +419,6 @@
|
|||
<span id="416">416</span>
|
||||
<span id="417">417</span>
|
||||
<span id="418">418</span>
|
||||
<span id="419">419</span>
|
||||
<span id="420">420</span>
|
||||
<span id="421">421</span>
|
||||
<span id="422">422</span>
|
||||
<span id="423">423</span>
|
||||
<span id="424">424</span>
|
||||
<span id="425">425</span>
|
||||
<span id="426">426</span>
|
||||
<span id="427">427</span>
|
||||
<span id="428">428</span>
|
||||
<span id="429">429</span>
|
||||
<span id="430">430</span>
|
||||
<span id="431">431</span>
|
||||
<span id="432">432</span>
|
||||
<span id="433">433</span>
|
||||
<span id="434">434</span>
|
||||
<span id="435">435</span>
|
||||
<span id="436">436</span>
|
||||
<span id="437">437</span>
|
||||
<span id="438">438</span>
|
||||
<span id="439">439</span>
|
||||
<span id="440">440</span>
|
||||
<span id="441">441</span>
|
||||
<span id="442">442</span>
|
||||
<span id="443">443</span>
|
||||
<span id="444">444</span>
|
||||
<span id="445">445</span>
|
||||
<span id="446">446</span>
|
||||
<span id="447">447</span>
|
||||
<span id="448">448</span>
|
||||
<span id="449">449</span>
|
||||
<span id="450">450</span>
|
||||
<span id="451">451</span>
|
||||
</pre><div class="example-wrap"><pre class="rust ">
|
||||
<span class="comment">/*
|
||||
* Copyright (C) 2021 Aravinth Manivannan <realaravinth@batsense.net>
|
||||
|
@ -576,6 +543,34 @@
|
|||
<span class="self">self</span>.<span class="ident">init</span>()<span class="question-mark">?</span>;
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">file_map</span>: <span class="ident">Files</span> <span class="op">=</span> <span class="ident">Files::new</span>(<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">result</span>);
|
||||
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">process_worker</span> <span class="op">=</span> <span class="op">|</span><span class="ident">path</span>: <span class="kw-2">&</span><span class="ident">Path</span><span class="op">|</span> {
|
||||
<span class="kw">let</span> <span class="ident">contents</span> <span class="op">=</span> <span class="self">Self</span><span class="ident">::read_to_string</span>(<span class="kw-2">&</span><span class="ident">path</span>).<span class="ident">unwrap</span>();
|
||||
<span class="kw">let</span> <span class="ident">hash</span> <span class="op">=</span> <span class="self">Self</span><span class="ident">::hasher</span>(<span class="kw-2">&</span><span class="ident">contents</span>);
|
||||
<span class="kw">let</span> <span class="ident">new_name</span> <span class="op">=</span> <span class="kw">if</span> <span class="self">self</span>.<span class="ident">no_hash</span>.<span class="ident">iter</span>().<span class="ident">any</span>(<span class="op">|</span><span class="ident">no_hash</span><span class="op">|</span> {
|
||||
<span class="kw">let</span> <span class="ident">no_hash</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">source</span>).<span class="ident">join</span>(<span class="kw-2">&</span><span class="ident">no_hash</span>);
|
||||
<span class="ident">no_hash</span> <span class="op">=</span><span class="op">=</span> <span class="ident">path</span>
|
||||
}) {
|
||||
<span class="macro">format!</span>(
|
||||
<span class="string">"{}.{}"</span>,
|
||||
<span class="ident">path</span>.<span class="ident">file_stem</span>().<span class="ident">unwrap</span>().<span class="ident">to_str</span>().<span class="ident">unwrap</span>(),
|
||||
<span class="ident">path</span>.<span class="ident">extension</span>().<span class="ident">unwrap</span>().<span class="ident">to_str</span>().<span class="ident">unwrap</span>()
|
||||
)
|
||||
} <span class="kw">else</span> {
|
||||
<span class="macro">format!</span>(
|
||||
<span class="string">"{}.{}.{}"</span>,
|
||||
<span class="ident">path</span>.<span class="ident">file_stem</span>().<span class="ident">unwrap</span>().<span class="ident">to_str</span>().<span class="ident">unwrap</span>(),
|
||||
<span class="ident">hash</span>,
|
||||
<span class="ident">path</span>.<span class="ident">extension</span>().<span class="ident">unwrap</span>().<span class="ident">to_str</span>().<span class="ident">unwrap</span>()
|
||||
)
|
||||
};
|
||||
<span class="self">self</span>.<span class="ident">copy</span>(<span class="ident">path</span>, <span class="kw-2">&</span><span class="ident">new_name</span>);
|
||||
<span class="kw">let</span> (<span class="ident">source</span>, <span class="ident">destination</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">gen_map</span>(<span class="ident">path</span>, <span class="op">&&</span><span class="ident">new_name</span>);
|
||||
<span class="kw">let</span> <span class="kw">_</span> <span class="op">=</span> <span class="ident">file_map</span>.<span class="ident">add</span>(
|
||||
<span class="ident">source</span>.<span class="ident">to_str</span>().<span class="ident">unwrap</span>().<span class="ident">into</span>(),
|
||||
<span class="ident">destination</span>.<span class="ident">to_str</span>().<span class="ident">unwrap</span>().<span class="ident">into</span>(),
|
||||
);
|
||||
};
|
||||
|
||||
<span class="kw">for</span> <span class="ident">entry</span> <span class="kw">in</span> <span class="ident">WalkDir::new</span>(<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">source</span>)
|
||||
.<span class="ident">follow_links</span>(<span class="self">self</span>.<span class="ident">follow_links</span>)
|
||||
.<span class="ident">into_iter</span>()
|
||||
|
@ -586,34 +581,6 @@
|
|||
<span class="kw">if</span> <span class="op">!</span><span class="ident">path</span>.<span class="ident">is_dir</span>() {
|
||||
<span class="kw">let</span> <span class="ident">path</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="kw-2">&</span><span class="ident">path</span>);
|
||||
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">process_worker</span> <span class="op">=</span> <span class="op">|</span><span class="ident">path</span>: <span class="kw-2">&</span><span class="ident">Path</span><span class="op">|</span> {
|
||||
<span class="kw">let</span> <span class="ident">contents</span> <span class="op">=</span> <span class="self">Self</span><span class="ident">::read_to_string</span>(<span class="kw-2">&</span><span class="ident">path</span>).<span class="ident">unwrap</span>();
|
||||
<span class="kw">let</span> <span class="ident">hash</span> <span class="op">=</span> <span class="self">Self</span><span class="ident">::hasher</span>(<span class="kw-2">&</span><span class="ident">contents</span>);
|
||||
<span class="kw">let</span> <span class="ident">new_name</span> <span class="op">=</span> <span class="kw">if</span> <span class="self">self</span>.<span class="ident">no_hash</span>.<span class="ident">iter</span>().<span class="ident">any</span>(<span class="op">|</span><span class="ident">no_hash</span><span class="op">|</span> {
|
||||
<span class="kw">let</span> <span class="ident">no_hash</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="kw-2">&</span><span class="self">self</span>.<span class="ident">source</span>).<span class="ident">join</span>(<span class="kw-2">&</span><span class="ident">no_hash</span>);
|
||||
<span class="ident">no_hash</span> <span class="op">=</span><span class="op">=</span> <span class="ident">path</span>
|
||||
}) {
|
||||
<span class="macro">format!</span>(
|
||||
<span class="string">"{}.{}"</span>,
|
||||
<span class="ident">path</span>.<span class="ident">file_stem</span>().<span class="ident">unwrap</span>().<span class="ident">to_str</span>().<span class="ident">unwrap</span>(),
|
||||
<span class="ident">path</span>.<span class="ident">extension</span>().<span class="ident">unwrap</span>().<span class="ident">to_str</span>().<span class="ident">unwrap</span>()
|
||||
)
|
||||
} <span class="kw">else</span> {
|
||||
<span class="macro">format!</span>(
|
||||
<span class="string">"{}.{}.{}"</span>,
|
||||
<span class="ident">path</span>.<span class="ident">file_stem</span>().<span class="ident">unwrap</span>().<span class="ident">to_str</span>().<span class="ident">unwrap</span>(),
|
||||
<span class="ident">hash</span>,
|
||||
<span class="ident">path</span>.<span class="ident">extension</span>().<span class="ident">unwrap</span>().<span class="ident">to_str</span>().<span class="ident">unwrap</span>()
|
||||
)
|
||||
};
|
||||
<span class="self">self</span>.<span class="ident">copy</span>(<span class="ident">path</span>, <span class="kw-2">&</span><span class="ident">new_name</span>);
|
||||
<span class="kw">let</span> (<span class="ident">source</span>, <span class="ident">destination</span>) <span class="op">=</span> <span class="self">self</span>.<span class="ident">gen_map</span>(<span class="ident">path</span>, <span class="op">&&</span><span class="ident">new_name</span>);
|
||||
<span class="kw">let</span> <span class="kw">_</span> <span class="op">=</span> <span class="ident">file_map</span>.<span class="ident">add</span>(
|
||||
<span class="ident">source</span>.<span class="ident">to_str</span>().<span class="ident">unwrap</span>().<span class="ident">into</span>(),
|
||||
<span class="ident">destination</span>.<span class="ident">to_str</span>().<span class="ident">unwrap</span>().<span class="ident">into</span>(),
|
||||
);
|
||||
};
|
||||
|
||||
<span class="kw">match</span> <span class="self">self</span>.<span class="ident">mime_types</span>.<span class="ident">as_ref</span>() {
|
||||
<span class="prelude-val">Some</span>(<span class="ident">mime_types</span>) <span class="op">=</span><span class="op">></span> {
|
||||
<span class="kw">for</span> <span class="ident">mime_type</span> <span class="kw">in</span> <span class="ident">mime_types</span>.<span class="ident">iter</span>() {
|
||||
|
@ -730,25 +697,11 @@
|
|||
<span class="doccomment">/// data to the main program. This funtction sets that variable</span>
|
||||
<span class="kw">fn</span> <span class="ident">to_env</span>(<span class="kw-2">&</span><span class="self">self</span>) {
|
||||
<span class="kw">let</span> <span class="ident">json</span> <span class="op">=</span> <span class="ident">serde_json::to_string</span>(<span class="kw-2">&</span><span class="self">self</span>).<span class="ident">unwrap</span>();
|
||||
<span class="comment">// println!("cargo:rustc-env={}={}", ENV_VAR_NAME, json);</span>
|
||||
<span class="kw">let</span> <span class="ident">res</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="ident">CACHE_BUSTER_DATA_FILE</span>);
|
||||
<span class="kw">if</span> <span class="ident">res</span>.<span class="ident">exists</span>() {
|
||||
<span class="ident">fs::remove_file</span>(<span class="kw-2">&</span><span class="ident">res</span>).<span class="ident">unwrap</span>();
|
||||
}
|
||||
|
||||
<span class="comment">// const PREFIX: &str = r##"pub const FILE_MAP: &str = r#" "##;</span>
|
||||
<span class="comment">// const POSTFIX: &str = r##""#;"##;</span>
|
||||
|
||||
<span class="comment">// let content = format!("#[allow(dead_code)]\n{}{}{}", &PREFIX, &json, &POSTFIX);</span>
|
||||
|
||||
<span class="comment">// fs::write(CACHE_BUSTER_DATA_FILE, content).unwrap();</span>
|
||||
<span class="ident">fs::write</span>(<span class="ident">CACHE_BUSTER_DATA_FILE</span>, <span class="kw-2">&</span><span class="ident">json</span>).<span class="ident">unwrap</span>();
|
||||
|
||||
<span class="comment">// needed for testing load()</span>
|
||||
<span class="comment">// if the above statement fails(println), then something's broken</span>
|
||||
<span class="comment">// with the rust compiler. So not really worried about that.</span>
|
||||
<span class="comment">// #[cfg(test)]</span>
|
||||
<span class="comment">// std::env::set_var(ENV_VAR_NAME, serde_json::to_string(&self).unwrap());</span>
|
||||
}
|
||||
|
||||
<span class="attribute">#[<span class="ident">cfg</span>(<span class="ident">test</span>)]</span>
|
||||
|
@ -764,37 +717,6 @@
|
|||
<span class="kw">pub</span> <span class="kw">mod</span> <span class="ident">tests</span> {
|
||||
<span class="kw">use</span> <span class="kw">super</span>::<span class="kw-2">*</span>;
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">hasher_works</span>() {
|
||||
<span class="ident">delete_file</span>();
|
||||
<span class="kw">let</span> <span class="ident">types</span> <span class="op">=</span> <span class="macro">vec!</span>[
|
||||
<span class="ident">mime::IMAGE_PNG</span>,
|
||||
<span class="ident">mime::IMAGE_SVG</span>,
|
||||
<span class="ident">mime::IMAGE_JPEG</span>,
|
||||
<span class="ident">mime::IMAGE_GIF</span>,
|
||||
];
|
||||
|
||||
<span class="kw">let</span> <span class="ident">config</span> <span class="op">=</span> <span class="ident">BusterBuilder::default</span>()
|
||||
.<span class="ident">source</span>(<span class="string">"./dist"</span>)
|
||||
.<span class="ident">result</span>(<span class="string">"./prod56"</span>)
|
||||
.<span class="ident">mime_types</span>(<span class="ident">types</span>)
|
||||
.<span class="ident">copy</span>(<span class="bool-val">true</span>)
|
||||
.<span class="ident">follow_links</span>(<span class="bool-val">true</span>)
|
||||
.<span class="ident">build</span>()
|
||||
.<span class="ident">unwrap</span>();
|
||||
|
||||
<span class="ident">config</span>.<span class="ident">process</span>().<span class="ident">unwrap</span>();
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">files</span> <span class="op">=</span> <span class="ident">Files::load</span>();
|
||||
|
||||
<span class="kw">for</span> (<span class="ident">k</span>, <span class="ident">v</span>) <span class="kw">in</span> <span class="ident">files</span>.<span class="ident">map</span>.<span class="ident">drain</span>() {
|
||||
<span class="kw">let</span> <span class="ident">src</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="kw-2">&</span><span class="ident">k</span>);
|
||||
<span class="kw">let</span> <span class="ident">dest</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="kw-2">&</span><span class="ident">v</span>);
|
||||
|
||||
<span class="macro">assert_eq!</span>(<span class="ident">src</span>.<span class="ident">exists</span>(), <span class="ident">dest</span>.<span class="ident">exists</span>());
|
||||
}
|
||||
|
||||
<span class="ident">cleanup</span>(<span class="kw-2">&</span><span class="ident">config</span>);
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">cleanup</span>(<span class="ident">config</span>: <span class="kw-2">&</span><span class="ident">Buster</span>) {
|
||||
<span class="kw">let</span> <span class="kw">_</span> <span class="op">=</span> <span class="ident">fs::remove_dir_all</span>(<span class="kw-2">&</span><span class="ident">config</span>.<span class="ident">result</span>);
|
||||
<span class="ident">delete_file</span>();
|
||||
|
@ -804,56 +726,6 @@
|
|||
<span class="kw">let</span> <span class="kw">_</span> <span class="op">=</span> <span class="ident">fs::remove_file</span>(<span class="kw-2">&</span><span class="ident">CACHE_BUSTER_DATA_FILE</span>);
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">prefix_works</span>() {
|
||||
<span class="ident">delete_file</span>();
|
||||
<span class="kw">let</span> <span class="ident">types</span> <span class="op">=</span> <span class="macro">vec!</span>[
|
||||
<span class="ident">mime::IMAGE_PNG</span>,
|
||||
<span class="ident">mime::IMAGE_SVG</span>,
|
||||
<span class="ident">mime::IMAGE_JPEG</span>,
|
||||
<span class="ident">mime::IMAGE_GIF</span>,
|
||||
];
|
||||
|
||||
<span class="kw">let</span> <span class="ident">no_hash</span> <span class="op">=</span> <span class="macro">vec!</span>[<span class="string">"bell.svg"</span>, <span class="string">"eye.svg"</span>, <span class="string">"a/b/c/d/s/d/svg/10.svg"</span>];
|
||||
|
||||
<span class="kw">let</span> <span class="ident">config</span> <span class="op">=</span> <span class="ident">BusterBuilder::default</span>()
|
||||
.<span class="ident">source</span>(<span class="string">"./dist"</span>)
|
||||
.<span class="ident">result</span>(<span class="string">"/tmp/prod2i2"</span>)
|
||||
.<span class="ident">mime_types</span>(<span class="ident">types</span>)
|
||||
.<span class="ident">copy</span>(<span class="bool-val">true</span>)
|
||||
.<span class="ident">follow_links</span>(<span class="bool-val">true</span>)
|
||||
.<span class="ident">prefix</span>(<span class="string">"/test"</span>)
|
||||
.<span class="ident">no_hash</span>(<span class="ident">no_hash</span>.<span class="ident">clone</span>())
|
||||
.<span class="ident">build</span>()
|
||||
.<span class="ident">unwrap</span>();
|
||||
|
||||
<span class="ident">config</span>.<span class="ident">process</span>().<span class="ident">unwrap</span>();
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">files</span> <span class="op">=</span> <span class="ident">Files::load</span>();
|
||||
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">prefix</span>) <span class="op">=</span> <span class="kw-2">&</span><span class="ident">config</span>.<span class="ident">prefix</span> {
|
||||
<span class="ident">no_hash</span>.<span class="ident">iter</span>().<span class="ident">for_each</span>(<span class="op">|</span><span class="ident">file</span><span class="op">|</span> {
|
||||
<span class="macro">assert!</span>(<span class="ident">files</span>.<span class="ident">map</span>.<span class="ident">iter</span>().<span class="ident">any</span>(<span class="op">|</span>(<span class="ident">k</span>, <span class="ident">v</span>)<span class="op">|</span> {
|
||||
<span class="kw">let</span> <span class="ident">source</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="ident">k</span>);
|
||||
<span class="kw">let</span> <span class="ident">dest</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="kw-2">&</span><span class="ident">v</span>[<span class="ident">prefix</span>.<span class="ident">len</span>()..]);
|
||||
<span class="kw">let</span> <span class="ident">no_hash</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="ident">file</span>);
|
||||
<span class="kw">let</span> <span class="ident">stat</span> <span class="op">=</span> <span class="ident">source</span> <span class="op">=</span><span class="op">=</span> <span class="kw-2">&</span><span class="ident">Path::new</span>(<span class="kw-2">&</span><span class="ident">config</span>.<span class="ident">source</span>).<span class="ident">join</span>(<span class="ident">file</span>)
|
||||
<span class="op">&&</span> <span class="ident">dest</span>.<span class="ident">exists</span>()
|
||||
<span class="op">&&</span> <span class="ident">no_hash</span>.<span class="ident">file_name</span>() <span class="op">=</span><span class="op">=</span> <span class="ident">dest</span>.<span class="ident">file_name</span>();
|
||||
<span class="macro">println!</span>(<span class="string">"[{}] file: {}"</span>, <span class="ident">stat</span>, <span class="ident">file</span>);
|
||||
<span class="ident">stat</span>
|
||||
}));
|
||||
});
|
||||
|
||||
<span class="kw">for</span> (<span class="ident">k</span>, <span class="ident">v</span>) <span class="kw">in</span> <span class="ident">files</span>.<span class="ident">map</span>.<span class="ident">drain</span>() {
|
||||
<span class="kw">let</span> <span class="ident">src</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="kw-2">&</span><span class="ident">k</span>);
|
||||
<span class="kw">let</span> <span class="ident">dest</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="kw-2">&</span><span class="ident">v</span>[<span class="ident">prefix</span>.<span class="ident">len</span>()..]);
|
||||
|
||||
<span class="macro">assert_eq!</span>(<span class="ident">src</span>.<span class="ident">exists</span>(), <span class="ident">dest</span>.<span class="ident">exists</span>());
|
||||
}
|
||||
}
|
||||
|
||||
<span class="ident">cleanup</span>(<span class="kw-2">&</span><span class="ident">config</span>);
|
||||
}
|
||||
|
||||
<span class="attribute">#[<span class="ident">test</span>]</span>
|
||||
<span class="kw">fn</span> <span class="ident">no_hash_validation_works</span>() {
|
||||
<span class="kw">let</span> <span class="ident">types</span> <span class="op">=</span> <span class="macro">vec!</span>[
|
||||
|
@ -876,32 +748,94 @@
|
|||
.<span class="ident">is_err</span>())
|
||||
}
|
||||
|
||||
<span class="comment">// #[test]</span>
|
||||
<span class="comment">// fn no_specific_mime() {</span>
|
||||
<span class="comment">// let no_hash = vec!["858fd6c482cc75111d54.module.wasm"];</span>
|
||||
<span class="comment">// let config = BusterBuilder::default()</span>
|
||||
<span class="comment">// .source("./dist")</span>
|
||||
<span class="comment">// .result("/tmp/prod2ii")</span>
|
||||
<span class="comment">// .copy(true)</span>
|
||||
<span class="comment">// .follow_links(true)</span>
|
||||
<span class="comment">// .no_hash(no_hash.clone())</span>
|
||||
<span class="comment">// .prefix("/test")</span>
|
||||
<span class="comment">// .build()</span>
|
||||
<span class="comment">// .unwrap();</span>
|
||||
<span class="comment">// config.process().unwrap();</span>
|
||||
<span class="comment">// let files = Files::load();</span>
|
||||
<span class="comment">// files.map.iter().any(|(k, v)| {</span>
|
||||
<span class="comment">// let dest = Path::new(&v[prefix.len()..]);</span>
|
||||
<span class="comment">// let no_hash = Path::new(file);</span>
|
||||
<span class="comment">// k == file && dest.exists() && no_hash.file_name() == dest.file_name()</span>
|
||||
<span class="comment">// });</span>
|
||||
<span class="comment">//</span>
|
||||
<span class="comment">// cleanup(&config);</span>
|
||||
<span class="comment">// }</span>
|
||||
<span class="kw">fn</span> <span class="ident">no_specific_mime</span>() {
|
||||
<span class="ident">delete_file</span>();
|
||||
<span class="kw">use</span> <span class="ident">std</span>::{<span class="ident">thread</span>, <span class="ident">time</span>};
|
||||
|
||||
<span class="kw">let</span> <span class="ident">sleep</span> <span class="op">=</span> <span class="ident">time::Duration::from_secs</span>(<span class="number">4</span>);
|
||||
|
||||
<span class="ident">thread::sleep</span>(<span class="ident">sleep</span>);
|
||||
|
||||
<span class="kw">const</span> <span class="ident">WASM</span>: <span class="kw-2">&</span><span class="ident">str</span> <span class="op">=</span> <span class="string">"858fd6c482cc75111d54.module.wasm"</span>;
|
||||
<span class="kw">let</span> <span class="ident">no_hash</span> <span class="op">=</span> <span class="macro">vec!</span>[<span class="ident">WASM</span>, <span class="string">"bell.svg"</span>, <span class="string">"eye.svg"</span>, <span class="string">"a/b/c/d/s/d/svg/10.svg"</span>];
|
||||
<span class="kw">let</span> <span class="ident">config</span> <span class="op">=</span> <span class="ident">BusterBuilder::default</span>()
|
||||
.<span class="ident">source</span>(<span class="string">"./dist"</span>)
|
||||
.<span class="ident">result</span>(<span class="string">"/tmp/prod2ii"</span>)
|
||||
.<span class="ident">copy</span>(<span class="bool-val">true</span>)
|
||||
.<span class="ident">follow_links</span>(<span class="bool-val">true</span>)
|
||||
.<span class="ident">no_hash</span>(<span class="ident">no_hash</span>.<span class="ident">clone</span>())
|
||||
.<span class="ident">build</span>()
|
||||
.<span class="ident">unwrap</span>();
|
||||
<span class="ident">config</span>.<span class="ident">process</span>().<span class="ident">unwrap</span>();
|
||||
<span class="kw">let</span> <span class="ident">files</span> <span class="op">=</span> <span class="ident">Files::load</span>();
|
||||
|
||||
<span class="kw">let</span> <span class="ident">no_hash_file</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="kw-2">&</span><span class="ident">config</span>.<span class="ident">result</span>).<span class="ident">join</span>(<span class="ident">WASM</span>);
|
||||
<span class="macro">assert!</span>(<span class="ident">files</span>.<span class="ident">map</span>.<span class="ident">iter</span>().<span class="ident">any</span>(<span class="op">|</span>(<span class="ident">k</span>, <span class="ident">v</span>)<span class="op">|</span> {
|
||||
<span class="kw">let</span> <span class="ident">source</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="kw-2">&</span><span class="ident">config</span>.<span class="ident">source</span>).<span class="ident">join</span>(<span class="ident">k</span>);
|
||||
<span class="kw">let</span> <span class="ident">dest</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="kw-2">&</span><span class="ident">v</span>);
|
||||
<span class="ident">dest</span>.<span class="ident">file_name</span>() <span class="op">=</span><span class="op">=</span> <span class="ident">no_hash_file</span>.<span class="ident">file_name</span>()
|
||||
<span class="op">&&</span> <span class="ident">dest</span>.<span class="ident">exists</span>()
|
||||
<span class="op">&&</span> <span class="ident">source</span>.<span class="ident">file_name</span>() <span class="op">=</span><span class="op">=</span> <span class="ident">dest</span>.<span class="ident">file_name</span>()
|
||||
}));
|
||||
|
||||
<span class="ident">no_hash</span>.<span class="ident">iter</span>().<span class="ident">for_each</span>(<span class="op">|</span><span class="ident">file</span><span class="op">|</span> {
|
||||
<span class="macro">assert!</span>(<span class="ident">files</span>.<span class="ident">map</span>.<span class="ident">iter</span>().<span class="ident">any</span>(<span class="op">|</span>(<span class="ident">k</span>, <span class="ident">v</span>)<span class="op">|</span> {
|
||||
<span class="kw">let</span> <span class="ident">source</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="ident">k</span>);
|
||||
<span class="kw">let</span> <span class="ident">dest</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="kw-2">&</span><span class="ident">v</span>);
|
||||
<span class="kw">let</span> <span class="ident">no_hash</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="ident">file</span>);
|
||||
<span class="ident">source</span> <span class="op">=</span><span class="op">=</span> <span class="kw-2">&</span><span class="ident">Path::new</span>(<span class="kw-2">&</span><span class="ident">config</span>.<span class="ident">source</span>).<span class="ident">join</span>(<span class="ident">file</span>)
|
||||
<span class="op">&&</span> <span class="ident">dest</span>.<span class="ident">exists</span>()
|
||||
<span class="op">&&</span> <span class="ident">no_hash</span>.<span class="ident">file_name</span>() <span class="op">=</span><span class="op">=</span> <span class="ident">dest</span>.<span class="ident">file_name</span>()
|
||||
}));
|
||||
});
|
||||
|
||||
<span class="kw">for</span> (<span class="ident">k</span>, <span class="ident">v</span>) <span class="kw">in</span> <span class="ident">files</span>.<span class="ident">map</span>.<span class="ident">iter</span>() {
|
||||
<span class="kw">let</span> <span class="ident">src</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="kw-2">&</span><span class="ident">k</span>);
|
||||
<span class="kw">let</span> <span class="ident">dest</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="kw-2">&</span><span class="ident">v</span>);
|
||||
|
||||
<span class="macro">assert_eq!</span>(<span class="ident">src</span>.<span class="ident">exists</span>(), <span class="ident">dest</span>.<span class="ident">exists</span>());
|
||||
}
|
||||
|
||||
<span class="ident">cleanup</span>(<span class="kw-2">&</span><span class="ident">config</span>);
|
||||
}
|
||||
|
||||
<span class="kw">fn</span> <span class="ident">prefix_works</span>() {
|
||||
<span class="ident">delete_file</span>();
|
||||
<span class="kw">let</span> <span class="ident">types</span> <span class="op">=</span> <span class="macro">vec!</span>[
|
||||
<span class="ident">mime::IMAGE_PNG</span>,
|
||||
<span class="ident">mime::IMAGE_SVG</span>,
|
||||
<span class="ident">mime::IMAGE_JPEG</span>,
|
||||
<span class="ident">mime::IMAGE_GIF</span>,
|
||||
];
|
||||
|
||||
<span class="kw">let</span> <span class="ident">config</span> <span class="op">=</span> <span class="ident">BusterBuilder::default</span>()
|
||||
.<span class="ident">source</span>(<span class="string">"./dist"</span>)
|
||||
.<span class="ident">result</span>(<span class="string">"/tmp/prod2i"</span>)
|
||||
.<span class="ident">mime_types</span>(<span class="ident">types</span>)
|
||||
.<span class="ident">copy</span>(<span class="bool-val">true</span>)
|
||||
.<span class="ident">follow_links</span>(<span class="bool-val">true</span>)
|
||||
.<span class="ident">prefix</span>(<span class="string">"/test"</span>)
|
||||
.<span class="ident">build</span>()
|
||||
.<span class="ident">unwrap</span>();
|
||||
|
||||
<span class="ident">config</span>.<span class="ident">process</span>().<span class="ident">unwrap</span>();
|
||||
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">files</span> <span class="op">=</span> <span class="ident">Files::load</span>();
|
||||
|
||||
<span class="kw">if</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">prefix</span>) <span class="op">=</span> <span class="kw-2">&</span><span class="ident">config</span>.<span class="ident">prefix</span> {
|
||||
<span class="kw">for</span> (<span class="ident">k</span>, <span class="ident">v</span>) <span class="kw">in</span> <span class="ident">files</span>.<span class="ident">map</span>.<span class="ident">drain</span>() {
|
||||
<span class="kw">let</span> <span class="ident">src</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="kw-2">&</span><span class="ident">k</span>);
|
||||
<span class="kw">let</span> <span class="ident">dest</span> <span class="op">=</span> <span class="ident">Path::new</span>(<span class="kw-2">&</span><span class="ident">v</span>[<span class="ident">prefix</span>.<span class="ident">len</span>()..]);
|
||||
|
||||
<span class="macro">assert_eq!</span>(<span class="ident">src</span>.<span class="ident">exists</span>(), <span class="ident">dest</span>.<span class="ident">exists</span>());
|
||||
}
|
||||
}
|
||||
|
||||
<span class="ident">cleanup</span>(<span class="kw-2">&</span><span class="ident">config</span>);
|
||||
}
|
||||
|
||||
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">runner</span>() {
|
||||
<span class="ident">prefix_works</span>();
|
||||
<span class="ident">hasher_works</span>();
|
||||
<span class="ident">no_specific_mime</span>();
|
||||
}
|
||||
}
|
||||
</pre></div>
|
||||
|
|
Loading…
Reference in a new issue