standup_md 0.3.1 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +11 -9
- data/README.md +77 -43
- data/Rakefile +3 -1
- data/doc/README_md.html +63 -59
- data/doc/StandupMD.html +4 -23
- data/doc/StandupMD/Cli.html +11 -11
- data/doc/StandupMD/Cli/Helpers.html +8 -7
- data/doc/StandupMD/Config/Cli.html +29 -20
- data/doc/StandupMD/Config/Entry.html +26 -14
- data/doc/StandupMD/Config/EntryList.html +26 -11
- data/doc/StandupMD/Config/File.html +30 -26
- data/doc/StandupMD/Entry.html +1 -1
- data/doc/StandupMD/EntryList.html +116 -194
- data/doc/StandupMD/File.html +67 -25
- data/doc/StandupMD/Version.html +176 -0
- data/doc/created.rid +15 -15
- data/doc/index.html +62 -58
- data/doc/js/navigation.js.gz +0 -0
- data/doc/js/search_index.js +1 -1
- data/doc/js/search_index.js.gz +0 -0
- data/doc/js/searcher.js.gz +0 -0
- data/doc/table_of_contents.html +66 -59
- data/lib/standup_md.rb +4 -3
- data/lib/standup_md/cli.rb +2 -3
- data/lib/standup_md/cli/helpers.rb +66 -34
- data/lib/standup_md/config.rb +2 -2
- data/lib/standup_md/config/cli.rb +24 -23
- data/lib/standup_md/config/entry.rb +14 -9
- data/lib/standup_md/config/entry_list.rb +10 -5
- data/lib/standup_md/config/file.rb +26 -16
- data/lib/standup_md/entry.rb +2 -2
- data/lib/standup_md/entry_list.rb +24 -41
- data/lib/standup_md/file.rb +42 -15
- data/lib/standup_md/file/helpers.rb +13 -15
- data/lib/standup_md/version.rb +23 -6
- data/standup_md.gemspec +12 -16
- metadata +7 -6
data/doc/StandupMD.html
CHANGED
@@ -91,7 +91,7 @@
|
|
91
91
|
|
92
92
|
<section class="description">
|
93
93
|
|
94
|
-
<p>The
|
94
|
+
<p>The main module for the gem. Provides access to configuration classes.</p>
|
95
95
|
|
96
96
|
</section>
|
97
97
|
|
@@ -102,26 +102,6 @@
|
|
102
102
|
|
103
103
|
|
104
104
|
|
105
|
-
<section class="constants-list">
|
106
|
-
<header>
|
107
|
-
<h3>Constants</h3>
|
108
|
-
</header>
|
109
|
-
<dl>
|
110
|
-
|
111
|
-
<dt id="VERSION">VERSION
|
112
|
-
|
113
|
-
<dd><p>The gem verision</p>
|
114
|
-
|
115
|
-
<p>@example</p>
|
116
|
-
|
117
|
-
<pre class="ruby"><span class="ruby-constant">StandupMD</span><span class="ruby-operator">::</span><span class="ruby-constant">VERSION</span>
|
118
|
-
<span class="ruby-comment"># => '0.3.0'</span>
|
119
|
-
</pre>
|
120
|
-
|
121
|
-
|
122
|
-
</dl>
|
123
|
-
</section>
|
124
|
-
|
125
105
|
|
126
106
|
|
127
107
|
|
@@ -145,7 +125,7 @@
|
|
145
125
|
|
146
126
|
<div class="method-description">
|
147
127
|
|
148
|
-
<p>
|
128
|
+
<p>Method for accessing the configuration.</p>
|
149
129
|
|
150
130
|
<p>@return [StanupMD::Cli]</p>
|
151
131
|
|
@@ -228,7 +208,7 @@
|
|
228
208
|
<div class="method-source-code" id="configure-source">
|
229
209
|
<pre><span class="ruby-comment"># File lib/standup_md.rb, line 36</span>
|
230
210
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">configure</span>
|
231
|
-
<span class="ruby-keyword">yield</span> <span class="ruby-
|
211
|
+
<span class="ruby-keyword">yield</span> <span class="ruby-identifier">config</span>
|
232
212
|
<span class="ruby-keyword">end</span></pre>
|
233
213
|
</div>
|
234
214
|
|
@@ -265,6 +245,7 @@
|
|
265
245
|
<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>)
|
266
246
|
<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>)
|
267
247
|
<span class="ruby-identifier">raise</span> <span class="ruby-node">"File #{file} does not exist."</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>)
|
248
|
+
|
268
249
|
<span class="ruby-ivar">@config_file_loaded</span> = <span class="ruby-keyword">true</span>
|
269
250
|
<span class="ruby-identifier">load</span> <span class="ruby-identifier">file</span>
|
270
251
|
<span class="ruby-keyword">end</span></pre>
|
data/doc/StandupMD/Cli.html
CHANGED
@@ -212,7 +212,7 @@
|
|
212
212
|
|
213
213
|
|
214
214
|
<div class="method-source-code" id="config-source">
|
215
|
-
<pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line
|
215
|
+
<pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 16</span>
|
216
216
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">config</span>
|
217
217
|
<span class="ruby-ivar">@config</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">cli</span>
|
218
218
|
<span class="ruby-keyword">end</span></pre>
|
@@ -247,7 +247,7 @@
|
|
247
247
|
|
248
248
|
|
249
249
|
<div class="method-source-code" id="echo-source">
|
250
|
-
<pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line
|
250
|
+
<pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 24</span>
|
251
251
|
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">echo</span>(<span class="ruby-identifier">msg</span>)
|
252
252
|
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">msg</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">verbose</span>
|
253
253
|
<span class="ruby-keyword">end</span></pre>
|
@@ -280,7 +280,7 @@
|
|
280
280
|
|
281
281
|
|
282
282
|
<div class="method-source-code" id="execute-source">
|
283
|
-
<pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line
|
283
|
+
<pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 30</span>
|
284
284
|
<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> = [])
|
285
285
|
<span class="ruby-identifier">exe</span> = <span class="ruby-identifier">new</span>(<span class="ruby-identifier">options</span>)
|
286
286
|
|
@@ -322,16 +322,16 @@
|
|
322
322
|
|
323
323
|
|
324
324
|
<div class="method-source-code" id="new-source">
|
325
|
-
<pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line
|
325
|
+
<pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 63</span>
|
326
326
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">options</span> = [], <span class="ruby-identifier">load_config</span> = <span class="ruby-keyword">true</span>)
|
327
327
|
<span class="ruby-ivar">@config</span> = <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">config</span>
|
328
328
|
<span class="ruby-ivar">@preference_file_loaded</span> = <span class="ruby-keyword">false</span>
|
329
329
|
<span class="ruby-ivar">@options</span> = <span class="ruby-identifier">options</span>
|
330
330
|
<span class="ruby-identifier">load_preferences</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">load_config</span>
|
331
|
-
<span class="ruby-identifier">
|
331
|
+
<span class="ruby-identifier">load_runtime_preferences</span>(<span class="ruby-identifier">options</span>)
|
332
332
|
<span class="ruby-ivar">@file</span> = <span class="ruby-constant">StandupMD</span><span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">find_by_date</span>(<span class="ruby-ivar">@config</span>.<span class="ruby-identifier">date</span>)
|
333
333
|
<span class="ruby-ivar">@file</span>.<span class="ruby-identifier">load</span>
|
334
|
-
<span class="ruby-ivar">@entry</span> = <span class="ruby-identifier">
|
334
|
+
<span class="ruby-ivar">@entry</span> = <span class="ruby-identifier">new_entry</span>(<span class="ruby-ivar">@file</span>)
|
335
335
|
<span class="ruby-keyword">end</span></pre>
|
336
336
|
</div>
|
337
337
|
|
@@ -372,7 +372,7 @@
|
|
372
372
|
|
373
373
|
|
374
374
|
<div class="method-source-code" id="echo-source">
|
375
|
-
<pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line
|
375
|
+
<pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 117</span>
|
376
376
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">echo</span>(<span class="ruby-identifier">msg</span>)
|
377
377
|
<span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">echo</span>(<span class="ruby-identifier">msg</span>)
|
378
378
|
<span class="ruby-keyword">end</span></pre>
|
@@ -407,7 +407,7 @@
|
|
407
407
|
|
408
408
|
|
409
409
|
<div class="method-source-code" id="edit-source">
|
410
|
-
<pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line
|
410
|
+
<pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 99</span>
|
411
411
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">edit</span>
|
412
412
|
<span class="ruby-identifier">echo</span> <span class="ruby-node">"Opening file in #{@config.editor}"</span>
|
413
413
|
<span class="ruby-identifier">exec</span>(<span class="ruby-node">"#{@config.editor} #{file.name}"</span>)
|
@@ -443,7 +443,7 @@
|
|
443
443
|
|
444
444
|
|
445
445
|
<div class="method-source-code" id="load_preferences-source">
|
446
|
-
<pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line
|
446
|
+
<pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 78</span>
|
447
447
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">load_preferences</span>
|
448
448
|
<span class="ruby-keyword">if</span> <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">exist?</span>(<span class="ruby-ivar">@config</span>.<span class="ruby-identifier">preference_file</span>)
|
449
449
|
<span class="ruby-operator">::</span><span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">load_config_file</span>(<span class="ruby-ivar">@config</span>.<span class="ruby-identifier">preference_file</span>)
|
@@ -483,7 +483,7 @@
|
|
483
483
|
|
484
484
|
|
485
485
|
<div class="method-source-code" id="preference_file_loaded-3F-source">
|
486
|
-
<pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line
|
486
|
+
<pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 91</span>
|
487
487
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">preference_file_loaded?</span>
|
488
488
|
<span class="ruby-ivar">@preference_file_loaded</span>
|
489
489
|
<span class="ruby-keyword">end</span></pre>
|
@@ -518,7 +518,7 @@
|
|
518
518
|
|
519
519
|
|
520
520
|
<div class="method-source-code" id="write_file-source">
|
521
|
-
<pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line
|
521
|
+
<pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 108</span>
|
522
522
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">write_file</span>
|
523
523
|
<span class="ruby-identifier">echo</span> <span class="ruby-node">"Writing file #{file.name}"</span>
|
524
524
|
<span class="ruby-identifier">file</span>.<span class="ruby-identifier">write</span>
|
@@ -127,18 +127,19 @@
|
|
127
127
|
|
128
128
|
|
129
129
|
<div class="method-source-code" id="print-source">
|
130
|
-
<pre><span class="ruby-comment"># File lib/standup_md/cli/helpers.rb, line
|
130
|
+
<pre><span class="ruby-comment"># File lib/standup_md/cli/helpers.rb, line 14</span>
|
131
131
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">print</span>(<span class="ruby-identifier">entry</span>)
|
132
132
|
<span class="ruby-keyword">if</span> <span class="ruby-identifier">entry</span>.<span class="ruby-identifier">nil?</span>
|
133
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-node">"No record found for #{
|
133
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"No record found for #{config.cli.date}"</span>
|
134
134
|
<span class="ruby-keyword">return</span>
|
135
135
|
<span class="ruby-keyword">end</span>
|
136
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-
|
137
|
-
<span class="ruby-
|
138
|
-
<span class="ruby-identifier">tasks</span> = <span class="ruby-identifier">entry</span>.<span class="ruby-identifier">
|
136
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">header</span>(<span class="ruby-identifier">entry</span>)
|
137
|
+
<span class="ruby-identifier">config</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">sub_header_order</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">header_type</span><span class="ruby-operator">|</span>
|
138
|
+
<span class="ruby-identifier">tasks</span> = <span class="ruby-identifier">entry</span>.<span class="ruby-identifier">public_send</span>(<span class="ruby-identifier">header_type</span>)
|
139
139
|
<span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">tasks</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">empty?</span>
|
140
|
-
|
141
|
-
<span class="ruby-identifier">
|
140
|
+
|
141
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">sub_header</span>(<span class="ruby-identifier">header_type</span>)
|
142
|
+
<span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">task</span><span class="ruby-operator">|</span> <span class="ruby-identifier">puts</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">bullet_character</span> <span class="ruby-operator">+</span> <span class="ruby-string">' '</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">task</span> }
|
142
143
|
<span class="ruby-keyword">end</span>
|
143
144
|
<span class="ruby-identifier">puts</span>
|
144
145
|
<span class="ruby-keyword">end</span></pre>
|
@@ -77,7 +77,7 @@
|
|
77
77
|
|
78
78
|
<li ><a href="#method-c-new">::new</a>
|
79
79
|
|
80
|
-
<li ><a href="#method-i-
|
80
|
+
<li ><a href="#method-i-reset">#reset</a>
|
81
81
|
|
82
82
|
</ul>
|
83
83
|
</div>
|
@@ -103,6 +103,22 @@
|
|
103
103
|
|
104
104
|
|
105
105
|
|
106
|
+
<section class="constants-list">
|
107
|
+
<header>
|
108
|
+
<h3>Constants</h3>
|
109
|
+
</header>
|
110
|
+
<dl>
|
111
|
+
|
112
|
+
<dt id="DEFAULTS">DEFAULTS
|
113
|
+
|
114
|
+
<dd><p>The default options.</p>
|
115
|
+
|
116
|
+
<p>@return [Hash]</p>
|
117
|
+
|
118
|
+
|
119
|
+
</dl>
|
120
|
+
</section>
|
121
|
+
|
106
122
|
|
107
123
|
|
108
124
|
<section class="attribute-method-details" class="method-section">
|
@@ -136,7 +152,7 @@
|
|
136
152
|
|
137
153
|
<div class="method-description">
|
138
154
|
|
139
|
-
<p>The date to use to find the
|
155
|
+
<p>The date to use to find the entry.</p>
|
140
156
|
|
141
157
|
<p>@param [Date] date</p>
|
142
158
|
|
@@ -204,7 +220,7 @@
|
|
204
220
|
|
205
221
|
<div class="method-description">
|
206
222
|
|
207
|
-
<p>Should the cli print the entry?</p>
|
223
|
+
<p>Should the cli print the entry to the command line?</p>
|
208
224
|
|
209
225
|
<p>@param [Boolean] print</p>
|
210
226
|
|
@@ -238,7 +254,7 @@
|
|
238
254
|
|
239
255
|
<div class="method-description">
|
240
256
|
|
241
|
-
<p>Should the cli write the file?</p>
|
257
|
+
<p>Should the cli automatically write the new entry to the file?</p>
|
242
258
|
|
243
259
|
<p>@param [Boolean] write</p>
|
244
260
|
|
@@ -276,9 +292,9 @@
|
|
276
292
|
|
277
293
|
|
278
294
|
<div class="method-source-code" id="new-source">
|
279
|
-
<pre><span class="ruby-comment"># File lib/standup_md/config/cli.rb, line
|
295
|
+
<pre><span class="ruby-comment"># File lib/standup_md/config/cli.rb, line 94</span>
|
280
296
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>
|
281
|
-
<span class="ruby-identifier">
|
297
|
+
<span class="ruby-identifier">reset</span>
|
282
298
|
<span class="ruby-keyword">end</span></pre>
|
283
299
|
</div>
|
284
300
|
|
@@ -298,10 +314,10 @@
|
|
298
314
|
</header>
|
299
315
|
|
300
316
|
|
301
|
-
<div id="method-i-
|
317
|
+
<div id="method-i-reset" class="method-detail ">
|
302
318
|
|
303
319
|
<div class="method-heading">
|
304
|
-
<span class="method-name">
|
320
|
+
<span class="method-name">reset</span><span
|
305
321
|
class="method-args">()</span>
|
306
322
|
|
307
323
|
<span class="method-click-advice">click to toggle source</span>
|
@@ -313,22 +329,15 @@
|
|
313
329
|
|
314
330
|
<p>Sets all config values back to their defaults.</p>
|
315
331
|
|
316
|
-
<p>@return [
|
332
|
+
<p>@return [Hash]</p>
|
317
333
|
|
318
334
|
|
319
335
|
|
320
336
|
|
321
|
-
<div class="method-source-code" id="
|
322
|
-
<pre><span class="ruby-comment"># File lib/standup_md/config/cli.rb, line
|
323
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">
|
324
|
-
<span class="ruby-
|
325
|
-
<span class="ruby-ivar">@editor</span> = <span class="ruby-identifier">set_editor</span>
|
326
|
-
<span class="ruby-ivar">@verbose</span> = <span class="ruby-keyword">false</span>
|
327
|
-
<span class="ruby-ivar">@edit</span> = <span class="ruby-keyword">true</span>
|
328
|
-
<span class="ruby-ivar">@write</span> = <span class="ruby-keyword">true</span>
|
329
|
-
<span class="ruby-ivar">@print</span> = <span class="ruby-keyword">false</span>
|
330
|
-
<span class="ruby-ivar">@auto_fill_previous</span> = <span class="ruby-keyword">true</span>
|
331
|
-
<span class="ruby-ivar">@preference_file</span> = <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">ENV</span>[<span class="ruby-string">'HOME'</span>], <span class="ruby-string">'.standuprc'</span>))
|
337
|
+
<div class="method-source-code" id="reset-source">
|
338
|
+
<pre><span class="ruby-comment"># File lib/standup_md/config/cli.rb, line 102</span>
|
339
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">reset</span>
|
340
|
+
<span class="ruby-constant">DEFAULTS</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">"@#{k}"</span>, <span class="ruby-identifier">v</span>) }
|
332
341
|
<span class="ruby-keyword">end</span></pre>
|
333
342
|
</div>
|
334
343
|
|
@@ -77,7 +77,7 @@
|
|
77
77
|
|
78
78
|
<li ><a href="#method-c-new">::new</a>
|
79
79
|
|
80
|
-
<li ><a href="#method-i-
|
80
|
+
<li ><a href="#method-i-reset">#reset</a>
|
81
81
|
|
82
82
|
</ul>
|
83
83
|
</div>
|
@@ -103,6 +103,22 @@
|
|
103
103
|
|
104
104
|
|
105
105
|
|
106
|
+
<section class="constants-list">
|
107
|
+
<header>
|
108
|
+
<h3>Constants</h3>
|
109
|
+
</header>
|
110
|
+
<dl>
|
111
|
+
|
112
|
+
<dt id="DEFAULTS">DEFAULTS
|
113
|
+
|
114
|
+
<dd><p>The default options.</p>
|
115
|
+
|
116
|
+
<p>@return [Hash]</p>
|
117
|
+
|
118
|
+
|
119
|
+
</dl>
|
120
|
+
</section>
|
121
|
+
|
106
122
|
|
107
123
|
|
108
124
|
<section class="attribute-method-details" class="method-section">
|
@@ -208,9 +224,9 @@
|
|
208
224
|
|
209
225
|
|
210
226
|
<div class="method-source-code" id="new-source">
|
211
|
-
<pre><span class="ruby-comment"># File lib/standup_md/config/entry.rb, line
|
227
|
+
<pre><span class="ruby-comment"># File lib/standup_md/config/entry.rb, line 53</span>
|
212
228
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>
|
213
|
-
<span class="ruby-identifier">
|
229
|
+
<span class="ruby-identifier">reset</span>
|
214
230
|
<span class="ruby-keyword">end</span></pre>
|
215
231
|
</div>
|
216
232
|
|
@@ -230,10 +246,10 @@
|
|
230
246
|
</header>
|
231
247
|
|
232
248
|
|
233
|
-
<div id="method-i-
|
249
|
+
<div id="method-i-reset" class="method-detail ">
|
234
250
|
|
235
251
|
<div class="method-heading">
|
236
|
-
<span class="method-name">
|
252
|
+
<span class="method-name">reset</span><span
|
237
253
|
class="method-args">()</span>
|
238
254
|
|
239
255
|
<span class="method-click-advice">click to toggle source</span>
|
@@ -245,19 +261,15 @@
|
|
245
261
|
|
246
262
|
<p>Sets all config values back to their defaults.</p>
|
247
263
|
|
248
|
-
<p>@return [
|
264
|
+
<p>@return [Hash]</p>
|
249
265
|
|
250
266
|
|
251
267
|
|
252
268
|
|
253
|
-
<div class="method-source-code" id="
|
254
|
-
<pre><span class="ruby-comment"># File lib/standup_md/config/entry.rb, line
|
255
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">
|
256
|
-
<span class="ruby-
|
257
|
-
<span class="ruby-ivar">@previous</span> = []
|
258
|
-
<span class="ruby-ivar">@impediments</span> = [<span class="ruby-string">'None'</span>]
|
259
|
-
<span class="ruby-ivar">@notes</span> = []
|
260
|
-
<span class="ruby-keyword">true</span>
|
269
|
+
<div class="method-source-code" id="reset-source">
|
270
|
+
<pre><span class="ruby-comment"># File lib/standup_md/config/entry.rb, line 61</span>
|
271
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">reset</span>
|
272
|
+
<span class="ruby-constant">DEFAULTS</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">"@#{k}"</span>, <span class="ruby-identifier">v</span>) }
|
261
273
|
<span class="ruby-keyword">end</span></pre>
|
262
274
|
</div>
|
263
275
|
|
@@ -77,7 +77,7 @@
|
|
77
77
|
|
78
78
|
<li ><a href="#method-i-initalize">#initalize</a>
|
79
79
|
|
80
|
-
<li ><a href="#method-i-
|
80
|
+
<li ><a href="#method-i-reset">#reset</a>
|
81
81
|
|
82
82
|
</ul>
|
83
83
|
</div>
|
@@ -103,6 +103,22 @@
|
|
103
103
|
|
104
104
|
|
105
105
|
|
106
|
+
<section class="constants-list">
|
107
|
+
<header>
|
108
|
+
<h3>Constants</h3>
|
109
|
+
</header>
|
110
|
+
<dl>
|
111
|
+
|
112
|
+
<dt id="DEFAULTS">DEFAULTS
|
113
|
+
|
114
|
+
<dd><p>The default options.</p>
|
115
|
+
|
116
|
+
<p>@return [Hash]</p>
|
117
|
+
|
118
|
+
|
119
|
+
</dl>
|
120
|
+
</section>
|
121
|
+
|
106
122
|
|
107
123
|
|
108
124
|
|
@@ -132,9 +148,9 @@
|
|
132
148
|
|
133
149
|
|
134
150
|
<div class="method-source-code" id="initalize-source">
|
135
|
-
<pre><span class="ruby-comment"># File lib/standup_md/config/entry_list.rb, line
|
151
|
+
<pre><span class="ruby-comment"># File lib/standup_md/config/entry_list.rb, line 18</span>
|
136
152
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initalize</span>
|
137
|
-
<span class="ruby-identifier">
|
153
|
+
<span class="ruby-identifier">reset</span>
|
138
154
|
<span class="ruby-keyword">end</span></pre>
|
139
155
|
</div>
|
140
156
|
|
@@ -146,10 +162,10 @@
|
|
146
162
|
</div>
|
147
163
|
|
148
164
|
|
149
|
-
<div id="method-i-
|
165
|
+
<div id="method-i-reset" class="method-detail ">
|
150
166
|
|
151
167
|
<div class="method-heading">
|
152
|
-
<span class="method-name">
|
168
|
+
<span class="method-name">reset</span><span
|
153
169
|
class="method-args">()</span>
|
154
170
|
|
155
171
|
<span class="method-click-advice">click to toggle source</span>
|
@@ -161,16 +177,15 @@
|
|
161
177
|
|
162
178
|
<p>Sets all config values back to their defaults.</p>
|
163
179
|
|
164
|
-
<p>@return [
|
180
|
+
<p>@return [Hash]</p>
|
165
181
|
|
166
182
|
|
167
183
|
|
168
184
|
|
169
|
-
<div class="method-source-code" id="
|
170
|
-
<pre><span class="ruby-comment"># File lib/standup_md/config/entry_list.rb, line
|
171
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">
|
172
|
-
<span class="ruby-
|
173
|
-
<span class="ruby-keyword">true</span>
|
185
|
+
<div class="method-source-code" id="reset-source">
|
186
|
+
<pre><span class="ruby-comment"># File lib/standup_md/config/entry_list.rb, line 26</span>
|
187
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">reset</span>
|
188
|
+
<span class="ruby-constant">DEFAULTS</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">"@#{k}"</span>, <span class="ruby-identifier">v</span>) }
|
174
189
|
<span class="ruby-keyword">end</span></pre>
|
175
190
|
</div>
|
176
191
|
|
@@ -83,7 +83,7 @@
|
|
83
83
|
|
84
84
|
<li ><a href="#method-i-header_depth-3D">#header_depth=</a>
|
85
85
|
|
86
|
-
<li ><a href="#method-i-
|
86
|
+
<li ><a href="#method-i-reset">#reset</a>
|
87
87
|
|
88
88
|
<li ><a href="#method-i-sub_header_depth-3D">#sub_header_depth=</a>
|
89
89
|
|
@@ -111,6 +111,22 @@
|
|
111
111
|
|
112
112
|
|
113
113
|
|
114
|
+
<section class="constants-list">
|
115
|
+
<header>
|
116
|
+
<h3>Constants</h3>
|
117
|
+
</header>
|
118
|
+
<dl>
|
119
|
+
|
120
|
+
<dt id="DEFAULTS">DEFAULTS
|
121
|
+
|
122
|
+
<dd><p>The default options.</p>
|
123
|
+
|
124
|
+
<p>@return [Hash]</p>
|
125
|
+
|
126
|
+
|
127
|
+
</dl>
|
128
|
+
</section>
|
129
|
+
|
114
130
|
|
115
131
|
|
116
132
|
<section class="attribute-method-details" class="method-section">
|
@@ -364,9 +380,9 @@
|
|
364
380
|
|
365
381
|
|
366
382
|
<div class="method-source-code" id="new-source">
|
367
|
-
<pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line
|
383
|
+
<pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line 140</span>
|
368
384
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>
|
369
|
-
<span class="ruby-identifier">
|
385
|
+
<span class="ruby-identifier">reset</span>
|
370
386
|
<span class="ruby-keyword">end</span></pre>
|
371
387
|
</div>
|
372
388
|
|
@@ -409,7 +425,7 @@
|
|
409
425
|
|
410
426
|
|
411
427
|
<div class="method-source-code" id="bullet_character-3D-source">
|
412
|
-
<pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line
|
428
|
+
<pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line 189</span>
|
413
429
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">bullet_character=</span>(<span class="ruby-identifier">char</span>)
|
414
430
|
<span class="ruby-identifier">raise</span> <span class="ruby-string">'Must be "-" or "*"'</span> <span class="ruby-keyword">unless</span> <span class="ruby-node">%w[- *]</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">char</span>)
|
415
431
|
<span class="ruby-ivar">@bullet_character</span> = <span class="ruby-identifier">char</span>
|
@@ -447,7 +463,7 @@
|
|
447
463
|
|
448
464
|
|
449
465
|
<div class="method-source-code" id="directory-3D-source">
|
450
|
-
<pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line
|
466
|
+
<pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line 202</span>
|
451
467
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">directory=</span>(<span class="ruby-identifier">directory</span>)
|
452
468
|
<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>)
|
453
469
|
<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>)
|
@@ -486,7 +502,7 @@
|
|
486
502
|
|
487
503
|
|
488
504
|
<div class="method-source-code" id="header_depth-3D-source">
|
489
|
-
<pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line
|
505
|
+
<pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line 158</span>
|
490
506
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">header_depth=</span>(<span class="ruby-identifier">depth</span>)
|
491
507
|
<span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">depth</span>.<span class="ruby-identifier">between?</span>(<span class="ruby-value">1</span>, <span class="ruby-value">5</span>)
|
492
508
|
<span class="ruby-identifier">raise</span> <span class="ruby-string">'Header depth out of bounds (1..5)'</span>
|
@@ -505,10 +521,10 @@
|
|
505
521
|
</div>
|
506
522
|
|
507
523
|
|
508
|
-
<div id="method-i-
|
524
|
+
<div id="method-i-reset" class="method-detail ">
|
509
525
|
|
510
526
|
<div class="method-heading">
|
511
|
-
<span class="method-name">
|
527
|
+
<span class="method-name">reset</span><span
|
512
528
|
class="method-args">()</span>
|
513
529
|
|
514
530
|
<span class="method-click-advice">click to toggle source</span>
|
@@ -520,27 +536,15 @@
|
|
520
536
|
|
521
537
|
<p>Sets all config values back to their defaults.</p>
|
522
538
|
|
523
|
-
<p>@return [
|
539
|
+
<p>@return [Hash]</p>
|
524
540
|
|
525
541
|
|
526
542
|
|
527
543
|
|
528
|
-
<div class="method-source-code" id="
|
529
|
-
<pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line
|
530
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">
|
531
|
-
<span class="ruby-
|
532
|
-
<span class="ruby-ivar">@header_depth</span> = <span class="ruby-value">1</span>
|
533
|
-
<span class="ruby-ivar">@sub_header_depth</span> = <span class="ruby-value">2</span>
|
534
|
-
<span class="ruby-ivar">@current_header</span> = <span class="ruby-string">'Current'</span>
|
535
|
-
<span class="ruby-ivar">@previous_header</span> = <span class="ruby-string">'Previous'</span>
|
536
|
-
<span class="ruby-ivar">@impediments_header</span> = <span class="ruby-string">'Impediments'</span>
|
537
|
-
<span class="ruby-ivar">@notes_header</span> = <span class="ruby-string">'Notes'</span>
|
538
|
-
<span class="ruby-ivar">@sub_header_order</span> = <span class="ruby-node">%w[previous current impediments notes]</span>
|
539
|
-
<span class="ruby-ivar">@directory</span> = <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">ENV</span>[<span class="ruby-string">'HOME'</span>], <span class="ruby-string">'.cache'</span>, <span class="ruby-string">'standup_md'</span>)
|
540
|
-
<span class="ruby-ivar">@bullet_character</span> = <span class="ruby-string">'-'</span>
|
541
|
-
<span class="ruby-ivar">@name_format</span> = <span class="ruby-string">'%Y_%m.md'</span>
|
542
|
-
<span class="ruby-ivar">@create</span> = <span class="ruby-keyword">true</span>
|
543
|
-
<span class="ruby-keyword">true</span>
|
544
|
+
<div class="method-source-code" id="reset-source">
|
545
|
+
<pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line 148</span>
|
546
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">reset</span>
|
547
|
+
<span class="ruby-constant">DEFAULTS</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">"@#{k}"</span>, <span class="ruby-identifier">v</span>) }
|
544
548
|
<span class="ruby-keyword">end</span></pre>
|
545
549
|
</div>
|
546
550
|
|
@@ -575,7 +579,7 @@
|
|
575
579
|
|
576
580
|
|
577
581
|
<div class="method-source-code" id="sub_header_depth-3D-source">
|
578
|
-
<pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line
|
582
|
+
<pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line 174</span>
|
579
583
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">sub_header_depth=</span>(<span class="ruby-identifier">depth</span>)
|
580
584
|
<span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">depth</span>.<span class="ruby-identifier">between?</span>(<span class="ruby-value">2</span>, <span class="ruby-value">6</span>)
|
581
585
|
<span class="ruby-identifier">raise</span> <span class="ruby-string">'Sub-header depth out of bounds (2..6)'</span>
|