Skip to content

Commit

Permalink
Update for Crystal v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
m-o-e committed Apr 18, 2021
1 parent a8e4248 commit e64616f
Show file tree
Hide file tree
Showing 18 changed files with 482 additions and 312 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/crystal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: crystallang/crystal:0.35.1
image: crystallang/crystal:1.0.0

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
crystal 0.35.1
crystal 1.0.0
48 changes: 26 additions & 22 deletions docs/JSON.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 0.33.0">
<meta name="generator" content="Crystal Docs 0.34.0">
<meta name="crystal_docs.project_version" content="master-dev">
<meta name="crystal_docs.project_name" content="suzuri">


<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/doc.js"></script>
Expand All @@ -14,10 +17,10 @@
</symbol>
</svg>

<meta id="repository-name" content="github.com/busyloop/suzuri">
<title>JSON - github.com/busyloop/suzuri</title>
<meta id="repository-name" content="suzuri">
<title>JSON - suzuri master-dev</title>
<script type="text/javascript">
CrystalDoc.base_path = "";
CrystalDocs.base_path = "";
</script>
</head>
<body>
Expand All @@ -28,8 +31,16 @@
<input type="search" class="search-input" placeholder="Search..." spellcheck="false" aria-label="Search">
</div>

<div class="repository-links">
<a href="index.html">README</a>
<div class="project-summary">
<h1 class="project-name">
<a href="index.html">
suzuri
</a>
</h1>

<span class="project-version">
master-dev
</span>
</div>
</div>

Expand All @@ -40,12 +51,12 @@
<div class="types-list">
<ul>

<li class="parent open current" data-id="github.com/busyloop/suzuri/JSON" data-name="json">
<li class="parent open current" data-id="suzuri/JSON" data-name="json">
<a href="JSON.html">JSON</a>

<ul>

<li class=" " data-id="github.com/busyloop/suzuri/JSON/Serializable" data-name="json::serializable">
<li class=" " data-id="suzuri/JSON/Serializable" data-name="json::serializable">
<a href="JSON/Serializable.html">Serializable</a>

</li>
Expand All @@ -55,32 +66,32 @@

</li>

<li class="parent " data-id="github.com/busyloop/suzuri/Suzuri" data-name="suzuri">
<li class="parent " data-id="suzuri/Suzuri" data-name="suzuri">
<a href="Suzuri.html">Suzuri</a>

<ul>

<li class="parent " data-id="github.com/busyloop/suzuri/Suzuri/Error" data-name="suzuri::error">
<li class="parent " data-id="suzuri/Suzuri/Error" data-name="suzuri::error">
<a href="Suzuri/Error.html">Error</a>

<ul>

<li class=" " data-id="github.com/busyloop/suzuri/Suzuri/Error/DecodeError" data-name="suzuri::error::decodeerror">
<li class=" " data-id="suzuri/Suzuri/Error/DecodeError" data-name="suzuri::error::decodeerror">
<a href="Suzuri/Error/DecodeError.html">DecodeError</a>

</li>

<li class=" " data-id="github.com/busyloop/suzuri/Suzuri/Error/DecryptionFailed" data-name="suzuri::error::decryptionfailed">
<li class=" " data-id="suzuri/Suzuri/Error/DecryptionFailed" data-name="suzuri::error::decryptionfailed">
<a href="Suzuri/Error/DecryptionFailed.html">DecryptionFailed</a>

</li>

<li class=" " data-id="github.com/busyloop/suzuri/Suzuri/Error/MalformedInput" data-name="suzuri::error::malformedinput">
<li class=" " data-id="suzuri/Suzuri/Error/MalformedInput" data-name="suzuri::error::malformedinput">
<a href="Suzuri/Error/MalformedInput.html">MalformedInput</a>

</li>

<li class=" " data-id="github.com/busyloop/suzuri/Suzuri/Error/TokenExpired" data-name="suzuri::error::tokenexpired">
<li class=" " data-id="suzuri/Suzuri/Error/TokenExpired" data-name="suzuri::error::tokenexpired">
<a href="Suzuri/Error/TokenExpired.html">TokenExpired</a>

</li>
Expand All @@ -90,7 +101,7 @@

</li>

<li class=" " data-id="github.com/busyloop/suzuri/Suzuri/Token" data-name="suzuri::token">
<li class=" " data-id="suzuri/Suzuri/Token" data-name="suzuri::token">
<a href="Suzuri/Token.html">Token</a>

</li>
Expand Down Expand Up @@ -139,13 +150,6 @@ <h2>
Defined in:
</h2>


<a href="https://github.com/busyloop/suzuri/blob/0aea515eb073bb843844d567fcdf1c3edad8141b/src/suzuri/json_serializable.cr#L33" target="_blank">
suzuri/json_serializable.cr
</a>

<br/>




Expand Down
56 changes: 33 additions & 23 deletions docs/JSON/Serializable.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Crystal Docs 0.33.0">
<meta name="generator" content="Crystal Docs 0.34.0">
<meta name="crystal_docs.project_version" content="master-dev">
<meta name="crystal_docs.project_name" content="suzuri">


<link href="../css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/doc.js"></script>
Expand All @@ -14,10 +17,10 @@
</symbol>
</svg>

