Skip to content

Commit

Permalink
Slight refactors
Browse files Browse the repository at this point in the history
  • Loading branch information
evanthegrayt committed May 8, 2021
1 parent 11208d3 commit 4a6347b
Show file tree
Hide file tree
Showing 14 changed files with 67 additions and 64 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
standup_md (0.3.7)
standup_md (0.3.8)

GEM
remote: https://rubygems.org/
Expand Down
15 changes: 9 additions & 6 deletions doc/StandupMD.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ <h3>Public Class Methods</h3>
<div class="method-source-code" id="config-source">
<pre><span class="ruby-comment"># File lib/standup_md.rb, line 19</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">config</span>
<span class="ruby-ivar">@config</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">StandupMD</span><span class="ruby-operator">::</span><span class="ruby-constant">Config</span>.<span class="ruby-identifier">new</span>
<span class="ruby-ivar">@config</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">reset_config</span>
<span class="ruby-keyword">end</span></pre>
</div>
</div>
Expand Down Expand Up @@ -183,14 +183,17 @@ <h3>Public Class Methods</h3>

<p>@param [String] file</p>

<p>@return [String] file</p>

<div class="method-source-code" id="load_config_file-source">
<pre><span class="ruby-comment"># File lib/standup_md.rb, line 52</span>
<pre><span class="ruby-comment"># File lib/standup_md.rb, line 54</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">load_config_file</span>(<span class="ruby-identifier">file</span>)
<span class="ruby-identifier">file</span> = <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">file</span>)
<span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;File #{file} does not exist.&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span>(<span class="ruby-identifier">file</span>)
<span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">file</span>).<span class="ruby-identifier">tap</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
<span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;File #{file} does not exist.&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span>(<span class="ruby-identifier">file</span>)

<span class="ruby-ivar">@config_file_loaded</span> = <span class="ruby-keyword">true</span>
<span class="ruby-identifier">load</span> <span class="ruby-identifier">file</span>
<span class="ruby-ivar">@config_file_loaded</span> = <span class="ruby-keyword">true</span>
<span class="ruby-identifier">load</span> <span class="ruby-identifier">file</span>
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
</div>
</div>
Expand Down
14 changes: 7 additions & 7 deletions doc/StandupMD/Cli.html
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,13 @@ <h3>Public Class Methods</h3>
<div class="method-source-code" id="execute-source">
<pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 30</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">execute</span>(<span class="ruby-identifier">options</span> = [])
<span class="ruby-identifier">exe</span> = <span class="ruby-identifier">new</span>(<span class="ruby-identifier">options</span>)

<span class="ruby-identifier">exe</span>.<span class="ruby-identifier">write_file</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">write</span>
<span class="ruby-keyword">if</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">print</span>
<span class="ruby-identifier">exe</span>.<span class="ruby-identifier">print</span>(<span class="ruby-identifier">exe</span>.<span class="ruby-identifier">entry</span>)
<span class="ruby-keyword">elsif</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">edit</span>
<span class="ruby-identifier">exe</span>.<span class="ruby-identifier">edit</span>
<span class="ruby-identifier">new</span>(<span class="ruby-identifier">options</span>).<span class="ruby-identifier">tap</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">exe</span><span class="ruby-operator">|</span>
<span class="ruby-identifier">exe</span>.<span class="ruby-identifier">write_file</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">write</span>
<span class="ruby-keyword">if</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">print</span>
<span class="ruby-identifier">exe</span>.<span class="ruby-identifier">print</span>(<span class="ruby-identifier">exe</span>.<span class="ruby-identifier">entry</span>)
<span class="ruby-keyword">elsif</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">edit</span>
<span class="ruby-identifier">exe</span>.<span class="ruby-identifier">edit</span>
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
</div>
Expand Down
6 changes: 3 additions & 3 deletions doc/StandupMD/Config/File.html
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,9 @@ <h3>Public Instance Methods</h3>
<div class="method-source-code" id="directory-3D-source">
<pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line 202</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">directory=</span>(<span class="ruby-identifier">directory</span>)
<span class="ruby-identifier">directory</span> = <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">directory</span>)
<span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">directory</span>) <span class="ruby-keyword">unless</span> <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">directory</span>)
<span class="ruby-ivar">@directory</span> = <span class="ruby-identifier">directory</span>
<span class="ruby-ivar">@directory</span> = <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">directory</span>).<span class="ruby-identifier">tap</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">directory</span><span class="ruby-operator">|</span>
<span class="ruby-constant">FileUtils</span>.<span class="ruby-identifier">mkdir_p</span>(<span class="ruby-identifier">directory</span>) <span class="ruby-keyword">unless</span> <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">directory</span>)
<span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions doc/StandupMD/Entry.html
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,11 @@ <h3>Public Class Methods</h3>
<span class="ruby-identifier">raise</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">date</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Date</span>)
<span class="ruby-ivar">@config</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">config</span>

