standup_md 0.3.6 → 0.3.11

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3778ef26e402b37d24ff4b3e7465123ffb3eb0cca19125d5bf44f21b36b92fe7
4
- data.tar.gz: 4bef958d825346fdbfdb45c961633245f9edc172ac5877db1723d9c3501f04d5
3
+ metadata.gz: 9c3ec97ec3643dc8143bf423de49378c144ef0a3c8ec8ac034ff7dfb88d62b25
4
+ data.tar.gz: c81c9b4442a3f5261adbca61ce9cc6e4ce7085ce48cca0913c046f47878ef218
5
5
  SHA512:
6
- metadata.gz: 262cee1fd957f46c19e39af445d50b89d034c925fc857a0b3e64a042e652ce7c0ebfd1addda1999cf40a8052f05b5b24ed274d443764769bd47d23e2aafea1bb
7
- data.tar.gz: bfb62a584c6f9386e821deeade2bbf842999d8a210e225114d137701b2bd603f3934a4416a32cfd21ebf35ad5ada526a75e80dd13c2376d010b72119ce9c3960
6
+ metadata.gz: df9b8279091248fe8e70d3c878b7bbf3de74af5e34e36e2ff0d4de5205d68a2538b3e3039e0b8e72baa8b505f1cfc8b99c47f81524d348debe6eabb2c70bc15a
7
+ data.tar.gz: b421353e0f9ef32cc1318f59520f0e90377b98f70576bc392be82716f32b087c8cc1dd75fad38e7f70a89352454457c1468a44d1d850492dae0bd5d141e4ce50
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- standup_md (0.3.5)
4
+ standup_md (0.3.10)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -113,20 +113,12 @@ your clipboard without even opening your editor.
113
113
  standup -p | pbcopy
114
114
  ```
115
115
 
116
- If you wanted to add today's entry without opening your editor, and print the
117
- result to the command line, you could use the following.
118
-
119
116
  #### Add entry to file without opening it
120
- ```sh
121
- standup --no-edit --current "Work on this thing","And another thing"
122
- ```
123
-
124
- #### Find an entry by date and print it.
125
- If you wanted to find and print the entry for March 2nd, 2020, you could use the
126
- following.
117
+ You can add an entry for today without even opening your editor. Note that, if
118
+ you have multiple entries, you must separate them with a comma and *no spaces*.
127
119
 
128
120
  ```sh
129
- standup -p 2020-03-02
121
+ standup --no-edit --current "Work on this thing","And another thing"
130
122
  ```
131
123
 
132
124
  ### Customization and Runtime Options
@@ -273,9 +265,9 @@ end
273
265
  The API is fully documented in the
274
266
  [RDoc Documentation](https://evanthegrayt.github.io/standup_md/doc/index.html).
275
267
 
276
- This was mainly written as a command line utility, but the API is ridiculously
277
- robust, and is available for use in your own projects. A quick example of how
278
- to write a new entry via code could look like the following:
268
+ This was mainly written as a command line utility, but the API is very robust,
269
+ and is available for use in your own projects. A quick example of how to write a
270
+ new entry via code could look like the following:
279
271
 
280
272
  ### API Examples
281
273
  #### Adding an entry for today
@@ -320,16 +312,13 @@ While there's no official support for vim, you can add this to your `vimrc`
320
312
  file, or something like `~/.vim/plugin/standup.vim`.
321
313
 
322
314
  ```vim
323
- if executable('standup')
324
- command! -complete=custom,s:StandupCompletion -nargs=? -bang Standup
325
- \ call s:OpenStandupFile(<bang>0, <f-args>)
326
- endif
315
+ command! -complete=custom,<SID>StandupCompletion -nargs=? -bang Standup
316
+ \ call <SID>OpenStandupFile(<bang>0, <f-args>)
327
317
 
328
318
  function! s:StandupCompletion(...) abort
329
319
  let l:dir = get(g:, 'standup_dir', $HOME . '/.cache/standup_md') . '/'
330
320
  if !isdirectory(l:dir) | return '' | endif
331
- let l:list = glob(l:dir . '*.md', 0, 1)
332
- return join(map(l:list, "substitute(v:val, l:dir, '', '')"), "\n")
321
+ return join(map(glob(l:dir . '*.md', 0, 1), "fnamemodify(v:val, ':t')"), "\n")
333
322
  endfunction
