Skip to content

Commit

Permalink
deploy: 9ce0138
Browse files Browse the repository at this point in the history
  • Loading branch information
dottorblaster committed Oct 10, 2024
1 parent 99a2f0c commit f04c308
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions Wanda.DataCase.html
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@ <h1 class="signature" translate="no">errors_on(changeset)</h1>

<section class="docstring">

<p>A helper that transforms changeset errors into a map of messages.</p><pre><code class="makeup elixir" translate="no"><span class="n">assert</span><span class="w"> </span><span class="p" data-group-id="9384172688-1">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="n">changeset</span><span class="p" data-group-id="9384172688-1">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Accounts</span><span class="o">.</span><span class="n">create_user</span><span class="p" data-group-id="9384172688-2">(</span><span class="p" data-group-id="9384172688-3">%{</span><span class="ss">password</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;short&quot;</span><span class="p" data-group-id="9384172688-3">}</span><span class="p" data-group-id="9384172688-2">)</span><span class="w">
</span><span class="n">assert</span><span class="w"> </span><span class="s">&quot;password is too short&quot;</span><span class="w"> </span><span class="ow">in</span><span class="w"> </span><span class="n">errors_on</span><span class="p" data-group-id="9384172688-4">(</span><span class="n">changeset</span><span class="p" data-group-id="9384172688-4">)</span><span class="o">.</span><span class="n">password</span><span class="w">
</span><span class="n">assert</span><span class="w"> </span><span class="p" data-group-id="9384172688-5">%{</span><span class="ss">password</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="9384172688-6">[</span><span class="s">&quot;password is too short&quot;</span><span class="p" data-group-id="9384172688-6">]</span><span class="p" data-group-id="9384172688-5">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">errors_on</span><span class="p" data-group-id="9384172688-7">(</span><span class="n">changeset</span><span class="p" data-group-id="9384172688-7">)</span></code></pre>
<p>A helper that transforms changeset errors into a map of messages.</p><pre><code class="makeup elixir" translate="no"><span class="n">assert</span><span class="w"> </span><span class="p" data-group-id="7289711347-1">{</span><span class="ss">:error</span><span class="p">,</span><span class="w"> </span><span class="n">changeset</span><span class="p" data-group-id="7289711347-1">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="nc">Accounts</span><span class="o">.</span><span class="n">create_user</span><span class="p" data-group-id="7289711347-2">(</span><span class="p" data-group-id="7289711347-3">%{</span><span class="ss">password</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;short&quot;</span><span class="p" data-group-id="7289711347-3">}</span><span class="p" data-group-id="7289711347-2">)</span><span class="w">
</span><span class="n">assert</span><span class="w"> </span><span class="s">&quot;password is too short&quot;</span><span class="w"> </span><span class="ow">in</span><span class="w"> </span><span class="n">errors_on</span><span class="p" data-group-id="7289711347-4">(</span><span class="n">changeset</span><span class="p" data-group-id="7289711347-4">)</span><span class="o">.</span><span class="n">password</span><span class="w">
</span><span class="n">assert</span><span class="w"> </span><span class="p" data-group-id="7289711347-5">%{</span><span class="ss">password</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="7289711347-6">[</span><span class="s">&quot;password is too short&quot;</span><span class="p" data-group-id="7289711347-6">]</span><span class="p" data-group-id="7289711347-5">}</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">errors_on</span><span class="p" data-group-id="7289711347-7">(</span><span class="n">changeset</span><span class="p" data-group-id="7289711347-7">)</span></code></pre>
</section>
</section>
<section class="detail" id="setup_sandbox/1">
Expand Down
14 changes: 7 additions & 7 deletions Wanda.Repo.html
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ <h1 class="signature" translate="no">disconnect_all(interval, opts \\ [])</h1>
<section class="docstring">

<p>A convenience function for SQL-based repositories that forces all connections in the
pool to disconnect within the given interval.</p><p>See <a href="https://hexdocs.pm/ecto_sql/3.12.0/Ecto.Adapters.SQL.html#disconnect_all/3"><code class="inline">Ecto.Adapters.SQL.disconnect_all/3</code></a> for more information.</p>
pool to disconnect within the given interval.</p><p>See <a href="https://hexdocs.pm/ecto_sql/3.12.1/Ecto.Adapters.SQL.html#disconnect_all/3"><code class="inline">Ecto.Adapters.SQL.disconnect_all/3</code></a> for more information.</p>
</section>
</section>
<section class="detail" id="exists?/2">
Expand Down Expand Up @@ -939,7 +939,7 @@ <h1 class="signature" translate="no">explain(operation, queryable, opts \\ [])</
<section class="docstring">

<p>A convenience function for SQL-based repositories that executes an EXPLAIN statement or similar
depending on the adapter to obtain statistics for the given query.</p><p>See <a href="https://hexdocs.pm/ecto_sql/3.12.0/Ecto.Adapters.SQL.html#explain/4"><code class="inline">Ecto.Adapters.SQL.explain/4</code></a> for more information.</p>
depending on the adapter to obtain statistics for the given query.</p><p>See <a href="https://hexdocs.pm/ecto_sql/3.12.1/Ecto.Adapters.SQL.html#explain/4"><code class="inline">Ecto.Adapters.SQL.explain/4</code></a> for more information.</p>
</section>
</section>
<section class="detail" id="get/3">
Expand Down Expand Up @@ -1363,7 +1363,7 @@ <h1 class="signature" translate="no">query(sql, params \\ [], opts \\ [])</h1>

<section class="docstring">

<p>A convenience function for SQL-based repositories that executes the given query.</p><p>See <a href="https://hexdocs.pm/ecto_sql/3.12.0/Ecto.Adapters.SQL.html#query/4"><code class="inline">Ecto.Adapters.SQL.query/4</code></a> for more information.</p>
<p>A convenience function for SQL-based repositories that executes the given query.</p><p>See <a href="https://hexdocs.pm/ecto_sql/3.12.1/Ecto.Adapters.SQL.html#query/4"><code class="inline">Ecto.Adapters.SQL.query/4</code></a> for more information.</p>
</section>
</section>
<section class="detail" id="query!/3">
Expand All @@ -1389,7 +1389,7 @@ <h1 class="signature" translate="no">query!(sql, params \\ [], opts \\ [])</h1>

<section class="docstring">

<p>A convenience function for SQL-based repositories that executes the given query.</p><p>See <a href="https://hexdocs.pm/ecto_sql/3.12.0/Ecto.Adapters.SQL.html#query!/4"><code class="inline">Ecto.Adapters.SQL.query!/4</code></a> for more information.</p>
<p>A convenience function for SQL-based repositories that executes the given query.</p><p>See <a href="https://hexdocs.pm/ecto_sql/3.12.1/Ecto.Adapters.SQL.html#query!/4"><code class="inline">Ecto.Adapters.SQL.query!/4</code></a> for more information.</p>
</section>
</section>
<section class="detail" id="query_many/3">
Expand All @@ -1415,7 +1415,7 @@ <h1 class="signature" translate="no">query_many(sql, params \\ [], opts \\ [])</

<section class="docstring">

<p>A convenience function for SQL-based repositories that executes the given multi-result query.</p><p>See <a href="https://hexdocs.pm/ecto_sql/3.12.0/Ecto.Adapters.SQL.html#query_many/4"><code class="inline">Ecto.Adapters.SQL.query_many/4</code></a> for more information.</p>
<p>A convenience function for SQL-based repositories that executes the given multi-result query.</p><p>See <a href="https://hexdocs.pm/ecto_sql/3.12.1/Ecto.Adapters.SQL.html#query_many/4"><code class="inline">Ecto.Adapters.SQL.query_many/4</code></a> for more information.</p>
</section>
</section>
<section class="detail" id="query_many!/3">
Expand All @@ -1441,7 +1441,7 @@ <h1 class="signature" translate="no">query_many!(sql, params \\ [], opts \\ [])<

<section class="docstring">

<p>A convenience function for SQL-based repositories that executes the given multi-result query.</p><p>See <a href="https://hexdocs.pm/ecto_sql/3.12.0/Ecto.Adapters.SQL.html#query_many!/4"><code class="inline">Ecto.Adapters.SQL.query_many!/4</code></a> for more information.</p>
<p>A convenience function for SQL-based repositories that executes the given multi-result query.</p><p>See <a href="https://hexdocs.pm/ecto_sql/3.12.1/Ecto.Adapters.SQL.html#query_many!/4"><code class="inline">Ecto.Adapters.SQL.query_many!/4</code></a> for more information.</p>
</section>
</section>
<section class="detail" id="reload/2">
Expand Down Expand Up @@ -1611,7 +1611,7 @@ <h1 class="signature" translate="no">to_sql(operation, queryable)</h1>

<section class="docstring">

<p>A convenience function for SQL-based repositories that translates the given query to SQL.</p><p>See <a href="https://hexdocs.pm/ecto_sql/3.12.0/Ecto.Adapters.SQL.html#to_sql/3"><code class="inline">Ecto.Adapters.SQL.to_sql/3</code></a> for more information.</p>
<p>A convenience function for SQL-based repositories that translates the given query to SQL.</p><p>See <a href="https://hexdocs.pm/ecto_sql/3.12.1/Ecto.Adapters.SQL.html#to_sql/3"><code class="inline">Ecto.Adapters.SQL.to_sql/3</code></a> for more information.</p>
</section>
</section>
<section class="detail" id="transaction/2">
Expand Down
Binary file modified Wanda.epub
Binary file not shown.
2 changes: 1 addition & 1 deletion gatherers.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ <h2 id="introduction" class="section-heading">
</a>
<span class="text">Introduction</span>
</h2>
<p>Gatherers can be thought of as functions:</p><ul><li>they have a name</li><li>they accept argument(s)</li><li>they return a value, the gathered <a href="specification.html#facts">Fact</a></li></ul><p>Facts Gathering process in a nutshell</p><pre><code class="makeup elixir" translate="no"><span class="n">fact</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gatherer</span><span class="p" data-group-id="1783621077-1">(</span><span class="n">argument</span><span class="p" data-group-id="1783621077-1">)</span></code></pre><h2 id="gatherers-versioning" class="section-heading">
<p>Gatherers can be thought of as functions:</p><ul><li>they have a name</li><li>they accept argument(s)</li><li>they return a value, the gathered <a href="specification.html#facts">Fact</a></li></ul><p>Facts Gathering process in a nutshell</p><pre><code class="makeup elixir" translate="no"><span class="n">fact</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gatherer</span><span class="p" data-group-id="0823154224-1">(</span><span class="n">argument</span><span class="p" data-group-id="0823154224-1">)</span></code></pre><h2 id="gatherers-versioning" class="section-heading">
<a href="#gatherers-versioning" class="hover-link">
<i class="ri-link-m" aria-hidden="true"></i>
</a>
Expand Down
2 changes: 1 addition & 1 deletion hack_on_wanda.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ <h2 id="requirements" class="section-heading">
</a>
<span class="text">Ensure Compatibility with asdf</span>
</h3>
<p><a href="https://asdf-vm.com/guide/introduction.html">asdf</a> allows using specific versions of programming language tools that are known to be compatible with the project, rather than relying on the version that's installed globally on the host system.</p><p>In order to use asdf, follow the official <a href="https://asdf-vm.com/guide/getting-started.html">asdf getting started guide</a>.</p><p>Install all required asdf plugins from <a href="/.tool-versions">.tool-versions</a> inside the web repository.</p><pre><code class="makeup elixir" translate="no"><span class="n">cut</span><span class="w"> </span><span class="o">-</span><span class="n">d</span><span class="sc">&#39; &#39;</span><span class="w"> </span><span class="o">-</span><span class="n">f1</span><span class="w"> </span><span class="o">.</span><span class="n">tool</span><span class="o">-</span><span class="n">versions</span><span class="o">|</span><span class="n">xargs</span><span class="w"> </span><span class="o">-</span><span class="n">i</span><span class="w"> </span><span class="n">asdf</span><span class="w"> </span><span class="n">plugin</span><span class="w"> </span><span class="n">add</span><span class="w"> </span><span class="p" data-group-id="8301993260-1">{</span><span class="p" data-group-id="8301993260-1">}</span></code></pre><p>Set up the asdf environment</p><pre><code class="makeup elixir" translate="no"><span class="n">asdf</span><span class="w"> </span><span class="n">install</span></code></pre><h2 id="development-environment" class="section-heading">
<p><a href="https://asdf-vm.com/guide/introduction.html">asdf</a> allows using specific versions of programming language tools that are known to be compatible with the project, rather than relying on the version that's installed globally on the host system.</p><p>In order to use asdf, follow the official <a href="https://asdf-vm.com/guide/getting-started.html">asdf getting started guide</a>.</p><p>Install all required asdf plugins from <a href="/.tool-versions">.tool-versions</a> inside the web repository.</p><pre><code class="makeup elixir" translate="no"><span class="n">cut</span><span class="w"> </span><span class="o">-</span><span class="n">d</span><span class="sc">&#39; &#39;</span><span class="w"> </span><span class="o">-</span><span class="n">f1</span><span class="w"> </span><span class="o">.</span><span class="n">tool</span><span class="o">-</span><span class="n">versions</span><span class="o">|</span><span class="n">xargs</span><span class="w"> </span><span class="o">-</span><span class="n">i</span><span class="w"> </span><span class="n">asdf</span><span class="w"> </span><span class="n">plugin</span><span class="w"> </span><span class="n">add</span><span class="w"> </span><span class="p" data-group-id="3147763406-1">{</span><span class="p" data-group-id="3147763406-1">}</span></code></pre><p>Set up the asdf environment</p><pre><code class="makeup elixir" translate="no"><span class="n">asdf</span><span class="w"> </span><span class="n">install</span></code></pre><h2 id="development-environment" class="section-heading">
<a href="#development-environment" class="hover-link">
<i class="ri-link-m" aria-hidden="true"></i>
</a>
Expand Down
8 changes: 4 additions & 4 deletions readme.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,14 +267,14 @@ <h1>
</h3>
<p>Often times knowing the returned value of the gathered facts is not a trivial thing, more during the implementation of new checks.</p><p>To better debug the fact gathering process and the returned values, the <code class="inline">facts</code> subcommand of <code class="inline">trento-agent</code> is a really useful tool. This command helps to see in the target itself what the gathered fact looks like. This is specially interesting when the returned value is a complex object or the target under test is modified and the check developer wants to see how this affects the gathered fact.</p><p>The command can be used as:</p><pre><code class="makeup elixir" translate="no"><span class="o">.</span><span class="o">/</span><span class="n">trento</span><span class="o">-</span><span class="n">agent</span><span class="w"> </span><span class="n">facts</span><span class="w"> </span><span class="n">gather</span><span class="w"> </span><span class="o">--</span><span class="n">gatherer</span><span class="w"> </span><span class="n">corosync</span><span class="o">.</span><span class="n">conf</span><span class="w"> </span><span class="o">--</span><span class="n">argument</span><span class="w"> </span><span class="n">totem</span><span class="o">.</span><span class="n">token</span><span class="w">
</span><span class="c1"># To see the currently available gatherers and their names</span><span class="w">
</span><span class="c1"># ./trento-agent facts list</span></code></pre><p>Which would return the next where the <code class="inline">Value</code> is the available value in the written check:</p><pre><code class="makeup elixir" translate="no"><span class="p" data-group-id="9407469027-1">{</span><span class="w">
</span><span class="c1"># ./trento-agent facts list</span></code></pre><p>Which would return the next where the <code class="inline">Value</code> is the available value in the written check:</p><pre><code class="makeup elixir" translate="no"><span class="p" data-group-id="8149913039-1">{</span><span class="w">
</span><span class="ss">&quot;Name&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;totem.token&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">&quot;CheckID&quot;</span><span class="p">:</span><span class="w"> </span><span class="s">&quot;&quot;</span><span class="p">,</span><span class="w">
</span><span class="ss">&quot;Value&quot;</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="9407469027-2">{</span><span class="w">
</span><span class="ss">&quot;Value&quot;</span><span class="p">:</span><span class="w"> </span><span class="p" data-group-id="8149913039-2">{</span><span class="w">
</span><span class="ss">&quot;Value&quot;</span><span class="p">:</span><span class="w"> </span><span class="mi">30000</span><span class="w">
</span><span class="p" data-group-id="9407469027-2">}</span><span class="p">,</span><span class="w">
</span><span class="p" data-group-id="8149913039-2">}</span><span class="p">,</span><span class="w">
</span><span class="ss">&quot;Error&quot;</span><span class="p">:</span><span class="w"> </span><span class="n">null</span><span class="w">
</span><span class="p" data-group-id="9407469027-1">}</span></code></pre><h2 id="adding-new-checks" class="section-heading">
</span><span class="p" data-group-id="8149913039-1">}</span></code></pre><h2 id="adding-new-checks" class="section-heading">
<a href="#adding-new-checks" class="hover-link">
<i class="ri-link-m" aria-hidden="true"></i>
</a>
Expand Down
Loading

0 comments on commit f04c308

Please sign in to comment.