standup_md 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 57bd78bfdaa77fe7ba0aba95d28beaa44515adfca40fb5668aea94a1164fc0ce
4
- data.tar.gz: f33a68f119e7661b780be8aa19f202a0e83ed0d9a36bddfae294d697b5aa4901
3
+ metadata.gz: 49f9ad4ada41c9372b1d3ffebb4f44fff6cb96249224c9b62c5063e1836a4c8f
4
+ data.tar.gz: da5aa3a5e2cfc882372ef5899694941d32702049323d615acc36644733dabe12
5
5
  SHA512:
6
- metadata.gz: '08dc58ef8c87d92e13261032c8836b9555244ad22f9243e7b91732aa20a5a6c1ab6b032739bde51a92c145318d08c2f2858c16e31cfc02aaded2017988a66ba6'
7
- data.tar.gz: 10f91dc30a6afcbc0b68ae1e7ea253a8292102b63de47e66877d889b640953a2fb91f9c8e249443762b6c93bc300e39b522d6ad6c9739b6d21464a87e33d8104
6
+ metadata.gz: 35587b73b6ec5d9d2388ce4d4b95185b982486414f3c5a5874fd7c73ee84dfcab6ba4b0109fcac33bf89576517a48f3a9730e85238ee53557f3b0047e6548c19
7
+ data.tar.gz: d772849128665813f3326fa41a684607e1231cd7065828f933dc5b50e51b0f909ef24862020d08af39f2bb2cd07e749c02c0347c00d923fb9ee38f14c69808c3
data/README.md CHANGED
@@ -132,7 +132,7 @@ result to the command line, you could use the following.
132
132
 
133
133
  #### Add entry to file without opening it
134
134
  ```sh
135
- standup --no-edit --current "Work on this thing","And another thing" -p
135
+ standup --no-edit --current "Work on this thing","And another thing"
136
136
  ```
137
137
 
138
138
  #### Find an entry by date and print it.
@@ -232,7 +232,7 @@ rake install
232
232
 
233
233
  <h4 id="label-Add+entry+to+file+without+opening+it">Add entry to file without opening it<span><a href="#label-Add+entry+to+file+without+opening+it">&para;</a> <a href="#top">&uarr;</a></span></h4>
234
234
 
235
- <pre>standup --no-edit --current &quot;Work on this thing&quot;,&quot;And another thing&quot; -p</pre>
235
+ <pre>standup --no-edit --current &quot;Work on this thing&quot;,&quot;And another thing&quot;</pre>
236
236
 
237
237
  <h4 id="label-Find+an+entry+by+date+and+print+it.">Find an entry by date and print it.<span><a href="#label-Find+an+entry+by+date+and+print+it.">&para;</a> <a href="#top">&uarr;</a></span></h4>
238
238
 
@@ -91,7 +91,7 @@
91
91
 
92
92
  <section class="description">
93
93
 
94
- <p>The class for handing reading/writing of entries.</p>
94
+ <p>The main module for the gem. Provides access to configuration classes.</p>
95
95
 
96
96
  </section>
97
97
 
@@ -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 file.</p>
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,7 +292,7 @@
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 78</span>
295
+ <pre><span class="ruby-comment"># File lib/standup_md/config/cli.rb, line 95</span>
280
296
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>
281
297
  <span class="ruby-identifier">reset</span>
282
298
  <span class="ruby-keyword">end</span></pre>
@@ -313,22 +329,15 @@
313
329
 
314
330
  <p>Sets all config values back to their defaults.</p>
315
331
 
316
- <p>@return [Boolean] true if successful</p>
332
+ <p>@return [Hash]</p>
317
333
 
318
334
 
319
335
 
320
336
 
321
337
  <div class="method-source-code" id="reset-source">
322
- <pre><span class="ruby-comment"># File lib/standup_md/config/cli.rb, line 86</span>
338
+ <pre><span class="ruby-comment"># File lib/standup_md/config/cli.rb, line 103</span>
323
339
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">reset</span>
324
- <span class="ruby-ivar">@date</span> = <span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>
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">&#39;HOME&#39;</span>], <span class="ruby-string">&#39;.standuprc&#39;</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">&quot;@#{k}&quot;</span>, <span class="ruby-identifier">v</span>) }
332
341
  <span class="ruby-keyword">end</span></pre>
333
342
  </div>
334
343
 
@@ -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,7 +224,7 @@
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 44</span>
227
+ <pre><span class="ruby-comment"># File lib/standup_md/config/entry.rb, line 55</span>
212
228
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>
213
229
  <span class="ruby-identifier">reset</span>
214
230
  <span class="ruby-keyword">end</span></pre>
@@ -245,19 +261,15 @@
245
261
 
246
262
  <p>Sets all config values back to their defaults.</p>
247
263
 
248
- <p>@return [Boolean] true if successful</p>
264
+ <p>@return [Hash]</p>
249
265
 
250
266
 
251
267
 
252
268
 
253
269
  <div class="method-source-code" id="reset-source">