<span class="ruby-ivar">@date</span> = <span class="ruby-identifier">date</span>
<span class="ruby-ivar">@current</span> = <span class="ruby-identifier">current</span>
<span class="ruby-ivar">@previous</span> = <span class="ruby-identifier">previous</span>
<span class="ruby-ivar">@impediments</span> = <span class="ruby-identifier">impediments</span>
<span class="ruby-ivar">@notes</span> = <span class="ruby-identifier">notes</span>
<span class="ruby-ivar">@date</span> = <span class="ruby-identifier">date</span>
<span class="ruby-ivar">@current</span> = <span class="ruby-identifier">current</span>
<span class="ruby-ivar">@previous</span> = <span class="ruby-identifier">previous</span>
<span class="ruby-ivar">@impediments</span> = <span class="ruby-identifier">impediments</span>
<span class="ruby-ivar">@notes</span> = <span class="ruby-identifier">notes</span>
<span class="ruby-keyword">end</span></pre>
</div>
</div>
Expand Down
14 changes: 7 additions & 7 deletions doc/created.rid
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Fri, 07 May 2021 17:33:43 -0500
Sat, 08 May 2021 00:03:30 -0500
README.md Fri, 07 May 2021 17:33:37 -0500
lib/standup_md.rb Tue, 13 Oct 2020 21:04:02 -0500
lib/standup_md/cli.rb Tue, 13 Oct 2020 21:04:02 -0500
lib/standup_md/cli/helpers.rb Tue, 13 Oct 2020 21:49:05 -0500
lib/standup_md.rb Fri, 07 May 2021 23:55:13 -0500
lib/standup_md/cli.rb Sat, 08 May 2021 00:01:31 -0500
lib/standup_md/cli/helpers.rb Fri, 07 May 2021 23:53:07 -0500
lib/standup_md/config.rb Tue, 13 Oct 2020 21:04:02 -0500
lib/standup_md/config/cli.rb Tue, 13 Oct 2020 21:04:02 -0500
lib/standup_md/config/entry.rb Tue, 13 Oct 2020 21:04:02 -0500
lib/standup_md/config/entry_list.rb Wed, 17 Jun 2020 08:47:50 -0500
lib/standup_md/config/file.rb Wed, 17 Jun 2020 08:47:50 -0500
lib/standup_md/entry.rb Fri, 07 May 2021 17:17:46 -0500
lib/standup_md/config/file.rb Fri, 07 May 2021 23:57:01 -0500
lib/standup_md/entry.rb Fri, 07 May 2021 23:57:15 -0500
lib/standup_md/entry_list.rb Mon, 12 Apr 2021 21:51:46 -0500
lib/standup_md/file.rb Mon, 26 Apr 2021 09:04:06 -0500
lib/standup_md/file/helpers.rb Tue, 13 Oct 2020 21:04:02 -0500
lib/standup_md/version.rb Fri, 07 May 2021 17:17:46 -0500
lib/standup_md/version.rb Sat, 08 May 2021 00:03:13 -0500
Loading

0 comments on commit 4a6347b

Please sign in to comment.