Skip to content

Commit

Permalink
Change reset_values to reset for config instances
Browse files Browse the repository at this point in the history
  • Loading branch information
evanthegrayt committed Jun 11, 2020
1 parent c6a4176 commit c261c5d
Show file tree
Hide file tree
Showing 25 changed files with 174 additions and 142 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ end

## API
The API is fully documented in the
[documentation](https://evanthegrayt.github.io/standup_md/doc/index.html).
[RDoc Documentation](https://evanthegrayt.github.io/standup_md/doc/index.html).

This was mainly written as a command line utility, but the API is ridiculously
robust, and is available for use in your own projects. A quick example of how
Expand All @@ -290,7 +290,6 @@ to write a new entry via code could look like the following:

```ruby
require 'standup_md'
require 'date'

StandupMD.configure do |c|
c.file.current_header = 'Today',
Expand All @@ -307,7 +306,6 @@ API fit together. The code can actually be simplified to the following.

```ruby
require 'standup_md'
require 'date'

StandupMD.configure do |c|
c.file.current_header = 'Today',
Expand Down
22 changes: 10 additions & 12 deletions doc/README_md.html
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ <h2 id="label-Usage">Usage<span><a href="#label-Usage">&para;</a> <a href="#top"

<h3 id="label-Command+Line">Command Line<span><a href="#label-Command+Line">&para;</a> <a href="#top">&uarr;</a></span></h3>

<p>For the most basic usage, simplyt call the executable.</p>
<p>For the most basic usage, simply call the executable.</p>

<pre class="ruby"><span class="ruby-identifier">standup</span>
</pre>
Expand Down Expand Up @@ -337,27 +337,26 @@ <h4 id="label-Using+Existing+Standup+Files">Using Existing Standup Files<span><a
<p>Your <code>~/.standuprc</code> should contain:</p>

<pre class="ruby"><span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">configure</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">header_depth</span> <span class="ruby-value">2</span>
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">sub_header_depth</span> <span class="ruby-value">3</span>
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">current_header</span> <span class="ruby-constant">Today</span>
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">previous_header</span> <span class="ruby-constant">Yesterday</span>
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">impediments_header</span> <span class="ruby-constant">Hold</span><span class="ruby-operator">-</span><span class="ruby-identifier">ups</span>
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">bullet_character</span> <span class="ruby-string">&#39;*&#39;</span>
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">header_date_format</span> <span class="ruby-string">&#39;%m/%d/%Y&#39;</span>
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">sub_header_order</span> = <span class="ruby-node">%w[current previous impediments notes]</span>
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">header_depth</span> = <span class="ruby-value">2</span>
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">sub_header_depth</span> = <span class="ruby-value">3</span>
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">current_header</span> = <span class="ruby-string">&#39;Today&#39;</span>
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">previous_header</span> = <span class="ruby-string">&#39;Yesterday&#39;</span>
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">impediments_header</span> = <span class="ruby-string">&#39;Hold-ups&#39;</span>
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">bullet_character</span> = <span class="ruby-string">&#39;*&#39;</span>
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">header_date_format</span> = <span class="ruby-string">&#39;%m/%d/%Y&#39;</span>
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">sub_header_order</span> = <span class="ruby-node">%w[current previous impediments notes]</span>
<span class="ruby-keyword">end</span>
</pre>

<h2 id="label-API">API<span><a href="#label-API">&para;</a> <a href="#top">&uarr;</a></span></h2>

<p>The API is fully documented in the <a href="https://evanthegrayt.github.io/standup_md/doc/index.html">documentation</a>.</p>
<p>The API is fully documented in the <a href="https://evanthegrayt.github.io/standup_md/doc/index.html">RDoc Documentation</a>.</p>

<p>This was mainly written as a command line utility, but the API is ridiculously robust, and is available for use in your own projects. A quick example of how to write a new entry via code could look like the following:</p>

<h3 id="label-API+Examples">API Examples<span><a href="#label-API+Examples">&para;</a> <a href="#top">&uarr;</a></span></h3>

<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;standup_md&#39;</span>
<span class="ruby-identifier">require</span> <span class="ruby-string">&#39;date&#39;</span>

<span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">configure</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">current_header</span> = <span class="ruby-string">&#39;Today&#39;</span>,
Expand All @@ -372,7 +371,6 @@ <h3 id="label-API+Examples">API Examples<span><a href="#label-API+Examples">&par
<p>The above example was written as such to show how the different pieces of the API fit together. The code can actually be simplified to the following.</p>

<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;standup_md&#39;</span>
<span class="ruby-identifier">require</span> <span class="ruby-string">&#39;date&#39;</span>

<span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">configure</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">current_header</span> = <span class="ruby-string">&#39;Today&#39;</span>,
Expand Down
8 changes: 2 additions & 6 deletions doc/StandupMD.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,7 @@ <h3>Constants</h3>

<dd><p>The gem verision</p>

<p>@example</p>

<pre class="ruby"><span class="ruby-constant">StandupMD</span><span class="ruby-operator">::</span><span class="ruby-constant">VERSION</span>
<span class="ruby-comment"># =&gt; &#39;0.3.0&#39;</span>
</pre>
<p>@return [String]</p>


</dl>
Expand Down Expand Up @@ -145,7 +141,7 @@ <h3>Public Class Methods</h3>

<div class="method-description">

<p>Shorthand for <code>StanupMD::Cli</code></p>
<p>Method for accessing the configuration.</p>

<p>@return [StanupMD::Cli]</p>

Expand Down
12 changes: 6 additions & 6 deletions doc/StandupMD/Config/Cli.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ <h3>Methods</h3>

<li ><a href="#method-c-new">::new</a>

<li ><a href="#method-i-reset_values">#reset_values</a>
<li ><a href="#method-i-reset">#reset</a>

</ul>
</div>
Expand Down Expand Up @@ -278,7 +278,7 @@ <h3>Public Class Methods</h3>
<div class="method-source-code" id="new-source">
<pre><span class="ruby-comment"># File lib/standup_md/config/cli.rb, line 78</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>
<span class="ruby-identifier">reset_values</span>
<span class="ruby-identifier">reset</span>
<span class="ruby-keyword">end</span></pre>
</div>

Expand All @@ -298,10 +298,10 @@ <h3>Public Instance Methods</h3>
</header>


<div id="method-i-reset_values" class="method-detail ">
<div id="method-i-reset" class="method-detail ">

<div class="method-heading">
<span class="method-name">reset_values</span><span
<span class="method-name">reset</span><span
class="method-args">()</span>

<span class="method-click-advice">click to toggle source</span>
Expand All @@ -318,9 +318,9 @@ <h3>Public Instance Methods</h3>



<div class="method-source-code" id="reset_values-source">
<div class="method-source-code" id="reset-source">
<pre><span class="ruby-comment"># File lib/standup_md/config/cli.rb, line 86</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">reset_values</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">reset</span>
<span class="ruby-ivar">@date</span> = <span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>
<span class="ruby-ivar">@editor</span> = <span class="ruby-identifier">set_editor</span>
<span class="ruby-ivar">@verbose</span> = <span class="ruby-keyword">false</span>
Expand Down
12 changes: 6 additions & 6 deletions doc/StandupMD/Config/Entry.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ <h3>Methods</h3>

<li ><a href="#method-c-new">::new</a>

<li ><a href="#method-i-reset_values">#reset_values</a>
<li ><a href="#method-i-reset">#reset</a>

</ul>
</div>
Expand Down Expand Up @@ -210,7 +210,7 @@ <h3>Public Class Methods</h3>
<div class="method-source-code" id="new-source">
<pre><span class="ruby-comment"># File lib/standup_md/config/entry.rb, line 44</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>
<span class="ruby-identifier">reset_values</span>
<span class="ruby-identifier">reset</span>
<span class="ruby-keyword">end</span></pre>
</div>

Expand All @@ -230,10 +230,10 @@ <h3>Public Instance Methods</h3>
</header>


<div id="method-i-reset_values" class="method-detail ">
<div id="method-i-reset" class="method-detail ">

<div class="method-heading">
<span class="method-name">reset_values</span><span
<span class="method-name">reset</span><span
class="method-args">()</span>

<span class="method-click-advice">click to toggle source</span>
Expand All @@ -250,9 +250,9 @@ <h3>Public Instance Methods</h3>



<div class="method-source-code" id="reset_values-source">
<div class="method-source-code" id="reset-source">
<pre><span class="ruby-comment"># File lib/standup_md/config/entry.rb, line 52</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">reset_values</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">reset</span>
<span class="ruby-ivar">@current</span> = [<span class="ruby-string">&quot;&lt;!-- ADD TODAY&#39;S WORK HERE --&gt;&quot;</span>]
<span class="ruby-ivar">@previous</span> = []
<span class="ruby-ivar">@impediments</span> = [<span class="ruby-string">&#39;None&#39;</span>]
Expand Down
12 changes: 6 additions & 6 deletions doc/StandupMD/Config/EntryList.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ <h3>Methods</h3>

<li ><a href="#method-i-initalize">#initalize</a>

<li ><a href="#method-i-reset_values">#reset_values</a>
<li ><a href="#method-i-reset">#reset</a>

</ul>
</div>
Expand Down Expand Up @@ -134,7 +134,7 @@ <h3>Public Instance Methods</h3>
<div class="method-source-code" id="initalize-source">
<pre><span class="ruby-comment"># File lib/standup_md/config/entry_list.rb, line 12</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initalize</span>
<span class="ruby-identifier">reset_values</span>
<span class="ruby-identifier">reset</span>
<span class="ruby-keyword">end</span></pre>
</div>

Expand All @@ -146,10 +146,10 @@ <h3>Public Instance Methods</h3>
</div>


<div id="method-i-reset_values" class="method-detail ">
<div id="method-i-reset" class="method-detail ">

<div class="method-heading">
<span class="method-name">reset_values</span><span
<span class="method-name">reset</span><span
class="method-args">()</span>

<span class="method-click-advice">click to toggle source</span>
Expand All @@ -166,9 +166,9 @@ <h3>Public Instance Methods</h3>



<div class="method-source-code" id="reset_values-source">
<div class="method-source-code" id="reset-source">
<pre><span class="ruby-comment"># File lib/standup_md/config/entry_list.rb, line 20</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">reset_values</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">reset</span>
<span class="ruby-comment"># TODO add order ascending or decending.</span>
<span class="ruby-keyword">true</span>
<span class="ruby-keyword">end</span></pre>
Expand Down
12 changes: 6 additions & 6 deletions doc/StandupMD/Config/File.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ <h3>Methods</h3>

<li ><a href="#method-i-header_depth-3D">#header_depth=</a>

<li ><a href="#method-i-reset_values">#reset_values</a>
<li ><a href="#method-i-reset">#reset</a>

<li ><a href="#method-i-sub_header_depth-3D">#sub_header_depth=</a>

Expand Down Expand Up @@ -366,7 +366,7 @@ <h3>Public Class Methods</h3>
<div class="method-source-code" id="new-source">
<pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line 118</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>
<span class="ruby-identifier">reset_values</span>
<span class="ruby-identifier">reset</span>
<span class="ruby-keyword">end</span></pre>
</div>

Expand Down Expand Up @@ -505,10 +505,10 @@ <h3>Public Instance Methods</h3>
</div>


<div id="method-i-reset_values" class="method-detail ">
<div id="method-i-reset" class="method-detail ">

<div class="method-heading">
<span class="method-name">reset_values</span><span
<span class="method-name">reset</span><span
class="method-args">()</span>

<span class="method-click-advice">click to toggle source</span>
Expand All @@ -525,9 +525,9 @@ <h3>Public Instance Methods</h3>



<div class="method-source-code" id="reset_values-source">
<div class="method-source-code" id="reset-source">
<pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line 126</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">reset_values</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">reset</span>
<span class="ruby-ivar">@header_date_format</span> = <span class="ruby-string">&#39;%Y-%m-%d&#39;</span>
<span class="ruby-ivar">@header_depth</span> = <span class="ruby-value">1</span>
<span class="ruby-ivar">@sub_header_depth</span> = <span class="ruby-value">2</span>
Expand Down
Loading

0 comments on commit c261c5d

Please sign in to comment.