<meta id="repository-name" content="github.com/busyloop/suzuri">
<title>JSON::Serializable - github.com/busyloop/suzuri</title>
<meta id="repository-name" content="suzuri">
<title>JSON::Serializable - suzuri master-dev</title>
<script type="text/javascript">
CrystalDoc.base_path = "../";
CrystalDocs.base_path = "../";
</script>
</head>
<body>
Expand All @@ -28,8 +31,16 @@
<input type="search" class="search-input" placeholder="Search..." spellcheck="false" aria-label="Search">
</div>

<div class="repository-links">
<a href="../index.html">README</a>
<div class="project-summary">
<h1 class="project-name">
<a href="../index.html">
suzuri
</a>
</h1>

<span class="project-version">
master-dev
</span>
</div>
</div>

Expand All @@ -40,12 +51,12 @@
<div class="types-list">
<ul>

<li class="parent open current" data-id="github.com/busyloop/suzuri/JSON" data-name="json">
<li class="parent open current" data-id="suzuri/JSON" data-name="json">
<a href="../JSON.html">JSON</a>

<ul>

<li class=" current" data-id="github.com/busyloop/suzuri/JSON/Serializable" data-name="json::serializable">
<li class=" current" data-id="suzuri/JSON/Serializable" data-name="json::serializable">
<a href="../JSON/Serializable.html">Serializable</a>

</li>
Expand All @@ -55,32 +66,32 @@

</li>

<li class="parent " data-id="github.com/busyloop/suzuri/Suzuri" data-name="suzuri">
<li class="parent " data-id="suzuri/Suzuri" data-name="suzuri">
<a href="../Suzuri.html">Suzuri</a>

<ul>

<li class="parent " data-id="github.com/busyloop/suzuri/Suzuri/Error" data-name="suzuri::error">
<li class="parent " data-id="suzuri/Suzuri/Error" data-name="suzuri::error">
<a href="../Suzuri/Error.html">Error</a>

<ul>

<li class=" " data-id="github.com/busyloop/suzuri/Suzuri/Error/DecodeError" data-name="suzuri::error::decodeerror">
<li class=" " data-id="suzuri/Suzuri/Error/DecodeError" data-name="suzuri::error::decodeerror">
<a href="../Suzuri/Error/DecodeError.html">DecodeError</a>

</li>

<li class=" " data-id="github.com/busyloop/suzuri/Suzuri/Error/DecryptionFailed" data-name="suzuri::error::decryptionfailed">
<li class=" " data-id="suzuri/Suzuri/Error/DecryptionFailed" data-name="suzuri::error::decryptionfailed">
<a href="../Suzuri/Error/DecryptionFailed.html">DecryptionFailed</a>

</li>

<li class=" " data-id="github.com/busyloop/suzuri/Suzuri/Error/MalformedInput" data-name="suzuri::error::malformedinput">
<li class=" " data-id="suzuri/Suzuri/Error/MalformedInput" data-name="suzuri::error::malformedinput">
<a href="../Suzuri/Error/MalformedInput.html">MalformedInput</a>

</li>

<li class=" " data-id="github.com/busyloop/suzuri/Suzuri/Error/TokenExpired" data-name="suzuri::error::tokenexpired">
<li class=" " data-id="suzuri/Suzuri/Error/TokenExpired" data-name="suzuri::error::tokenexpired">
<a href="../Suzuri/Error/TokenExpired.html">TokenExpired</a>

</li>
Expand All @@ -90,7 +101,7 @@

</li>

<li class=" " data-id="github.com/busyloop/suzuri/Suzuri/Token" data-name="suzuri::token">
<li class=" " data-id="suzuri/Suzuri/Token" data-name="suzuri::token">
<a href="../Suzuri/Token.html">Token</a>

</li>
Expand Down Expand Up @@ -150,10 +161,16 @@ <h2>
decoded <span class="o">=</span> <span class="t">Person</span>.from_suzuri(token, <span class="t">KEY</span>)
decoded.name <span class="c"># =&gt; &quot;bob&quot;</span>

<span class="c"># Decode with ttl constraint</span>
decoded <span class="o">=</span> <span class="t">Person</span>.from_suzuri(token, <span class="t">KEY</span>, <span class="n">5</span>.seconds)

<span class="c"># Decode with timestamp</span>
decoded, timestamp <span class="o">=</span> <span class="t">Person</span>.from_suzuri_with_timestamp(token, <span class="t">KEY</span>)
decoded.name <span class="c"># =&gt; &quot;bob&quot;</span>
timestamp <span class="c"># =&gt; Time</span></code></pre>
timestamp <span class="c"># =&gt; Time</span>

<span class="c"># Decode with timestamp and ttl constraint</span>
decoded, timestamp <span class="o">=</span> <span class="t">Person</span>.from_suzuri_with_timestamp(token, <span class="t">KEY</span>, <span class="n">5</span>.seconds)</code></pre>



Expand All @@ -177,13 +194,6 @@ <h2>
Defined in:
</h2>


<a href="https://github.com/busyloop/suzuri/blob/0aea515eb073bb843844d567fcdf1c3edad8141b/src/suzuri/json_serializable.cr#L33" target="_blank">
suzuri/json_serializable.cr
</a>

<br/>




Expand Down
Loading

0 comments on commit e64616f

Please sign in to comment.