254
- <pre><span class="ruby-comment"># File lib/standup_md/config/entry.rb, line 52</span>
270
+ <pre><span class="ruby-comment"># File lib/standup_md/config/entry.rb, line 63</span>
255
271
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">reset</span>
256
- <span class="ruby-ivar">@current</span> = [<span class="ruby-string">&quot;&lt;!-- ADD TODAY&#39;S WORK HERE --&gt;&quot;</span>]
257
- <span class="ruby-ivar">@previous</span> = []
258
- <span class="ruby-ivar">@impediments</span> = [<span class="ruby-string">&#39;None&#39;</span>]
259
- <span class="ruby-ivar">@notes</span> = []
260
- <span class="ruby-keyword">true</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">&quot;@#{k}&quot;</span>, <span class="ruby-identifier">v</span>) }
261
273
  <span class="ruby-keyword">end</span></pre>
262
274
  </div>
263
275
 
@@ -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,7 +148,7 @@
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 12</span>
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
153
  <span class="ruby-identifier">reset</span>
138
154
  <span class="ruby-keyword">end</span></pre>
@@ -161,16 +177,15 @@
161
177
 
162
178
  <p>Sets all config values back to their defaults.</p>
163
179
 
164
- <p>@return [Boolean] true if successful</p>
180
+ <p>@return [Hash]</p>
165
181
 
166
182
 
167
183
 
168
184
 
169
185
  <div class="method-source-code" id="reset-source">
170
- <pre><span class="ruby-comment"># File lib/standup_md/config/entry_list.rb, line 20</span>
186
+ <pre><span class="ruby-comment"># File lib/standup_md/config/entry_list.rb, line 26</span>
171
187
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">reset</span>
172
- <span class="ruby-comment"># TODO add order ascending or decending.</span>
173
- <span class="ruby-keyword">true</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">&quot;@#{k}&quot;</span>, <span class="ruby-identifier">v</span>) }
174
189
  <span class="ruby-keyword">end</span></pre>
175
190
  </div>
176
191
 
@@ -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,7 +380,7 @@
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 118</span>
383
+ <pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line 138</span>
368
384
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>
369
385
  <span class="ruby-identifier">reset</span>
370
386
  <span class="ruby-keyword">end</span></pre>
@@ -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 179</span>
428
+ <pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line 187</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">&#39;Must be &quot;-&quot; or &quot;*&quot;&#39;</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 192</span>
466
+ <pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line 200</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 148</span>
505
+ <pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line 156</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">&#39;Header depth out of bounds (1..5)&#39;</span>
@@ -520,27 +536,15 @@
520
536
 
521
537
  <p>Sets all config values back to their defaults.</p>
522
538
 
523
- <p>@return [Boolean] true if successful</p>
539
+ <p>@return [Hash]</p>
524
540
 
525
541
 
526
542
 
527
543
 
528
544
  <div class="method-source-code" id="reset-source">
529
- <pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line 126</span>
545
+ <pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line 146</span>
530
546
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">reset</span>
531
- <span class="ruby-ivar">@header_date_format</span> = <span class="ruby-string">&#39;%Y-%m-%d&#39;</span>
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">&#39;Current&#39;</span>
535
- <span class="ruby-ivar">@previous_header</span> = <span class="ruby-string">&#39;Previous&#39;</span>
536
- <span class="ruby-ivar">@impediments_header</span> = <span class="ruby-string">&#39;Impediments&#39;</span>
537
- <span class="ruby-ivar">@notes_header</span> = <span class="ruby-string">&#39;Notes&#39;</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">&#39;HOME&#39;</span>], <span class="ruby-string">&#39;.cache&#39;</span>, <span class="ruby-string">&#39;standup_md&#39;</span>)
540
- <span class="ruby-ivar">@bullet_character</span> = <span class="ruby-string">&#39;-&#39;</span>
541
- <span class="ruby-ivar">@name_format</span> = <span class="ruby-string">&#39;%Y_%m.md&#39;</span>
542
- <span class="ruby-ivar">@create</span> = <span class="ruby-keyword">true</span>
543
- <span class="ruby-keyword">true</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">&quot;@#{k}&quot;</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 164</span>
582
+ <pre><span class="ruby-comment"># File lib/standup_md/config/file.rb, line 172</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">&#39;Sub-header depth out of bounds (2..6)&#39;</span>
@@ -330,7 +330,7 @@
330
330
 
331
331
 
332
332
  <div class="method-source-code" id="empty-3F-source">
333
- <pre><span class="ruby-comment"># File lib/standup_md/entry_list.rb, line 70</span>
333
+ <pre><span class="ruby-comment"># File lib/standup_md/entry_list.rb, line 162</span>
334
334
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">empty?</span>
335
335
  <span class="ruby-ivar">@entries</span>.<span class="ruby-identifier">empty?</span>
336
336
  <span class="ruby-keyword">end</span></pre>
@@ -369,7 +369,7 @@
369
369
 
370
370
 
371
371
  <div class="method-source-code" id="filter-source">
372
- <pre><span class="ruby-comment"># File lib/standup_md/entry_list.rb, line 108</span>
372
+ <pre><span class="ruby-comment"># File lib/standup_md/entry_list.rb, line 92</span>
373
373
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">filter</span>(<span class="ruby-identifier">start_date</span>, <span class="ruby-identifier">end_date</span>)
374
374
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span>(
375
375
  <span class="ruby-operator">*</span><span class="ruby-ivar">@entries</span>.<span class="ruby-identifier">select</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">date</span>.<span class="ruby-identifier">between?</span>(<span class="ruby-identifier">start_date</span>, <span class="ruby-identifier">end_date</span>) }
@@ -410,7 +410,7 @@
410
410
 
411
411
 
412
412
  <div class="method-source-code" id="filter-21-source">
413
- <pre><span class="ruby-comment"># File lib/standup_md/entry_list.rb, line 122</span>
413
+ <pre><span class="ruby-comment"># File lib/standup_md/entry_list.rb, line 106</span>
414
414
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">filter!</span>(<span class="ruby-identifier">start_date</span>, <span class="ruby-identifier">end_date</span>)
415
415
  <span class="ruby-ivar">@entries</span> = <span class="ruby-identifier">filter</span>(<span class="ruby-identifier">start_date</span>, <span class="ruby-identifier">end_date</span>)
416
416
  <span class="ruby-keyword">self</span>
@@ -479,7 +479,7 @@
479
479
 
480
480
 
481
481
  <div class="method-source-code" id="first-source">
482
- <pre><span class="ruby-comment"># File lib/standup_md/entry_list.rb, line 132</span>
482
+ <pre><span class="ruby-comment"># File lib/standup_md/entry_list.rb, line 137</span>
483
483
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">first</span>
484
484
  <span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">first</span>
485
485
  <span class="ruby-keyword">end</span></pre>
@@ -514,7 +514,7 @@
514
514
 
515
515
 
516
516
  <div class="method-source-code" id="last-source">
517
- <pre><span class="ruby-comment"># File lib/standup_md/entry_list.rb, line 141</span>
517
+ <pre><span class="ruby-comment"># File lib/standup_md/entry_list.rb, line 146</span>
518
518
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">last</span>
519
519
  <span class="ruby-identifier">to_a</span>.<span class="ruby-identifier">last</span>
520
520
  <span class="ruby-keyword">end</span></pre>
@@ -549,7 +549,7 @@
549
549
 
550
550
 
551
551
  <div class="method-source-code" id="size-source">
552
- <pre><span class="ruby-comment"># File lib/standup_md/entry_list.rb, line 62</span>
552
+ <pre><span class="ruby-comment"># File lib/standup_md/entry_list.rb, line 154</span>
553
553
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">size</span>
554
554
  <span class="ruby-ivar">@entries</span>.<span class="ruby-identifier">size</span>
555
555
  <span class="ruby-keyword">end</span></pre>
@@ -584,7 +584,7 @@
584
584
 
585
585
 
586
586
  <div class="method-source-code" id="sort-source">
587
- <pre><span class="ruby-comment"># File lib/standup_md/entry_list.rb, line 78</span>
587
+ <pre><span class="ruby-comment"># File lib/standup_md/entry_list.rb, line 62</span>
588
588
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">sort</span>
589
589
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-operator">*</span><span class="ruby-ivar">@entries</span>.<span class="ruby-identifier">sort</span>)
590
590
  <span class="ruby-keyword">end</span></pre>
@@ -619,7 +619,7 @@
619
619
 
620
620
 
621
621
  <div class="method-source-code" id="sort-21-source">
622
- <pre><span class="ruby-comment"># File lib/standup_md/entry_list.rb, line 86</span>
622
+ <pre><span class="ruby-comment"># File lib/standup_md/entry_list.rb, line 70</span>
623
623
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">sort!</span>
624
624
  <span class="ruby-ivar">@entries</span> = <span class="ruby-ivar">@entries</span>.<span class="ruby-identifier">sort</span>
625
625
  <span class="ruby-keyword">self</span>
@@ -655,7 +655,7 @@
655
655
 
656
656
 
657
657
  <div class="method-source-code" id="sort_reverse-source">
658
- <pre><span class="ruby-comment"># File lib/standup_md/entry_list.rb, line 95</span>
658
+ <pre><span class="ruby-comment"># File lib/standup_md/entry_list.rb, line 79</span>
659
659
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">sort_reverse</span>
660
660
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-operator">*</span><span class="ruby-ivar">@entries</span>.<span class="ruby-identifier">sort</span>.<span class="ruby-identifier">reverse</span>)
661
661
  <span class="ruby-keyword">end</span></pre>
@@ -690,7 +690,7 @@
690
690
 
691
691
 
692
692
  <div class="method-source-code" id="to_h-source">
693
- <pre><span class="ruby-comment"># File lib/standup_md/entry_list.rb, line 149</span>
693
+ <pre><span class="ruby-comment"># File lib/standup_md/entry_list.rb, line 115</span>
694
694
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">to_h</span>
695
695
  <span class="ruby-constant">Hash</span>[<span class="ruby-ivar">@entries</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> [<span class="ruby-identifier">e</span>.<span class="ruby-identifier">date</span>, {
696
696
  <span class="ruby-string">&#39;current&#39;</span> <span class="ruby-operator">=&gt;</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">current</span>,
@@ -730,7 +730,7 @@
730
730
 
731
731
 
732
732
  <div class="method-source-code" id="to_json-source">
733
- <pre><span class="ruby-comment"># File lib/standup_md/entry_list.rb, line 162</span>
733
+ <pre><span class="ruby-comment"># File lib/standup_md/entry_list.rb, line 128</span>
734
734
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">to_json</span>
735
735
  <span class="ruby-identifier">to_h</span>.<span class="ruby-identifier">to_json</span>
736
736
  <span class="ruby-keyword">end</span></pre>
@@ -1,15 +1,15 @@
1
- Wed, 10 Jun 2020 22:58:32 -0500
2
- README.md Wed, 10 Jun 2020 22:49:25 -0500
3
- lib/standup_md.rb Wed, 10 Jun 2020 22:56:15 -0500
4
- lib/standup_md/cli.rb Wed, 10 Jun 2020 22:23:37 -0500
5
- lib/standup_md/cli/helpers.rb Wed, 10 Jun 2020 22:23:37 -0500
6
- lib/standup_md/config.rb Wed, 10 Jun 2020 22:23:37 -0500
7
- lib/standup_md/config/cli.rb Wed, 10 Jun 2020 22:57:56 -0500
8
- lib/standup_md/config/entry.rb Wed, 10 Jun 2020 22:58:08 -0500
9
- lib/standup_md/config/entry_list.rb Wed, 10 Jun 2020 22:58:03 -0500
10
- lib/standup_md/config/file.rb Wed, 10 Jun 2020 22:58:00 -0500
11
- lib/standup_md/entry.rb Wed, 10 Jun 2020 22:23:37 -0500
12
- lib/standup_md/entry_list.rb Wed, 10 Jun 2020 22:23:37 -0500
13
- lib/standup_md/file.rb Wed, 10 Jun 2020 22:42:40 -0500
14
- lib/standup_md/file/helpers.rb Wed, 10 Jun 2020 22:23:37 -0500
15
- lib/standup_md/version.rb Wed, 10 Jun 2020 22:54:17 -0500
1
+ Sun, 14 Jun 2020 22:02:40 -0500
2
+ README.md Sun, 14 Jun 2020 22:02:07 -0500
3
+ lib/standup_md.rb Sun, 14 Jun 2020 22:01:32 -0500
4
+ lib/standup_md/cli.rb Sun, 14 Jun 2020 22:01:32 -0500
5
+ lib/standup_md/cli/helpers.rb Sun, 14 Jun 2020 22:01:32 -0500
6
+ lib/standup_md/config.rb Sun, 14 Jun 2020 22:01:32 -0500
7
+ lib/standup_md/config/cli.rb Sun, 14 Jun 2020 22:01:32 -0500
8
+ lib/standup_md/config/entry.rb Sun, 14 Jun 2020 22:01:32 -0500
9
+ lib/standup_md/config/entry_list.rb Sun, 14 Jun 2020 22:01:32 -0500
10
+ lib/standup_md/config/file.rb Sun, 14 Jun 2020 22:01:32 -0500
11
+ lib/standup_md/entry.rb Sun, 14 Jun 2020 22:01:32 -0500
12
+ lib/standup_md/entry_list.rb Sun, 14 Jun 2020 22:01:32 -0500
13
+ lib/standup_md/file.rb Sun, 14 Jun 2020 22:01:32 -0500
14
+ lib/standup_md/file/helpers.rb Sun, 14 Jun 2020 22:01:32 -0500
15
+ lib/standup_md/version.rb Sun, 14 Jun 2020 22:01:32 -0500
@@ -234,7 +234,7 @@ rake install
234
234
 
235
235
  <h4 id="label-Add+entry+to+file+without+opening+it">Add entry to file without opening it<span><a href="#label-Add+entry+to+file+without+opening+it">&para;</a> <a href="#top">&uarr;</a></span></h4>
236
236
 
237
- <pre>standup --no-edit --current &quot;Work on this thing&quot;,&quot;And another thing&quot; -p</pre>
237
+ <pre>standup --no-edit --current &quot;Work on this thing&quot;,&quot;And another thing&quot;</pre>
238
238
 
239
239
  <h4 id="label-Find+an+entry+by+date+and+print+it.">Find an entry by date and print it.<span><a href="#label-Find+an+entry+by+date+and+print+it.">&para;</a> <a href="#top">&uarr;</a></span></h4>
240
240
 
@@ -1 +1 @@
1
- var search_data = {"index":{"searchIndex":["standupmd","cli","helpers","config","cli","entry","entrylist","file","entry","entrylist","file","<<()","<=>()","bullet_character=()","config()","config()","config()","config()","config()","config_file_loaded?()","configure()","create()","directory=()","each()","echo()","echo()","edit()","empty?()","execute()","exist?()","filter()","filter!()","find()","find()","find_by_date()","first()","header_depth=()","initalize()","last()","load()","load()","load_config_file()","load_preferences()","loaded?()","new()","new()","new()","new()","new()","new()","new()","new()","new?()","preference_file_loaded?()","print()","reset()","reset()","reset()","reset()","reset_config()","size()","sort()","sort!()","sort_reverse()","sub_header_depth=()","to_h()","to_h()","to_json()","to_json()","write()","write_file()","readme"],"longSearchIndex":["standupmd","standupmd::cli","standupmd::cli::helpers","standupmd::config","standupmd::config::cli","standupmd::config::entry","standupmd::config::entrylist","standupmd::config::file","standupmd::entry","standupmd::entrylist","standupmd::file","standupmd::entrylist#<<()","standupmd::entry#<=>()","standupmd::config::file#bullet_character=()","standupmd::config()","standupmd::cli::config()","standupmd::entry::config()","standupmd::entrylist::config()","standupmd::file::config()","standupmd::config_file_loaded?()","standupmd::configure()","standupmd::entry::create()","standupmd::config::file#directory=()","standupmd::entrylist#each()","standupmd::cli#echo()","standupmd::cli::echo()","standupmd::cli#edit()","standupmd::entrylist#empty?()","standupmd::cli::execute()","standupmd::file#exist?()","standupmd::entrylist#filter()","standupmd::entrylist#filter!()","standupmd::entrylist#find()","standupmd::file::find()","standupmd::file::find_by_date()","standupmd::entrylist#first()","standupmd::config::file#header_depth=()","standupmd::config::entrylist#initalize()","standupmd::entrylist#last()","standupmd::file::load()","standupmd::file#load()","standupmd::load_config_file()","standupmd::cli#load_preferences()","standupmd::file#loaded?()","standupmd::cli::new()","standupmd::config::new()","standupmd::config::cli::new()","standupmd::config::entry::new()","standupmd::config::file::new()","standupmd::entry::new()","standupmd::entrylist::new()","standupmd::file::new()","standupmd::file#new?()","standupmd::cli#preference_file_loaded?()","standupmd::cli::helpers#print()","standupmd::config::cli#reset()","standupmd::config::entry#reset()","standupmd::config::entrylist#reset()","standupmd::config::file#reset()","standupmd::reset_config()","standupmd::entrylist#size()","standupmd::entrylist#sort()","standupmd::entrylist#sort!()","standupmd::entrylist#sort_reverse()","standupmd::config::file#sub_header_depth=()","standupmd::entry#to_h()","standupmd::entrylist#to_h()","standupmd::entry#to_json()","standupmd::entrylist#to_json()","standupmd::file#write()","standupmd::cli#write_file()",""],"info":[["StandupMD","","StandupMD.html","","

The class for handing reading/writing of entries.\n"],["StandupMD::Cli","","StandupMD/Cli.html","","

Class for handing the command-line interface.\n"],["StandupMD::Cli::Helpers","","StandupMD/Cli/Helpers.html","","

Module responsible for reading and writing standup files.\n"],["StandupMD::Config","","StandupMD/Config.html","","

This class provides a connector from StandupMD to the configuration classes.\n"],["StandupMD::Config::Cli","","StandupMD/Config/Cli.html","","

The configuration class for StandupMD::Cli\n"],["StandupMD::Config::Entry","","StandupMD/Config/Entry.html","","

The configuration class for StandupMD::Entry\n"],["StandupMD::Config::EntryList","","StandupMD/Config/EntryList.html","","

The configuration class for StandupMD::EntryList\n"],["StandupMD::Config::File","","StandupMD/Config/File.html","","

The configuration class for StandupMD::File\n"],["StandupMD::Entry","","StandupMD/Entry.html","","

Class for handling single entries. Includes the comparable module, and compares by date.\n"],["StandupMD::EntryList","","StandupMD/EntryList.html","","

Enumerable list of entries.\n"],["StandupMD::File","","StandupMD/File.html","","

Class for handling reading and writing standup files.\n"],["<<","StandupMD::EntryList","StandupMD/EntryList.html#method-i-3C-3C","(entry)","

Appends entries to list.\n

@param [StandupMD::Entry] entry\n

@return [Array]\n"],["<=>","StandupMD::Entry","StandupMD/Entry.html#method-i-3C-3D-3E","(other)","

Sorting method for Comparable. Entries are compared by date.\n"],["bullet_character=","StandupMD::Config::File","StandupMD/Config/File.html#method-i-bullet_character-3D","(char)","

Setter for bullet_character. Must be * (asterisk) or - (dash).\n

@param [String] character\n

@return [String] …\n"],["config","StandupMD","StandupMD.html#method-c-config","()","

Method for accessing the configuration.\n

@return [StanupMD::Cli]\n"],["config","StandupMD::Cli","StandupMD/Cli.html#method-c-config","()","

Access to the class's configuration.\n

@return [StandupMD::Config::Cli]\n"],["config","StandupMD::Entry","StandupMD/Entry.html#method-c-config","()","

Access to the class's configuration.\n

@return [StandupMD::Config::Entry]\n"],["config","StandupMD::EntryList","StandupMD/EntryList.html#method-c-config","()","

Access to the class's configuration.\n

@return [StandupMD::Config::EntryList]\n"],["config","StandupMD::File","StandupMD/File.html#method-c-config","()","

Access to the class's configuration.\n

@return [StandupMD::Config::EntryList]\n"],["config_file_loaded?","StandupMD","StandupMD.html#method-c-config_file_loaded-3F","()","

Has a config file been loaded?\n

@return [Boolean]\n"],["configure","StandupMD","StandupMD.html#method-c-configure","()","

Allows for configuration via a block. Useful when making config files.\n

@example\n\n

StandupMD.configure { |s| ...
\n"],["create","StandupMD::Entry","StandupMD/Entry.html#method-c-create","()","

Creates a generic entry. Default values can be set via configuration. Yields the entry if a block is …\n"],["directory=","StandupMD::Config::File","StandupMD/Config/File.html#method-i-directory-3D","(directory)","

Setter for directory. Must be expanded in case the user uses `~` for home. If the directory doesn't …\n"],["each","StandupMD::EntryList","StandupMD/EntryList.html#method-i-each","(&block)","

Iterate over the list and yield each entry.\n"],["echo","StandupMD::Cli","StandupMD/Cli.html#method-i-echo","(msg)","

Quick access to Cli.echo.\n

@return [nil]\n"],["echo","StandupMD::Cli","StandupMD/Cli.html#method-c-echo","(msg)","

Prints output if verbose is true.\n

@return [nil]\n"],["edit","StandupMD::Cli","StandupMD/Cli.html#method-i-edit","()","

Opens the file in an editor. Abandons the script.\n

@return [nil]\n"],["empty?","StandupMD::EntryList","StandupMD/EntryList.html#method-i-empty-3F","()","

Is the list empty?\n

@return [Boolean] true if empty\n"],["execute","StandupMD::Cli","StandupMD/Cli.html#method-c-execute","(options = [])","

Creates an instance of StandupMD and runs what the user requested.\n"],["exist?","StandupMD::File","StandupMD/File.html#method-i-exist-3F","()","

Does the file exist?\n

@return [Boolean] true if exists\n"],["filter","StandupMD::EntryList","StandupMD/EntryList.html#method-i-filter","(start_date, end_date)","

Returns entries that are between the start and end date. This method assumes the list has already been …\n"],["filter!","StandupMD::EntryList","StandupMD/EntryList.html#method-i-filter-21","(start_date, end_date)","

Replaces entries with results of filter.\n

@param [Date] start_date\n

@param [Date] end_date\n"],["find","StandupMD::EntryList","StandupMD/EntryList.html#method-i-find","(key)","

Finds an entry based on date. This method assumes the list has already been sorted.\n"],["find","StandupMD::File","StandupMD/File.html#method-c-find","(file_name)","

Find standup file in directory by file name.\n

@param [String] File_naem\n"],["find_by_date","StandupMD::File","StandupMD/File.html#method-c-find_by_date","(date)","

Find standup file in directory by Date object.\n

@param [Date] date\n"],["first","StandupMD::EntryList","StandupMD/EntryList.html#method-i-first","()","

The first entry in the list. This method assumes the list has already been sorted.\n

@return [StandupMD::Entry] …\n"],["header_depth=","StandupMD::Config::File","StandupMD/Config/File.html#method-i-header_depth-3D","(depth)","

Number of octothorps (#) to use before the main header.\n

@param [Integer] depth\n

@return [Integer]\n"],["initalize","StandupMD::Config::EntryList","StandupMD/Config/EntryList.html#method-i-initalize","()","

Initializes the config with default values.\n"],["last","StandupMD::EntryList","StandupMD/EntryList.html#method-i-last","()","

The last entry in the list. This method assumes the list has already been sorted.\n

@return [StandupMD::Entry] …\n"],["load","StandupMD::File","StandupMD/File.html#method-c-load","(file_name)","

Convenience method for calling File.find(file_name).load\n

@param [String] file_name\n

@return [StandupMD::File] …\n"],["load","StandupMD::File","StandupMD/File.html#method-i-load","()","

Loads the file's contents. TODO clean up this method.\n

@return [StandupMD::FileList]\n"],["load_config_file","StandupMD","StandupMD.html#method-c-load_config_file","(file)","

Loads a config file.\n

@param [String] file\n"],["load_preferences","StandupMD::Cli","StandupMD/Cli.html#method-i-load_preferences","()","

Load the preference file.\n

@return [nil]\n"],["loaded?","StandupMD::File","StandupMD/File.html#method-i-loaded-3F","()","

Has the file been loaded?\n

@return [Boolean] true if loaded\n"],["new","StandupMD::Cli","StandupMD/Cli.html#method-c-new","(options = [], load_config = true)","

Constructor. Sets defaults.\n

@param [Array] options\n"],["new","StandupMD::Config","StandupMD/Config.html#method-c-new","()","

Builds the links to the configuration classes.\n"],["new","StandupMD::Config::Cli","StandupMD/Config/Cli.html#method-c-new","()","

Initializes the config with default values.\n"],["new","StandupMD::Config::Entry","StandupMD/Config/Entry.html#method-c-new","()","

Initializes the config with default values.\n"],["new","StandupMD::Config::File","StandupMD/Config/File.html#method-c-new","()","

Initializes the config with default values.\n"],["new","StandupMD::Entry","StandupMD/Entry.html#method-c-new","(date, current, previous, impediments, notes = [])","

Constructs instance of StandupMD::Entry.\n

@param [Date] date\n

@param [Array] current\n"],["new","StandupMD::EntryList","StandupMD/EntryList.html#method-c-new","(*entries)","

Contruct a list. Can pass any amount of StandupMD::Entry instances.\n

@param [Entry] entries\n

@return [StandupMD::EntryList] …\n"],["new","StandupMD::File","StandupMD/File.html#method-c-new","(file_name)","

Constructs the instance.\n

@param [String] file_name\n

@return [StandupMP::File]\n"],["new?","StandupMD::File","StandupMD/File.html#method-i-new-3F","()","

Was the file just now created?\n

@return [Boolean] true if new\n"],["preference_file_loaded?","StandupMD::Cli","StandupMD/Cli.html#method-i-preference_file_loaded-3F","()","

Has the preference file been loaded?\n

@return boolean\n"],["print","StandupMD::Cli::Helpers","StandupMD/Cli/Helpers.html#method-i-print","(entry)","

Print an entry to the command line.\n

@param [StandupMD::Entry] entry\n

@return [nil]\n"],["reset","StandupMD::Config::Cli","StandupMD/Config/Cli.html#method-i-reset","()","

Sets all config values back to their defaults.\n

@return [Boolean] true if successful\n"],["reset","StandupMD::Config::Entry","StandupMD/Config/Entry.html#method-i-reset","()","

Sets all config values back to their defaults.\n

@return [Boolean] true if successful\n"],["reset","StandupMD::Config::EntryList","StandupMD/Config/EntryList.html#method-i-reset","()","

Sets all config values back to their defaults.\n

@return [Boolean] true if successful\n"],["reset","StandupMD::Config::File","StandupMD/Config/File.html#method-i-reset","()","

Sets all config values back to their defaults.\n

@return [Boolean] true if successful\n"],["reset_config","StandupMD","StandupMD.html#method-c-reset_config","()","

Reset all configuration values to their defaults.\n

@return [StandupMD::Config]\n"],["size","StandupMD::EntryList","StandupMD/EntryList.html#method-i-size","()","

How many entries are in the list.\n

@return [Integer]\n"],["sort","StandupMD::EntryList","StandupMD/EntryList.html#method-i-sort","()","

Returns a copy of self sorted by date.\n

@return [StandupMD::EntryList]\n"],["sort!","StandupMD::EntryList","StandupMD/EntryList.html#method-i-sort-21","()","

Replace entries with sorted entries by date.\n

@return [StandupMD::EntryList]\n"],["sort_reverse","StandupMD::EntryList","StandupMD/EntryList.html#method-i-sort_reverse","()","

Returns a copy of self sorted by date.\n

@return [StandupMD::EntryList]\n"],["sub_header_depth=","StandupMD::Config::File","StandupMD/Config/File.html#method-i-sub_header_depth-3D","(depth)","

Number of octothorps (#) to use before sub headers (Current, Previous, etc).\n

@param [Integer] depth\n

@return …\n"],["to_h","StandupMD::Entry","StandupMD/Entry.html#method-i-to_h","()","

Entry as a hash .\n

@return [Hash]\n"],["to_h","StandupMD::EntryList","StandupMD/EntryList.html#method-i-to_h","()","

The list as a hash, with the dates as keys.\n

@return [Hash]\n"],["to_json","StandupMD::Entry","StandupMD/Entry.html#method-i-to_json","()","

Entry as a json object.\n

@return [String]\n"],["to_json","StandupMD::EntryList","StandupMD/EntryList.html#method-i-to_json","()","

The entry list as a json object.\n

@return [String]\n"],["write","StandupMD::File","StandupMD/File.html#method-i-write","(dates = {})","

Writes a new entry to the file if the first entry in the file isn't today. This method is destructive; …\n"],["write_file","StandupMD::Cli","StandupMD/Cli.html#method-i-write_file","()","

Writes entries to the file.\n

@return [Boolean] true if file was written\n"],["README","","README_md.html","","

The Standup Doctor\n

…\n\n

"]]}}
1
+ var search_data = {"index":{"searchIndex":["standupmd","cli","helpers","config","cli","entry","entrylist","file","entry","entrylist","file","<<()","<=>()","bullet_character=()","config()","config()","config()","config()","config()","config_file_loaded?()","configure()","create()","directory=()","each()","echo()","echo()","edit()","empty?()","execute()","exist?()","filter()","filter!()","find()","find()","find_by_date()","first()","header_depth=()","initalize()","last()","load()","load()","load_config_file()","load_preferences()","loaded?()","new()","new()","new()","new()","new()","new()","new()","new()","new?()","preference_file_loaded?()","print()","reset()","reset()","reset()","reset()","reset_config()","size()","sort()","sort!()","sort_reverse()","sub_header_depth=()","to_h()","to_h()","to_json()","to_json()","write()","write_file()","readme"],"longSearchIndex":["standupmd","standupmd::cli","standupmd::cli::helpers","standupmd::config","standupmd::config::cli","standupmd::config::entry","standupmd::config::entrylist","standupmd::config::file","standupmd::entry","standupmd::entrylist","standupmd::file","standupmd::entrylist#<<()","standupmd::entry#<=>()","standupmd::config::file#bullet_character=()","standupmd::config()","standupmd::cli::config()","standupmd::entry::config()","standupmd::entrylist::config()","standupmd::file::config()","standupmd::config_file_loaded?()","standupmd::configure()","standupmd::entry::create()","standupmd::config::file#directory=()","standupmd::entrylist#each()","standupmd::cli#echo()","standupmd::cli::echo()","standupmd::cli#edit()","standupmd::entrylist#empty?()","standupmd::cli::execute()","standupmd::file#exist?()","standupmd::entrylist#filter()","standupmd::entrylist#filter!()","standupmd::entrylist#find()","standupmd::file::find()","standupmd::file::find_by_date()","standupmd::entrylist#first()","standupmd::config::file#header_depth=()","standupmd::config::entrylist#initalize()","standupmd::entrylist#last()","standupmd::file::load()","standupmd::file#load()","standupmd::load_config_file()","standupmd::cli#load_preferences()","standupmd::file#loaded?()","standupmd::cli::new()","standupmd::config::new()","standupmd::config::cli::new()","standupmd::config::entry::new()","standupmd::config::file::new()","standupmd::entry::new()","standupmd::entrylist::new()","standupmd::file::new()","standupmd::file#new?()","standupmd::cli#preference_file_loaded?()","standupmd::cli::helpers#print()","standupmd::config::cli#reset()","standupmd::config::entry#reset()","standupmd::config::entrylist#reset()","standupmd::config::file#reset()","standupmd::reset_config()","standupmd::entrylist#size()","standupmd::entrylist#sort()","standupmd::entrylist#sort!()","standupmd::entrylist#sort_reverse()","standupmd::config::file#sub_header_depth=()","standupmd::entry#to_h()","standupmd::entrylist#to_h()","standupmd::entry#to_json()","standupmd::entrylist#to_json()","standupmd::file#write()","standupmd::cli#write_file()",""],"info":[["StandupMD","","StandupMD.html","","

The main module for the gem. Provides access to configuration classes.\n"],["StandupMD::Cli","","StandupMD/Cli.html","","

Class for handing the command-line interface.\n"],["StandupMD::Cli::Helpers","","StandupMD/Cli/Helpers.html","","

Module responsible for reading and writing standup files.\n"],["StandupMD::Config","","StandupMD/Config.html","","

This class provides a connector from StandupMD to the configuration classes.\n"],["StandupMD::Config::Cli","","StandupMD/Config/Cli.html","","

The configuration class for StandupMD::Cli\n"],["StandupMD::Config::Entry","","StandupMD/Config/Entry.html","","

The configuration class for StandupMD::Entry\n"],["StandupMD::Config::EntryList","","StandupMD/Config/EntryList.html","","

The configuration class for StandupMD::EntryList\n"],["StandupMD::Config::File","","StandupMD/Config/File.html","","

The configuration class for StandupMD::File\n"],["StandupMD::Entry","","StandupMD/Entry.html","","

Class for handling single entries. Includes the comparable module, and compares by date.\n"],["StandupMD::EntryList","","StandupMD/EntryList.html","","

Enumerable list of entries.\n"],["StandupMD::File","","StandupMD/File.html","","

Class for handling reading and writing standup files.\n"],["<<","StandupMD::EntryList","StandupMD/EntryList.html#method-i-3C-3C","(entry)","

Appends entries to list.\n

@param [StandupMD::Entry] entry\n

@return [Array]\n"],["<=>","StandupMD::Entry","StandupMD/Entry.html#method-i-3C-3D-3E","(other)","

Sorting method for Comparable. Entries are compared by date.\n"],["bullet_character=","StandupMD::Config::File","StandupMD/Config/File.html#method-i-bullet_character-3D","(char)","

Setter for bullet_character. Must be * (asterisk) or - (dash).\n

@param [String] character\n

@return [String] …\n"],["config","StandupMD","StandupMD.html#method-c-config","()","

Method for accessing the configuration.\n

@return [StanupMD::Cli]\n"],["config","StandupMD::Cli","StandupMD/Cli.html#method-c-config","()","

Access to the class's configuration.\n

@return [StandupMD::Config::Cli]\n"],["config","StandupMD::Entry","StandupMD/Entry.html#method-c-config","()","

Access to the class's configuration.\n

@return [StandupMD::Config::Entry]\n"],["config","StandupMD::EntryList","StandupMD/EntryList.html#method-c-config","()","

Access to the class's configuration.\n

@return [StandupMD::Config::EntryList]\n"],["config","StandupMD::File","StandupMD/File.html#method-c-config","()","

Access to the class's configuration.\n

@return [StandupMD::Config::EntryList]\n"],["config_file_loaded?","StandupMD","StandupMD.html#method-c-config_file_loaded-3F","()","

Has a config file been loaded?\n

@return [Boolean]\n"],["configure","StandupMD","StandupMD.html#method-c-configure","()","

Allows for configuration via a block. Useful when making config files.\n

@example\n\n

StandupMD.configure { |s| ...
\n"],["create","StandupMD::Entry","StandupMD/Entry.html#method-c-create","()","

Creates a generic entry. Default values can be set via configuration. Yields the entry if a block is …\n"],["directory=","StandupMD::Config::File","StandupMD/Config/File.html#method-i-directory-3D","(directory)","

Setter for directory. Must be expanded in case the user uses `~` for home. If the directory doesn't …\n"],["each","StandupMD::EntryList","StandupMD/EntryList.html#method-i-each","(&block)","

Iterate over the list and yield each entry.\n"],["echo","StandupMD::Cli","StandupMD/Cli.html#method-i-echo","(msg)","

Quick access to Cli.echo.\n

@return [nil]\n"],["echo","StandupMD::Cli","StandupMD/Cli.html#method-c-echo","(msg)","

Prints output if verbose is true.\n

@return [nil]\n"],["edit","StandupMD::Cli","StandupMD/Cli.html#method-i-edit","()","

Opens the file in an editor. Abandons the script.\n

@return [nil]\n"],["empty?","StandupMD::EntryList","StandupMD/EntryList.html#method-i-empty-3F","()","

Is the list empty?\n

@return [Boolean] true if empty\n"],["execute","StandupMD::Cli","StandupMD/Cli.html#method-c-execute","(options = [])","

Creates an instance of StandupMD and runs what the user requested.\n"],["exist?","StandupMD::File","StandupMD/File.html#method-i-exist-3F","()","

Does the file exist?\n

@return [Boolean] true if exists\n"],["filter","StandupMD::EntryList","StandupMD/EntryList.html#method-i-filter","(start_date, end_date)","

Returns entries that are between the start and end date. This method assumes the list has already been …\n"],["filter!","StandupMD::EntryList","StandupMD/EntryList.html#method-i-filter-21","(start_date, end_date)","

Replaces entries with results of filter.\n

@param [Date] start_date\n

@param [Date] end_date\n"],["find","StandupMD::EntryList","StandupMD/EntryList.html#method-i-find","(key)","

Finds an entry based on date. This method assumes the list has already been sorted.\n"],["find","StandupMD::File","StandupMD/File.html#method-c-find","(file_name)","

Find standup file in directory by file name.\n

@param [String] File_naem\n"],["find_by_date","StandupMD::File","StandupMD/File.html#method-c-find_by_date","(date)","

Find standup file in directory by Date object.\n

@param [Date] date\n"],["first","StandupMD::EntryList","StandupMD/EntryList.html#method-i-first","()","

The first entry in the list. This method assumes the list has already been sorted.\n

@return [StandupMD::Entry] …\n"],["header_depth=","StandupMD::Config::File","StandupMD/Config/File.html#method-i-header_depth-3D","(depth)","

Number of octothorps (#) to use before the main header.\n

@param [Integer] depth\n

@return [Integer]\n"],["initalize","StandupMD::Config::EntryList","StandupMD/Config/EntryList.html#method-i-initalize","()","

Initializes the config with default values.\n"],["last","StandupMD::EntryList","StandupMD/EntryList.html#method-i-last","()","

The last entry in the list. This method assumes the list has already been sorted.\n

@return [StandupMD::Entry] …\n"],["load","StandupMD::File","StandupMD/File.html#method-c-load","(file_name)","

Convenience method for calling File.find(file_name).load\n

@param [String] file_name\n

@return [StandupMD::File] …\n"],["load","StandupMD::File","StandupMD/File.html#method-i-load","()","

Loads the file's contents. TODO clean up this method.\n

@return [StandupMD::FileList]\n"],["load_config_file","StandupMD","StandupMD.html#method-c-load_config_file","(file)","

Loads a config file.\n

@param [String] file\n"],["load_preferences","StandupMD::Cli","StandupMD/Cli.html#method-i-load_preferences","()","

Load the preference file.\n

@return [nil]\n"],["loaded?","StandupMD::File","StandupMD/File.html#method-i-loaded-3F","()","

Has the file been loaded?\n

@return [Boolean] true if loaded\n"],["new","StandupMD::Cli","StandupMD/Cli.html#method-c-new","(options = [], load_config = true)","

Constructor. Sets defaults.\n

@param [Array] options\n"],["new","StandupMD::Config","StandupMD/Config.html#method-c-new","()","

Builds the links to the configuration classes.\n"],["new","StandupMD::Config::Cli","StandupMD/Config/Cli.html#method-c-new","()","

Initializes the config with default values.\n"],["new","StandupMD::Config::Entry","StandupMD/Config/Entry.html#method-c-new","()","

Initializes the config with default values.\n"],["new","StandupMD::Config::File","StandupMD/Config/File.html#method-c-new","()","

Initializes the config with default values.\n"],["new","StandupMD::Entry","StandupMD/Entry.html#method-c-new","(date, current, previous, impediments, notes = [])","

Constructs instance of StandupMD::Entry.\n

@param [Date] date\n

@param [Array] current\n"],["new","StandupMD::EntryList","StandupMD/EntryList.html#method-c-new","(*entries)","

Contruct a list. Can pass any amount of StandupMD::Entry instances.\n

@param [Entry] entries\n

@return [StandupMD::EntryList] …\n"],["new","StandupMD::File","StandupMD/File.html#method-c-new","(file_name)","

Constructs the instance.\n

@param [String] file_name\n

@return [StandupMP::File]\n"],["new?","StandupMD::File","StandupMD/File.html#method-i-new-3F","()","

Was the file just now created?\n

@return [Boolean] true if new\n"],["preference_file_loaded?","StandupMD::Cli","StandupMD/Cli.html#method-i-preference_file_loaded-3F","()","

Has the preference file been loaded?\n

@return boolean\n"],["print","StandupMD::Cli::Helpers","StandupMD/Cli/Helpers.html#method-i-print","(entry)","

Print an entry to the command line.\n

@param [StandupMD::Entry] entry\n

@return [nil]\n"],["reset","StandupMD::Config::Cli","StandupMD/Config/Cli.html#method-i-reset","()","

Sets all config values back to their defaults.\n

@return [Hash]\n"],["reset","StandupMD::Config::Entry","StandupMD/Config/Entry.html#method-i-reset","()","

Sets all config values back to their defaults.\n

@return [Hash]\n"],["reset","StandupMD::Config::EntryList","StandupMD/Config/EntryList.html#method-i-reset","()","

Sets all config values back to their defaults.\n

@return [Hash]\n"],["reset","StandupMD::Config::File","StandupMD/Config/File.html#method-i-reset","()","

Sets all config values back to their defaults.\n

@return [Hash]\n"],["reset_config","StandupMD","StandupMD.html#method-c-reset_config","()","

Reset all configuration values to their defaults.\n

@return [StandupMD::Config]\n"],["size","StandupMD::EntryList","StandupMD/EntryList.html#method-i-size","()","

How many entries are in the list.\n

@return [Integer]\n"],["sort","StandupMD::EntryList","StandupMD/EntryList.html#method-i-sort","()","

Returns a copy of self sorted by date.\n

@return [StandupMD::EntryList]\n"],["sort!","StandupMD::EntryList","StandupMD/EntryList.html#method-i-sort-21","()","

Replace entries with sorted entries by date.\n

@return [StandupMD::EntryList]\n"],["sort_reverse","StandupMD::EntryList","StandupMD/EntryList.html#method-i-sort_reverse","()","

Returns a copy of self sorted by date.\n

@return [StandupMD::EntryList]\n"],["sub_header_depth=","StandupMD::Config::File","StandupMD/Config/File.html#method-i-sub_header_depth-3D","(depth)","

Number of octothorps (#) to use before sub headers (Current, Previous, etc).\n

@param [Integer] depth\n

@return …\n"],["to_h","StandupMD::Entry","StandupMD/Entry.html#method-i-to_h","()","

Entry as a hash .\n

@return [Hash]\n"],["to_h","StandupMD::EntryList","StandupMD/EntryList.html#method-i-to_h","()","

The list as a hash, with the dates as keys.\n

@return [Hash]\n"],["to_json","StandupMD::Entry","StandupMD/Entry.html#method-i-to_json","()","

Entry as a json object.\n

@return [String]\n"],["to_json","StandupMD::EntryList","StandupMD/EntryList.html#method-i-to_json","()","

The entry list as a json object.\n

@return [String]\n"],["write","StandupMD::File","StandupMD/File.html#method-i-write","(dates = {})","

Writes a new entry to the file if the first entry in the file isn't today. This method is destructive; …\n"],["write_file","StandupMD::Cli","StandupMD/Cli.html#method-i-write_file","()","

Writes entries to the file.\n

@return [Boolean] true if file was written\n"],["README","","README_md.html","","

The Standup Doctor\n

…\n\n

"]]}}
Binary file
@@ -375,9 +375,9 @@
375
375
  <span class="container">StandupMD::Cli::Helpers</span>
376
376
 
377
377
  <li class="method">
378
- <a href="StandupMD/Config/Entry.html#method-i-reset">#reset</a>
378
+ <a href="StandupMD/Config/EntryList.html#method-i-reset">#reset</a>
379
379
  &mdash;
380
- <span class="container">StandupMD::Config::Entry</span>
380
+ <span class="container">StandupMD::Config::EntryList</span>
381
381
 
382
382
  <li class="method">
383
383
  <a href="StandupMD/Config/Cli.html#method-i-reset">#reset</a>
@@ -385,14 +385,14 @@
385
385
  <span class="container">StandupMD::Config::Cli</span>
386
386
 
387
387
  <li class="method">
388
- <a href="StandupMD/Config/EntryList.html#method-i-reset">#reset</a>
388
+ <a href="StandupMD/Config/File.html#method-i-reset">#reset</a>
389
389
  &mdash;
390
- <span class="container">StandupMD::Config::EntryList</span>
390
+ <span class="container">StandupMD::Config::File</span>
391
391
 
392
392
  <li class="method">
393
- <a href="StandupMD/Config/File.html#method-i-reset">#reset</a>
393
+ <a href="StandupMD/Config/Entry.html#method-i-reset">#reset</a>
394
394
  &mdash;
395
- <span class="container">StandupMD::Config::File</span>
395
+ <span class="container">StandupMD::Config::Entry</span>
396
396
 
397
397
  <li class="method">
398
398
  <a href="StandupMD/EntryList.html#method-i-size">#size</a>
@@ -430,14 +430,14 @@
430
430
  <span class="container">StandupMD::Entry</span>
431
431
 
432
432
  <li class="method">
433
- <a href="StandupMD/Entry.html#method-i-to_json">#to_json</a>
433
+ <a href="StandupMD/EntryList.html#method-i-to_json">#to_json</a>
434
434
  &mdash;
435
- <span class="container">StandupMD::Entry</span>
435
+ <span class="container">StandupMD::EntryList</span>
436
436
 
437
437
  <li class="method">
438
- <a href="StandupMD/EntryList.html#method-i-to_json">#to_json</a>
438
+ <a href="StandupMD/Entry.html#method-i-to_json">#to_json</a>
439
439
  &mdash;
440
- <span class="container">StandupMD::EntryList</span>
440
+ <span class="container">StandupMD::Entry</span>
441
441
 
442
442
  <li class="method">
443
443
  <a href="StandupMD/File.html#method-i-write">#write</a>
@@ -8,7 +8,7 @@ require_relative 'standup_md/cli'
8
8
  require_relative 'standup_md/config'
9
9
 
10
10
  ##
11
- # The class for handing reading/writing of entries.
11
+ # The main module for the gem. Provides access to configuration classes.
12
12
  module StandupMD
13
13
  @config_file_loaded = false
14
14
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'config/cli'
2
4
  require_relative 'config/file'
3
5
  require_relative 'config/entry'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'date'
3
4
 
4
5
  module StandupMD
@@ -7,6 +8,23 @@ module StandupMD
7
8
  ##
8
9
  # The configuration class for StandupMD::Cli
9
10
  class Cli
11
+
12
+ ##
13
+ # The default options.
14
+ #
15
+ # @return [Hash]
16
+ DEFAULTS = {
17
+ date: Date.today,
18
+ editor: ENV['VISUAL'] || ENV['EDITOR'] || 'vim',
19
+ verbose: false,
20
+ edit: true,
21
+ write: true,
22
+ print: false,
23
+ auto_fill_previous: true,
24
+ preference_file:
25
+ ::File.expand_path(::File.join(ENV['HOME'], '.standuprc')),
26
+ }
27
+
10
28
  ##
11
29
  # The editor to use when opening standup files. If one is not set, the
12
30
  # first of $VISUAL, $EDITOR, or vim will be used, in that order.
@@ -33,7 +51,7 @@ module StandupMD
33
51
  attr_accessor :edit
34
52
 
35
53
  ##
36
- # Should the cli write the file?
54
+ # Should the cli automatically write the new entry to the file?
37
55
  #
38
56
  # @param [Boolean] write
39
57
  #
@@ -41,7 +59,7 @@ module StandupMD
41
59
  attr_accessor :write
42
60
 
43
61
  ##
44
- # Should the cli print the entry?
62
+ # Should the cli print the entry to the command line?
45
63
  #
46
64
  # @param [Boolean] print
47
65
  #
@@ -49,7 +67,7 @@ module StandupMD
49
67
  attr_accessor :print
50
68
 
51
69
  ##
52
- # The date to use to find the file.
70
+ # The date to use to find the entry.
53
71
  #
54
72
  # @param [Date] date
55
73
  #
@@ -82,24 +100,9 @@ module StandupMD
82
100
  ##
83
101
  # Sets all config values back to their defaults.
84
102
  #
85
- # @return [Boolean] true if successful
103
+ # @return [Hash]
86
104
  def reset
87
- @date = Date.today
88
- @editor = set_editor
89
- @verbose = false
90
- @edit = true
91
- @write = true
92
- @print = false
93
- @auto_fill_previous = true
94
- @preference_file = ::File.expand_path(::File.join(ENV['HOME'], '.standuprc'))
95
- end
96
-
97
- private
98
-
99
- def set_editor # :nodoc:
100
- return ENV['VISUAL'] if ENV['VISUAL']
101
- return ENV['EDITOR'] if ENV['EDITOR']
102
- 'vim'
105
+ DEFAULTS.each { |k, v| instance_variable_set("@#{k}", v) }
103
106
  end
104
107
  end
105
108
  end
@@ -7,6 +7,17 @@ module StandupMD
7
7
  # The configuration class for StandupMD::Entry
8
8
  class Entry
9
9
 
10
+ ##
11
+ # The default options.
12
+ #
13
+ # @return [Hash]
14
+ DEFAULTS = {
15
+ current: ["<!-- ADD TODAY'S WORK HERE -->"],
16
+ previous: [],
17
+ impediments: ['None'],
18
+ notes: [],
19
+ }
20
+
10
21
  ##
11
22
  # Tasks for "Current" section.
12
23
  #
@@ -48,13 +59,9 @@ module StandupMD
48
59
  ##
49
60
  # Sets all config values back to their defaults.
50
61
  #
51
- # @return [Boolean] true if successful
62
+ # @return [Hash]
52
63
  def reset
53
- @current = ["<!-- ADD TODAY'S WORK HERE -->"]
54
- @previous = []
55
- @impediments = ['None']
56
- @notes = []
57
- true
64
+ DEFAULTS.each { |k, v| instance_variable_set("@#{k}", v) }
58
65
  end
59
66
  end
60
67
  end
@@ -7,6 +7,12 @@ module StandupMD
7
7
  # The configuration class for StandupMD::EntryList
8
8
  class EntryList
9
9
 
10
+ ##
11
+ # The default options.
12
+ #
13
+ # @return [Hash]
14
+ DEFAULTS = {}
15
+
10
16
  ##
11
17
  # Initializes the config with default values.
12
18
  def initalize
@@ -16,10 +22,9 @@ module StandupMD
16
22
  ##
17
23
  # Sets all config values back to their defaults.
18
24
  #
19
- # @return [Boolean] true if successful
25
+ # @return [Hash]
20
26
  def reset
21
- # TODO add order ascending or decending.
22
- true
27
+ DEFAULTS.each { |k, v| instance_variable_set("@#{k}", v) }
23
28
  end
24
29
  end
25
30
  end
@@ -1,9 +1,31 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module StandupMD
2
4
  class Config
3
5
 
4
6
  ##
5
7
  # The configuration class for StandupMD::File
6
8
  class File
9
+
10
+ ##
11
+ # The default options.
12
+ #
13
+ # @return [Hash]
14
+ DEFAULTS = {
15
+ header_date_format: '%Y-%m-%d',
16
+ header_depth: 1,
17
+ sub_header_depth: 2,
18
+ current_header: 'Current',
19
+ previous_header: 'Previous',
20
+ impediments_header: 'Impediments',
21
+ notes_header: 'Notes',
22
+ sub_header_order: %w[previous current impediments notes],
23
+ directory: ::File.join(ENV['HOME'], '.cache', 'standup_md'),
24
+ bullet_character: '-',
25
+ name_format: '%Y_%m.md',
26
+ create: true,
27
+ }
28
+
7
29
  ##
8
30
  # Number of octothorps that should preface entry headers.
9
31
  #
@@ -122,21 +144,9 @@ module StandupMD
122
144
  ##
123
145
  # Sets all config values back to their defaults.
124
146
  #
125
- # @return [Boolean] true if successful
147
+ # @return [Hash]
126
148
  def reset
127
- @header_date_format = '%Y-%m-%d'
128
- @header_depth = 1
129
- @sub_header_depth = 2
130
- @current_header = 'Current'
131
- @previous_header = 'Previous'
132
- @impediments_header = 'Impediments'
133
- @notes_header = 'Notes'
134
- @sub_header_order = %w[previous current impediments notes]
135
- @directory = ::File.join(ENV['HOME'], '.cache', 'standup_md')
136
- @bullet_character = '-'
137
- @name_format = '%Y_%m.md'
138
- @create = true
139
- true
149
+ DEFAULTS.each { |k, v| instance_variable_set("@#{k}", v) }
140
150
  end
141
151
 
142
152
  ##
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'json'
3
4
 
4
5
  module StandupMD
@@ -55,22 +55,6 @@ module StandupMD
55
55
  to_a.bsearch { |e| e.date == key }
56
56
  end
57
57
 
58
- ##
59
- # How many entries are in the list.
60
- #
61
- # @return [Integer]
62
- def size
63
- @entries.size
64
- end
65
-
66
- ##
67
- # Is the list empty?
68
- #
69
- # @return [Boolean] true if empty
70
- def empty?
71
- @entries.empty?
72
- end
73
-
74
58
  ##
75
59
  # Returns a copy of self sorted by date.
76
60
  #
@@ -124,6 +108,27 @@ module StandupMD
124
108
  self
125
109
  end
126
110
 
111
+ ##
112
+ # The list as a hash, with the dates as keys.
113
+ #
114
+ # @return [Hash]
115
+ def to_h
116
+ Hash[@entries.map { |e| [e.date, {
117
+ 'current' => e.current,
118
+ 'previous' => e.previous,
119
+ 'impediments' => e.impediments,
120
+ 'notes' => e.notes
121
+ }]}]
122
+ end
123
+
124
+ ##
125
+ # The entry list as a json object.
126
+ #
127
+ # @return [String]
128
+ def to_json
129
+ to_h.to_json
130
+ end
131
+
127
132
  ##
128
133
  # The first entry in the list. This method assumes the list has
129
134
  # already been sorted.
@@ -143,24 +148,19 @@ module StandupMD
143
148
  end
144
149
 
145
150
  ##
146
- # The list as a hash, with the dates as keys.
151
+ # How many entries are in the list.
147
152
  #
148
- # @return [Hash]
149
- def to_h
150
- Hash[@entries.map { |e| [e.date, {
151
- 'current' => e.current,
152
- 'previous' => e.previous,
153
- 'impediments' => e.impediments,
154
- 'notes' => e.notes
155
- }]}]
153
+ # @return [Integer]
154
+ def size
155
+ @entries.size
156
156
  end
157
157
 
158
158
  ##
159
- # The entry list as a json object.
159
+ # Is the list empty?
160
160
  #
161
- # @return [String]
162
- def to_json
163
- to_h.to_json
161
+ # @return [Boolean] true if empty
162
+ def empty?
163
+ @entries.empty?
164
164
  end
165
165
  end
166
166
  end
@@ -5,5 +5,5 @@ module StandupMD
5
5
  # The gem verision
6
6
  #
7
7
  # @return [String]
8
- VERSION = '0.3.2'
8
+ VERSION = '0.3.3'
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: standup_md
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Gray
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-10 00:00:00.000000000 Z
11
+ date: 2020-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake