Deploying to gh-pages from @ fd67a9fa42 🚀

This commit is contained in:
realaravinth
2021-05-29 08:12:47 +00:00
parent 47ed386e95
commit 472ba83b20
33 changed files with 2837 additions and 63 deletions

View File

@@ -160,23 +160,27 @@
<span id="157">157</span>
<span id="158">158</span>
<span id="159">159</span>
<span id="160">160</span>
<span id="161">161</span>
<span id="162">162</span>
<span id="163">163</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="comment">/*
* Copyright (C) 2021 Aravinth Manivannan &lt;realaravinth@batsense.net&gt;
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see &lt;https://www.gnu.org/licenses/&gt;.
*/</span>
* Copyright (C) 2021 Aravinth Manivannan &lt;realaravinth@batsense.net&gt;
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see &lt;https://www.gnu.org/licenses/&gt;.
*/</span>
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">env</span>;
<span class="kw">use</span> <span class="ident">actix_identity</span>::{<span class="ident">CookieIdentityPolicy</span>, <span class="ident">IdentityService</span>};
@@ -223,6 +227,10 @@
<span class="ident">FILES</span>.<span class="ident">get</span>(<span class="string">&quot;./static/cache/bundle/bundle.css&quot;</span>).<span class="ident">unwrap</span>();
<span class="kw">pub</span> <span class="kw">static</span> <span class="kw-2">ref</span> <span class="ident">MOBILE_CSS</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static</span> <span class="ident">str</span> <span class="op">=</span>
<span class="ident">FILES</span>.<span class="ident">get</span>(<span class="string">&quot;./static/cache/bundle/mobile.css&quot;</span>).<span class="ident">unwrap</span>();
<span class="kw">pub</span> <span class="kw">static</span> <span class="kw-2">ref</span> <span class="ident">VERIFICATIN_WIDGET_JS</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static</span> <span class="ident">str</span> <span class="op">=</span>
<span class="ident">FILES</span>.<span class="ident">get</span>(<span class="string">&quot;./static/cache/bundle/verificationWidget.js&quot;</span>).<span class="ident">unwrap</span>();
<span class="kw">pub</span> <span class="kw">static</span> <span class="kw-2">ref</span> <span class="ident">VERIFICATIN_WIDGET_CSS</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;static</span> <span class="ident">str</span> <span class="op">=</span>
<span class="ident">FILES</span>.<span class="ident">get</span>(<span class="string">&quot;./static/cache/bundle/verificationWidget.css&quot;</span>).<span class="ident">unwrap</span>();
<span class="doccomment">/// points to source files matching build commit</span>
<span class="kw">pub</span> <span class="kw">static</span> <span class="kw-2">ref</span> <span class="ident">SOURCE_FILES_OF_INSTANCE</span>: <span class="ident">String</span> <span class="op">=</span> {

View File

@@ -136,6 +136,20 @@
<span id="133">133</span>
<span id="134">134</span>
<span id="135">135</span>
<span id="136">136</span>
<span id="137">137</span>
<span id="138">138</span>
<span id="139">139</span>
<span id="140">140</span>
<span id="141">141</span>
<span id="142">142</span>
<span id="143">143</span>
<span id="144">144</span>
<span id="145">145</span>
<span id="146">146</span>
<span id="147">147</span>
<span id="148">148</span>
<span id="149">149</span>
</pre><div class="example-wrap"><pre class="rust ">
<span class="comment">/*
* Copyright (C) 2021 Aravinth Manivannan &lt;realaravinth@batsense.net&gt;
@@ -241,6 +255,20 @@
.<span class="kw">await</span>;
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">resp</span>.<span class="ident">status</span>(), <span class="ident">StatusCode</span>::<span class="ident">OK</span>);
<span class="kw">let</span> <span class="ident">resp</span> <span class="op">=</span> <span class="ident">test</span>::<span class="ident">call_service</span>(
<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">app</span>,
<span class="ident">test</span>::<span class="ident">TestRequest</span>::<span class="ident">get</span>().<span class="ident">uri</span>(<span class="kw-2">&amp;</span><span class="kw-2">*</span><span class="kw">crate</span>::<span class="ident">VERIFICATIN_WIDGET_JS</span>).<span class="ident">to_request</span>(),
)
.<span class="kw">await</span>;
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">resp</span>.<span class="ident">status</span>(), <span class="ident">StatusCode</span>::<span class="ident">OK</span>);
<span class="kw">let</span> <span class="ident">resp</span> <span class="op">=</span> <span class="ident">test</span>::<span class="ident">call_service</span>(
<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">app</span>,
<span class="ident">test</span>::<span class="ident">TestRequest</span>::<span class="ident">get</span>().<span class="ident">uri</span>(<span class="kw-2">&amp;</span><span class="kw-2">*</span><span class="kw">crate</span>::<span class="ident">VERIFICATIN_WIDGET_CSS</span>).<span class="ident">to_request</span>(),
)
.<span class="kw">await</span>;
<span class="macro">assert_eq</span><span class="macro">!</span>(<span class="ident">resp</span>.<span class="ident">status</span>(), <span class="ident">StatusCode</span>::<span class="ident">OK</span>);
<span class="kw">let</span> <span class="ident">resp</span> <span class="op">=</span> <span class="ident">test</span>::<span class="ident">call_service</span>(
<span class="kw-2">&amp;</span><span class="kw-2">mut</span> <span class="ident">app</span>,
<span class="ident">test</span>::<span class="ident">TestRequest</span>::<span class="ident">get</span>().<span class="ident">uri</span>(