334
323
 
335
324
  function! s:OpenStandupFile(split, ...)
data/doc/README_md.html CHANGED
@@ -21,8 +21,6 @@
21
21
  <link href="./css/rdoc.css" rel="stylesheet">
22
22
 
23
23
 
24
-
25
-
26
24
  <body id="top" role="document" class="file">
27
25
  <nav role="navigation">
28
26
  <div id="project-navigation">
@@ -71,7 +69,6 @@
71
69
  <li><a href="#label-Adding+an+entry+for+today+via+editor">Adding an entry for today via editor</a>
72
70
  <li><a href="#label-Copy+the+entry+for+today+to+clipboard">Copy the entry for today to clipboard</a>
73
71
  <li><a href="#label-Add+entry+to+file+without+opening+it">Add entry to file without opening it</a>
74
- <li><a href="#label-Find+an+entry+by+date+and+print+it.">Find an entry by date and print it.</a>
75
72
  <li><a href="#label-Customization+and+Runtime+Options">Customization and Runtime Options</a>
76
73
  <li><a href="#label-Available+Config+File+Options+and+Defaults">Available Config File Options and Defaults</a>
77
74
  <li><a href="#label-Executable+Flags">Executable Flags</a>
@@ -88,13 +85,12 @@
88
85
 
89
86
 
90
87
  <div id="project-metadata">
91
- <div id="fileindex-section" class="nav-section">
88
+
89
+ <div id="fileindex-section" class="nav-section">
92
90
  <h3>Pages</h3>
93
91
 
94
92
  <ul class="link-list">
95
-
96
93
  <li><a href="./README_md.html">README</a>
97
-
98
94
  </ul>
99
95
  </div>
100
96
 
@@ -191,17 +187,11 @@ rake install</pre>
191
187
  <pre class="ruby"><span class="ruby-identifier">standup</span> <span class="ruby-operator">-</span><span class="ruby-identifier">p</span> <span class="ruby-operator">|</span> <span class="ruby-identifier">pbcopy</span>
192
188
  </pre>
193
189
 
194
- <p>If you wanted to add today&#39;s entry without opening your editor, and print the result to the command line, you could use the following.</p>
195
-
196
190
  <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>
197
191
 
198
- <pre>standup --no-edit --current &quot;Work on this thing&quot;,&quot;And another thing&quot;</pre>
199
-
200
- <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>
192
+ <p>You can add an entry for today without even opening your editor. Note that, if you have multiple entries, you must separate them with a comma and <em>no spaces</em>.</p>
201
193
 
202
- <p>If you wanted to find and print the entry for March 2nd, 2020, you could use the following.</p>
203
-
204
- <pre>standup -p 2020-03-02</pre>
194
+ <pre>standup --no-edit --current &quot;Work on this thing&quot;,&quot;And another thing&quot;</pre>
205
195
 
206
196
  <h3 id="label-Customization+and+Runtime+Options">Customization and Runtime Options<span><a href="#label-Customization+and+Runtime+Options">&para;</a> <a href="#top">&uarr;</a></span></h3>
207
197
 
@@ -319,7 +309,7 @@ rake install</pre>
319
309
 
320
310
  <p>The API is fully documented in the <a href="https://evanthegrayt.github.io/standup_md/doc/index.html">RDoc Documentation</a>.</p>
321
311
 
322
- <p>This was mainly written as a command line utility, but the API is ridiculously robust, and is available for use in your own projects. A quick example of how to write a new entry via code could look like the following:</p>
312
+ <p>This was mainly written as a command line utility, but the API is very robust, and is available for use in your own projects. A quick example of how to write a new entry via code could look like the following:</p>
323
313
 
324
314
  <h3 id="label-API+Examples">API Examples<span><a href="#label-API+Examples">&para;</a> <a href="#top">&uarr;</a></span></h3>
325
315
 
@@ -362,16 +352,13 @@ rake install</pre>
362
352
 
363
353
  <p>While there&#39;s no official support for vim, you can add this to your <code>vimrc</code> file, or something like <code>~/.vim/plugin/standup.vim</code>.</p>
364
354
 
365
- <pre>if executable(&#39;standup&#39;)
366
- command! -complete=custom,s:StandupCompletion -nargs=? -bang Standup
367
- \ call s:OpenStandupFile(&lt;bang&gt;0, &lt;f-args&gt;)
368
- endif
355
+ <pre>command! -complete=custom,&lt;SID&gt;StandupCompletion -nargs=? -bang Standup
356
+ \ call &lt;SID&gt;OpenStandupFile(&lt;bang&gt;0, &lt;f-args&gt;)
369
357
 
370
358
  function! s:StandupCompletion(...) abort
371
359
  let l:dir = get(g:, &#39;standup_dir&#39;, $HOME . &#39;/.cache/standup_md&#39;) . &#39;/&#39;
372
360
  if !isdirectory(l:dir) | return &#39;&#39; | endif
373
- let l:list = glob(l:dir . &#39;*.md&#39;, 0, 1)
374
- return join(map(l:list, &quot;substitute(v:val, l:dir, &#39;&#39;, &#39;&#39;)&quot;), &quot;\n&quot;)
361
+ return join(map(glob(l:dir . &#39;*.md&#39;, 0, 1), &quot;fnamemodify(v:val, &#39;:t&#39;)&quot;), &quot;\n&quot;)
375
362
  endfunction
376
363
 
377
364
  function! s:OpenStandupFile(split, ...)
@@ -400,7 +387,7 @@ g:standup_file = strftime(&#39;%Y_%m.md&#39;) &quot; the file format to u
400
387
 
401
388
  <footer id="validator-badges" role="contentinfo">
402
389
  <p><a href="https://validator.w3.org/check/referer">Validate</a>
403
- <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.2.1.
390
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.0.
404
391
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
405
392
  </footer>
406
393
 
data/doc/StandupMD.html CHANGED
@@ -21,8 +21,6 @@
21
21
  <link href="./css/rdoc.css" rel="stylesheet">
22
22
 
23
23
 
24
-
25
-
26
24
  <body id="top" role="document" class="module">
27
25
  <nav role="navigation">
28
26
  <div id="project-navigation">
@@ -62,22 +60,17 @@
62
60
 
63
61
 
64
62
 
65
- <!-- Method Quickref -->
63
+
64
+ <!-- Method Quickref -->
66
65
  <div id="method-list-section" class="nav-section">
67
66
  <h3>Methods</h3>
68
67
 
69
68
  <ul class="link-list" role="directory">
70
-
71
69
  <li ><a href="#method-c-config">::config</a>
72
-
73
70
  <li ><a href="#method-c-config_file_loaded-3F">::config_file_loaded?</a>
74
-
75
71
  <li ><a href="#method-c-configure">::configure</a>
76
-
77
72
  <li ><a href="#method-c-load_config_file">::load_config_file</a>
78
-
79
73
  <li ><a href="#method-c-reset_config">::reset_config</a>
80
-
81
74
  </ul>
82
75
  </div>
83
76
 
@@ -95,215 +88,151 @@
95
88
 
96
89
  </section>
97
90
 
98
-
99
91
  <section id="5Buntitled-5D" class="documentation-section">
100
-
101
92
 
102
-
103
93
 
104
-
105
94
 
106
-
107
95
 
108
-
96
+
109
97
  <section id="public-class-5Buntitled-5D-method-details" class="method-section">
110
98
  <header>
111
99
  <h3>Public Class Methods</h3>
112
100
  </header>
113
101
 
114
-
115
102
  <div id="method-c-config" class="method-detail ">
116
-
117
103
  <div class="method-heading">
118
104
  <span class="method-name">config</span><span
119
105
  class="method-args">()</span>
120
-
121
106
  <span class="method-click-advice">click to toggle source</span>
122
-
123
107
  </div>
124
-
125
108
 
126
109
  <div class="method-description">
127
-
128
110
  <p>Method for accessing the configuration.</p>
129
111
 
130
112
  <p>@return [StanupMD::Cli]</p>
131
-
132
-
133
113
 
134
-
135
114
  <div class="method-source-code" id="config-source">
136
115
  <pre><span class="ruby-comment"># File lib/standup_md.rb, line 19</span>
137
116
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">config</span>
138
- <span class="ruby-ivar">@config</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">StandupMD</span><span class="ruby-operator">::</span><span class="ruby-constant">Config</span>.<span class="ruby-identifier">new</span>
117
+ <span class="ruby-ivar">@config</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">reset_config</span>
139
118
  <span class="ruby-keyword">end</span></pre>
140
119
  </div>
141
-
142
120
  </div>
143
121
 
144
-
145
122
 
146
-
147
123
  </div>
148
124
 
149
-
150
125
  <div id="method-c-config_file_loaded-3F" class="method-detail ">
151
-
152
126
  <div class="method-heading">
153
127
  <span class="method-name">config_file_loaded?</span><span
154
128
  class="method-args">()</span>
155
-
156
129
  <span class="method-click-advice">click to toggle source</span>
157
-
158
130
  </div>
159
-
160
131
 
161
132
  <div class="method-description">
162
-
163
133
  <p>Has a config file been loaded?</p>
164
134
 
165
135
  <p>@return [Boolean]</p>
166
-
167
-
168
136
 
169
-
170
137
  <div class="method-source-code" id="config_file_loaded-3F-source">
171
138
  <pre><span class="ruby-comment"># File lib/standup_md.rb, line 44</span>
172
139
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">config_file_loaded?</span>
173
140
  <span class="ruby-ivar">@config_file_loaded</span>
174
141
  <span class="ruby-keyword">end</span></pre>
175
142
  </div>
176
-
177
143
  </div>
178
144
 
179
-
180
145
 
181
-
182
146
  </div>
183
147
 
184
-
185
148
  <div id="method-c-configure" class="method-detail ">
186
-
187
149
  <div class="method-heading">
188
150
  <span class="method-name">configure</span><span
189
151
  class="method-args">() { |config| ... }</span>
190
-
191
152
  <span class="method-click-advice">click to toggle source</span>
192
-
193
153
  </div>
194
-
195
154
 
196
155
  <div class="method-description">
197
-
198
156
  <p>Allows for configuration via a block. Useful when making config files.</p>
199
157
 
200
158
  <p>@example</p>
201
159
 
202
160
  <pre class="ruby"><span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">configure</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">cli</span>.<span class="ruby-identifier">editor</span> = <span class="ruby-string">&#39;mate&#39;</span> }
203
161
  </pre>
204
-
205
-
206
162
 
207
-
208
163
  <div class="method-source-code" id="configure-source">
209
164
  <pre><span class="ruby-comment"># File lib/standup_md.rb, line 36</span>
210
165
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">configure</span>
211
166
  <span class="ruby-keyword">yield</span> <span class="ruby-identifier">config</span>
212
167
  <span class="ruby-keyword">end</span></pre>
213
168
  </div>
214
-
215
169
  </div>
216
170
 
217
-
218
171
 
219
-
220
172
  </div>
221
173
 
222
-
223
174
  <div id="method-c-load_config_file" class="method-detail ">
224
-
225
175
  <div class="method-heading">
226
176
  <span class="method-name">load_config_file</span><span
227
177
  class="method-args">(file)</span>
228
-
229
178
  <span class="method-click-advice">click to toggle source</span>
230
-
231
179
  </div>
232
-
233
180
 
234
181
  <div class="method-description">
235
-
236
182
  <p>Loads a config file.</p>
237
183
 
238
184
  <p>@param [String] file</p>
239
-
240
-
241
185
 
242
-
186
+ <p>@return [String] file</p>
187
+
243
188
  <div class="method-source-code" id="load_config_file-source">
244
- <pre><span class="ruby-comment"># File lib/standup_md.rb, line 52</span>
189
+ <pre><span class="ruby-comment"># File lib/standup_md.rb, line 54</span>
245
190
  <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>)
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>)
247
- <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;File #{file} does not exist.&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span>(<span class="ruby-identifier">file</span>)
191
+ <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">file</span>).<span class="ruby-identifier">tap</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
192
+ <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;File #{file} does not exist.&quot;</span> <span class="ruby-keyword">unless</span> <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span>(<span class="ruby-identifier">file</span>)
248
193
 
249
- <span class="ruby-ivar">@config_file_loaded</span> = <span class="ruby-keyword">true</span>
250
- <span class="ruby-identifier">load</span> <span class="ruby-identifier">file</span>
194
+ <span class="ruby-ivar">@config_file_loaded</span> = <span class="ruby-keyword">true</span>
195
+ <span class="ruby-identifier">load</span> <span class="ruby-identifier">file</span>
196
+ <span class="ruby-keyword">end</span>
251
197
  <span class="ruby-keyword">end</span></pre>
252
198
  </div>
253
-
254
199
  </div>
255
200
 
256
-
257
201
 
258
-
259
202
  </div>
260
203
 
261
-
262
204
  <div id="method-c-reset_config" class="method-detail ">
263
-
264
205
  <div class="method-heading">
265
206
  <span class="method-name">reset_config</span><span
266
207
  class="method-args">()</span>
267
-
268
208
  <span class="method-click-advice">click to toggle source</span>
269
-
270
209
  </div>
271
-
272
210
 
273
211
  <div class="method-description">
274
-
275
212
  <p>Reset all configuration values to their defaults.</p>
276
213
 
277
214
  <p>@return [StandupMD::Config]</p>
278
-
279
-
280
215
 
281
-
282
216
  <div class="method-source-code" id="reset_config-source">
283
217
  <pre><span class="ruby-comment"># File lib/standup_md.rb, line 27</span>
284
218
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">reset_config</span>
285
219
  <span class="ruby-ivar">@config</span> = <span class="ruby-constant">StandupMD</span><span class="ruby-operator">::</span><span class="ruby-constant">Config</span>.<span class="ruby-identifier">new</span>
286
220
  <span class="ruby-keyword">end</span></pre>
287
221
  </div>
288
-
289
222
  </div>
290
223
 
291
-
292
224
 
293
-
294
225
  </div>
295
226
 
296
-
297
227
  </section>
298
-
299
- </section>
300
228
 
229
+ </section>
301
230
  </main>
302
231
 
303
232
 
304
233
  <footer id="validator-badges" role="contentinfo">
305
234
  <p><a href="https://validator.w3.org/check/referer">Validate</a>
306
- <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.2.1.
235
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.0.
307
236
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
308
237
  </footer>
309
238
 
@@ -21,8 +21,6 @@
21
21
  <link href="../css/rdoc.css" rel="stylesheet">
22
22
 
23
23
 
24
-
25
-
26
24
  <body id="top" role="document" class="class">
27
25
  <nav role="navigation">
28
26
  <div id="project-navigation">
@@ -59,51 +57,38 @@
59
57
 
60
58
  <div id="class-metadata">
61
59
 
62
- <div id="parent-class-section" class="nav-section">
60
+
61
+ <div id="parent-class-section" class="nav-section">
63
62
  <h3>Parent</h3>
64
63
 
65
-
66
64
  <p class="link">Object
67
-
68
65
  </div>
69
66
 
70
- <div id="includes-section" class="nav-section">
67
+
68
+ <div id="includes-section" class="nav-section">
71
69
  <h3>Included Modules</h3>
72
70
 
73
71
  <ul class="link-list">
74
-
75
-
76
72
  <li><a class="include" href="Cli/Helpers.html">StandupMD::Cli::Helpers</a>
77
-
78
-
79
73
  </ul>
80
74
  </div>
81
75
 
82
76
 
83
- <!-- Method Quickref -->
77
+
78
+ <!-- Method Quickref -->
84
79
  <div id="method-list-section" class="nav-section">
85
80
  <h3>Methods</h3>
86
81
 
87
82
  <ul class="link-list" role="directory">
88
-
89
83
  <li ><a href="#method-c-config">::config</a>
90
-
91
84
  <li ><a href="#method-c-echo">::echo</a>
92
-
93
85
  <li ><a href="#method-c-execute">::execute</a>
94
-
95
86
  <li ><a href="#method-c-new">::new</a>
96
-
97
87
  <li ><a href="#method-i-echo">#echo</a>
98
-
99
88
  <li ><a href="#method-i-edit">#edit</a>
100
-
101
89
  <li ><a href="#method-i-load_preferences">#load_preferences</a>
102
-
103
90
  <li ><a href="#method-i-preference_file_loaded-3F">#preference_file_loaded?</a>
104
-
105
91
  <li ><a href="#method-i-write_file">#write_file</a>
106
-
107
92
  </ul>
108
93
  </div>
109
94
 
@@ -121,21 +106,15 @@
121
106
 
122
107
  </section>
123
108
 
124
-
125
109
  <section id="5Buntitled-5D" class="documentation-section">
126
-
127
110
 
128
-
129
111
 
130
-
131
112
 
132
-
133
113
  <section class="attribute-method-details" class="method-section">
134
114
  <header>
135
115
  <h3>Attributes</h3>
136
116
  </header>
137
117
 
138
-
139
118
  <div id="attribute-i-entry" class="method-detail">
140
119
  <div class="method-heading attribute-method-heading">
141
120
  <span class="method-name">entry</span><span
@@ -143,14 +122,11 @@
143
122
  </div>
144
123
 
145
124
  <div class="method-description">
146
-
147
125
  <p>The entry searched for, usually today.</p>
148
126
 
149
127
  <p>@return [StandupMD::Entry]</p>
150
-
151
128
  </div>
152
129
  </div>
153
-
154
130
  <div id="attribute-i-file" class="method-detail">
155
131
  <div class="method-heading attribute-method-heading">
156
132
  <span class="method-name">file</span><span
@@ -158,14 +134,11 @@
158
134
  </div>
159
135
 
160
136
  <div class="method-description">
161
-
162
137
  <p>The file loaded.</p>
163
138
 
164
139
  <p>@return [StandupMD::File]</p>
165
-
166
140
  </div>
167
141
  </div>
168
-
169
142
  <div id="attribute-i-options" class="method-detail">
170
143
  <div class="method-heading attribute-method-heading">
171
144
  <span class="method-name">options</span><span
@@ -173,154 +146,105 @@
173
146
  </div>
174
147
 
175
148
  <div class="method-description">
176
-
177
149
  <p>Arguments passed at runtime.</p>
178
150
 
179
151
  <p>@return [Array] ARGV</p>
180
-
181
152
  </div>
182
153
  </div>
183
-
184
154
  </section>
185
-
186
155
 
187
-
156
+
188
157
  <section id="public-class-5Buntitled-5D-method-details" class="method-section">
189
158
  <header>
190
159
  <h3>Public Class Methods</h3>
191
160
  </header>
192
161
 
193
-
194
162
  <div id="method-c-config" class="method-detail ">
195
-
196
163
  <div class="method-heading">
197
164
  <span class="method-name">config</span><span
198
165
  class="method-args">()</span>
199
-
200
166
  <span class="method-click-advice">click to toggle source</span>
201
-
202
167
  </div>
203
-
204
168
 
205
169
  <div class="method-description">
206
-
207
170
  <p>Access to the class&#39;s configuration.</p>
208
171
 
209
172
  <p>@return [StandupMD::Config::Cli]</p>
210
-
211
-
212
173
 
213
-
214
174
  <div class="method-source-code" id="config-source">
215
175
  <pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 16</span>
216
176
  <span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">config</span>
217
177
  <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
178
  <span class="ruby-keyword">end</span></pre>
219
179
  </div>
220
-
221
180
  </div>
222
181
 
223
-
224
182
 
225
-
226
183
  </div>
227
184
 
228
-
229
185
  <div id="method-c-echo" class="method-detail ">
230
-
231
186
  <div class="method-heading">
232
187
  <span class="method-name">echo</span><span
233
188
  class="method-args">(msg)</span>
234
-
235
189
  <span class="method-click-advice">click to toggle source</span>
236
-
237
190
  </div>
238
-
239
191
 
240
192
  <div class="method-description">
241
-
242
193
  <p>Prints output if <code>verbose</code> is true.</p>
243
194
 
244
195
  <p>@return [nil]</p>
245
-
246
-
247
196
 
248
-
249
197
  <div class="method-source-code" id="echo-source">
250
198
  <pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 24</span>
251
199
  <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
200
  <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
201
  <span class="ruby-keyword">end</span></pre>
254
202
  </div>
255
-
256
203
  </div>
257
204
 
258
-
259
205
 
260
-
261
206
  </div>
262
207
 
263
-
264
208
  <div id="method-c-execute" class="method-detail ">
265
-
266
209
  <div class="method-heading">
267
210
  <span class="method-name">execute</span><span
268
211
  class="method-args">(options = [])</span>
269
-
270
212
  <span class="method-click-advice">click to toggle source</span>
271
-
272
213
  </div>
273
-
274
214
 
275
215
  <div class="method-description">
276
-
277
216
  <p>Creates an instance of <code>StandupMD</code> and runs what the user requested.</p>
278
-
279
-
280
217
 
281
-
282
218
  <div class="method-source-code" id="execute-source">
283
219
  <pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 30</span>
284
220
  <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
- <span class="ruby-identifier">exe</span> = <span class="ruby-identifier">new</span>(<span class="ruby-identifier">options</span>)
286
-
287
- <span class="ruby-identifier">exe</span>.<span class="ruby-identifier">write_file</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">write</span>
288
- <span class="ruby-keyword">if</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">print</span>
289
- <span class="ruby-identifier">exe</span>.<span class="ruby-identifier">print</span>(<span class="ruby-identifier">exe</span>.<span class="ruby-identifier">entry</span>)
290
- <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">edit</span>
291
- <span class="ruby-identifier">exe</span>.<span class="ruby-identifier">edit</span>
221
+ <span class="ruby-identifier">new</span>(<span class="ruby-identifier">options</span>).<span class="ruby-identifier">tap</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">exe</span><span class="ruby-operator">|</span>
222
+ <span class="ruby-identifier">exe</span>.<span class="ruby-identifier">write_file</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">write</span>
223
+ <span class="ruby-keyword">if</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">print</span>
224
+ <span class="ruby-identifier">exe</span>.<span class="ruby-identifier">print</span>(<span class="ruby-identifier">exe</span>.<span class="ruby-identifier">entry</span>)
225
+ <span class="ruby-keyword">elsif</span> <span class="ruby-identifier">config</span>.<span class="ruby-identifier">edit</span>
226
+ <span class="ruby-identifier">exe</span>.<span class="ruby-identifier">edit</span>
227
+ <span class="ruby-keyword">end</span>
292
228
  <span class="ruby-keyword">end</span>
293
229
  <span class="ruby-keyword">end</span></pre>
294
230
  </div>
295
-
296
231
  </div>
297
232
 
298
-
299
233
 
300
-
301
234
  </div>
302
235
 
303
-
304
236
  <div id="method-c-new" class="method-detail ">
305
-
306
237
  <div class="method-heading">
307
238
  <span class="method-name">new</span><span
308
239
  class="method-args">(options = [], load_config = true)</span>
309
-
310
240
  <span class="method-click-advice">click to toggle source</span>
311
-
312
241
  </div>
313
-
314
242
 
315
243
  <div class="method-description">
316
-
317
244
  <p>Constructor. Sets defaults.</p>
318
245
 
319
246
  <p>@param [Array] options</p>
320
-
321
-
322
247
 
323
-
324
248
  <div class="method-source-code" id="new-source">
325
249
  <pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 63</span>
326
250
  <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>)
@@ -334,78 +258,53 @@
334
258
  <span class="ruby-ivar">@entry</span> = <span class="ruby-identifier">new_entry</span>(<span class="ruby-ivar">@file</span>)
335
259
  <span class="ruby-keyword">end</span></pre>
336
260
  </div>
337
-
338
261
  </div>
339
262
 
340
-
341
263
 
342
-
343
264
  </div>
344
265
 
345
-
346
266
  </section>
347
-
267
+
348
268
  <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
349
269
  <header>
350
270
  <h3>Public Instance Methods</h3>
351
271
  </header>
352
272
 
353
-
354
273
  <div id="method-i-echo" class="method-detail ">
355
-
356
274
  <div class="method-heading">
357
275
  <span class="method-name">echo</span><span
358
276
  class="method-args">(msg)</span>
359
-
360
277
  <span class="method-click-advice">click to toggle source</span>
361
-
362
278
  </div>
363
-
364
279
 
365
280
  <div class="method-description">
366
-
367
281
  <p>Quick access to <a href="Cli.html#method-c-echo"><code>Cli.echo</code></a>.</p>
368
282
 
369
283
  <p>@return [nil]</p>
370
-
371
-
372
284
 
373
-
374
285
  <div class="method-source-code" id="echo-source">
375
286
  <pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 117</span>
376
287
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">echo</span>(<span class="ruby-identifier">msg</span>)
377
288
  <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
289
  <span class="ruby-keyword">end</span></pre>
379
290
  </div>
380
-
381
291
  </div>
382
292
 
383
-
384
293
 
385
-
386
294
  </div>
387
295
 
388
-
389
296
  <div id="method-i-edit" class="method-detail ">
390
-
391
297
  <div class="method-heading">
392
298
  <span class="method-name">edit</span><span
393
299
  class="method-args">()</span>
394
-
395
300
  <span class="method-click-advice">click to toggle source</span>
396
-
397
301
  </div>
398
-
399
302
 
400
303
  <div class="method-description">
401
-
402
304
  <p>Opens the file in an editor. Abandons the script.</p>
403
305
 
404
306
  <p>@return [nil]</p>
405
-
406
-
407
307
 
408
-
409
308
  <div class="method-source-code" id="edit-source">
410
309
  <pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 99</span>
411
310
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">edit</span>
@@ -413,35 +312,23 @@
413
312
  <span class="ruby-identifier">exec</span>(<span class="ruby-node">&quot;#{@config.editor} #{file.name}&quot;</span>)
414
313
  <span class="ruby-keyword">end</span></pre>
415
314
  </div>
416
-
417
315
  </div>
418
316
 
419
-
420
317
 
421
-
422
318
  </div>
423
319
 
424
-
425
320
  <div id="method-i-load_preferences" class="method-detail ">
426
-
427
321
  <div class="method-heading">
428
322
  <span class="method-name">load_preferences</span><span
429
323
  class="method-args">()</span>
430
-
431
324
  <span class="method-click-advice">click to toggle source</span>
432
-
433
325
  </div>
434
-
435
326
 
436
327
  <div class="method-description">
437
-
438
328
  <p>Load the preference file.</p>
439
329
 
440
330
  <p>@return [nil]</p>
441
-
442
-
443
331
 
444
-
445
332
  <div class="method-source-code" id="load_preferences-source">
446
333
  <pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 78</span>
447
334
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">load_preferences</span>
@@ -453,70 +340,46 @@
453
340
  <span class="ruby-keyword">end</span>
454
341
  <span class="ruby-keyword">end</span></pre>
455
342
  </div>
456
-
457
343
  </div>
458
344
 
459
-
460
345
 
461
-
462
346
  </div>
463
347
 
464
-
465
348
  <div id="method-i-preference_file_loaded-3F" class="method-detail ">
466
-
467
349
  <div class="method-heading">
468
350
  <span class="method-name">preference_file_loaded?</span><span
469
351
  class="method-args">()</span>
470
-
471
352
  <span class="method-click-advice">click to toggle source</span>
472
-
473
353
  </div>
474
-
475
354
 
476
355
  <div class="method-description">
477
-
478
356
  <p>Has the preference file been loaded?</p>
479
357
 
480
358
  <p>@return boolean</p>
481
-
482
-
483
359
 
484
-
485
360
  <div class="method-source-code" id="preference_file_loaded-3F-source">
486
361
  <pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 91</span>
487
362
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">preference_file_loaded?</span>
488
363
  <span class="ruby-ivar">@preference_file_loaded</span>
489
364
  <span class="ruby-keyword">end</span></pre>
490
365
  </div>
491
-
492
366
  </div>
493
367
 
494
-
495
368
 
496
-
497
369
  </div>
498
370
 
499
-
500
371
  <div id="method-i-write_file" class="method-detail ">
501
-
502
372
  <div class="method-heading">
503
373
  <span class="method-name">write_file</span><span
504
374
  class="method-args">()</span>
505
-
506
375
  <span class="method-click-advice">click to toggle source</span>
507
-
508
376
  </div>
509
-
510
377
 
511
378
  <div class="method-description">
512
-
513
379
  <p>Writes entries to the file.</p>
514
380
 
515
381
  <p>@return [Boolean] true if file was written</p>
516
-
517
-
518
382
 
519
-
520
383
  <div class="method-source-code" id="write_file-source">
521
384
  <pre><span class="ruby-comment"># File lib/standup_md/cli.rb, line 108</span>
522
385
  <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">write_file</span>
@@ -524,25 +387,20 @@
524
387
  <span class="ruby-identifier">file</span>.<span class="ruby-identifier">write</span>
525
388
  <span class="ruby-keyword">end</span></pre>
526
389
  </div>
527
-
528
390
  </div>
529
391
 
530
-
531
392
 
532
-
533
393
  </div>
534
394
 
535
-
536
395
  </section>
537
-
538
- </section>
539
396
 
397
+ </section>
540
398
  </main>
541
399
 
542
400
 
543
401
  <footer id="validator-badges" role="contentinfo">
544
402
  <p><a href="https://validator.w3.org/check/referer">Validate</a>
545
- <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.2.1.
403
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.0.
546
404
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
547
405
  </footer>
548
406