standup_md 0.3.0 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +37 -19
- data/doc/README_md.html +35 -30
- data/doc/StandupMD.html +3 -7
- data/doc/StandupMD/Cli/Helpers.html +4 -4
- data/doc/StandupMD/Config.html +1 -1
- data/doc/StandupMD/Config/Cli.html +29 -20
- data/doc/StandupMD/Config/Entry.html +26 -14
- data/doc/StandupMD/Config/EntryList.html +26 -11
- data/doc/StandupMD/Config/File.html +30 -26
- data/doc/StandupMD/Entry.html +7 -7
- data/doc/StandupMD/EntryList.html +116 -194
- data/doc/StandupMD/File.html +51 -11
- data/doc/created.rid +15 -15
- data/doc/index.html +33 -30
- data/doc/js/search_index.js +1 -1
- data/doc/js/search_index.js.gz +0 -0
- data/doc/table_of_contents.html +41 -44
- data/lib/standup_md.rb +2 -2
- data/lib/standup_md/cli/helpers.rb +29 -5
- data/lib/standup_md/config.rb +2 -0
- data/lib/standup_md/config/cli.rb +25 -22
- data/lib/standup_md/config/entry.rb +15 -8
- data/lib/standup_md/config/entry_list.rb +10 -5
- data/lib/standup_md/config/file.rb +26 -16
- data/lib/standup_md/entry.rb +2 -1
- data/lib/standup_md/entry_list.rb +23 -40
- data/lib/standup_md/file.rb +14 -3
- data/lib/standup_md/version.rb +2 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd735414b7813027d5cf22c4296befd4f0f2b5d7e0276c9aa875d913bd69f560
|
4
|
+
data.tar.gz: 5c5bdf62d893c182d5137b46634841f0d576e2798baa918b84b1344d8232890f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1793f0a0b80bcc58ed60c7be24409609aa0b9ccc6f7c1dd26237f1a6b9584219c933b87c60fb1c3c32a2c40aa3e2ba480b1b01541b6a2b91dff8f25c058abd13
|
7
|
+
data.tar.gz: 688cbf9c52807916da3f9320fff8665a2eec816ca86480cd491619541514f858f14a46d365bf99cbadf52dc355d44d8c3915b21303249b87a207958da4cd875c
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
standup_md (0.3.
|
4
|
+
standup_md (0.3.4)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -13,7 +13,7 @@ GEM
|
|
13
13
|
docile (~> 1.1)
|
14
14
|
simplecov-html (~> 0.11)
|
15
15
|
simplecov-html (0.12.2)
|
16
|
-
test-unit (3.3.
|
16
|
+
test-unit (3.3.6)
|
17
17
|
power_assert
|
18
18
|
|
19
19
|
PLATFORMS
|
data/README.md
CHANGED
@@ -28,6 +28,8 @@ View on: [Github](https://github.com/evanthegrayt/standup_md) |
|
|
28
28
|
- [Using existing standup files](#using-existing-standup-files)
|
29
29
|
- [API](#api)
|
30
30
|
- [API Examples](#api-examples)
|
31
|
+
- [Adding an entry for today](#adding-an-entry-for-today)
|
32
|
+
- [Finding a past entry](#finding-a-past-entry)
|
31
33
|
- [Documentation](https://evanthegrayt.github.io/standup_md/doc/index.html)
|
32
34
|
- [Reporting Bugs and Requesting Features](#reporting-bugs-and-requesting-features)
|
33
35
|
- [Self-Promotion](#self-promotion)
|
@@ -49,6 +51,11 @@ entry exists, it will be added to today's entry as your previous day's work. See
|
|
49
51
|
in your own code somehow.
|
50
52
|
|
51
53
|
## Installation
|
54
|
+
If you don't have the permissions to install system-wide gems, you're probabaly
|
55
|
+
also running an older version of ruby. I recommend installing
|
56
|
+
[rbenv](https://github.com/rbenv/rbenv#installation), and then installing an
|
57
|
+
up-to-date version of ruby.
|
58
|
+
|
52
59
|
### Via RubyGems
|
53
60
|
Just install the gem!
|
54
61
|
|
@@ -76,7 +83,7 @@ rake install
|
|
76
83
|
|
77
84
|
## Usage
|
78
85
|
### Command Line
|
79
|
-
For the most basic usage,
|
86
|
+
For the most basic usage, simply call the executable.
|
80
87
|
|
81
88
|
```sh
|
82
89
|
standup
|
@@ -132,7 +139,7 @@ result to the command line, you could use the following.
|
|
132
139
|
|
133
140
|
#### Add entry to file without opening it
|
134
141
|
```sh
|
135
|
-
standup --no-edit --current "Work on this thing","And another thing"
|
142
|
+
standup --no-edit --current "Work on this thing","And another thing"
|
136
143
|
```
|
137
144
|
|
138
145
|
#### Find an entry by date and print it.
|
@@ -167,6 +174,8 @@ them again.
|
|
167
174
|
|
168
175
|
|
169
176
|
#### Available Config File Options and Defaults
|
177
|
+
For command-line usage, this file needs to be named `~/.standuprc`. To use in a
|
178
|
+
rails project, create an initializer (`config/initializers/standup_md.rb`).
|
170
179
|
|
171
180
|
```ruby
|
172
181
|
StandupMD.configure do |c|
|
@@ -205,7 +214,14 @@ StandupMD.configure do |c|
|
|
205
214
|
end
|
206
215
|
```
|
207
216
|
|
217
|
+
Any options not set in this file will retain their default values. Note that if
|
218
|
+
you change `file_name_format`, and don't use a month or year, there will only
|
219
|
+
ever be one standup file. This could cause issues long-term, as the files will
|
220
|
+
get large over time and possibly cause performance issues.
|
221
|
+
|
222
|
+
|
208
223
|
#### Executable Flags
|
224
|
+
Some of these options can be changed at runtime. They are as follows.
|
209
225
|
```
|
210
226
|
--current ARRAY List of current entry's tasks
|
211
227
|
--previous ARRAY List of precious entry's tasks
|
@@ -224,11 +240,6 @@ end
|
|
224
240
|
DATE must be in the same format as file-name-format
|
225
241
|
```
|
226
242
|
|
227
|
-
Any options not set in this file will retain their default values. Note that if
|
228
|
-
you change `file_name_format`, and don't use a month or year, there will only
|
229
|
-
ever be one standup file. This could cause issues long-term, as the files will
|
230
|
-
get large over time and possibly cause performance issues.
|
231
|
-
|
232
243
|
#### Using Existing Standup Files
|
233
244
|
If you already have a directory of existing standup files, you can use them, but
|
234
245
|
they must be in a format that the parser can understand. The default is:
|
@@ -267,30 +278,29 @@ Your `~/.standuprc` should contain:
|
|
267
278
|
|
268
279
|
```ruby
|
269
280
|
StandupMD.configure do |c|
|
270
|
-
c.file.header_depth
|
271
|
-
c.file.sub_header_depth
|
272
|
-
c.file.current_header
|
273
|
-
c.file.previous_header
|
274
|
-
c.file.impediments_header
|
275
|
-
c.file.bullet_character
|
276
|
-
c.file.header_date_format
|
277
|
-
c.file.sub_header_order
|
281
|
+
c.file.header_depth = 2
|
282
|
+
c.file.sub_header_depth = 3
|
283
|
+
c.file.current_header = 'Today'
|
284
|
+
c.file.previous_header = 'Yesterday'
|
285
|
+
c.file.impediments_header = 'Hold-ups'
|
286
|
+
c.file.bullet_character = '*'
|
287
|
+
c.file.header_date_format = '%m/%d/%Y'
|
288
|
+
c.file.sub_header_order = %w[current previous impediments notes]
|
278
289
|
end
|
279
290
|
```
|
280
291
|
|
281
292
|
## API
|
282
293
|
The API is fully documented in the
|
283
|
-
[
|
294
|
+
[RDoc Documentation](https://evanthegrayt.github.io/standup_md/doc/index.html).
|
284
295
|
|
285
296
|
This was mainly written as a command line utility, but the API is ridiculously
|
286
297
|
robust, and is available for use in your own projects. A quick example of how
|
287
298
|
to write a new entry via code could look like the following:
|
288
299
|
|
289
300
|
### API Examples
|
290
|
-
|
301
|
+
#### Adding an entry for today
|
291
302
|
```ruby
|
292
303
|
require 'standup_md'
|
293
|
-
require 'date'
|
294
304
|
|
295
305
|
StandupMD.configure do |c|
|
296
306
|
c.file.current_header = 'Today',
|
@@ -307,7 +317,6 @@ API fit together. The code can actually be simplified to the following.
|
|
307
317
|
|
308
318
|
```ruby
|
309
319
|
require 'standup_md'
|
310
|
-
require 'date'
|
311
320
|
|
312
321
|
StandupMD.configure do |c|
|
313
322
|
c.file.current_header = 'Today',
|
@@ -317,6 +326,15 @@ end
|
|
317
326
|
StandupMD::File.find_by_date(Date.today).load.write
|
318
327
|
```
|
319
328
|
|
329
|
+
#### Finding a past entry
|
330
|
+
```ruby
|
331
|
+
require 'standup_md'
|
332
|
+
|
333
|
+
date = Date.new(2020, 04, 15)
|
334
|
+
file = StandupMD::File.find_by_date(date).load
|
335
|
+
entry = file.entries.find(date)
|
336
|
+
```
|
337
|
+
|
320
338
|
## Reporting Bugs and Requesting Features
|
321
339
|
If you have an idea or find a bug, please [create an
|
322
340
|
issue](https://github.com/evanthegrayt/standup_md/issues/new). Just make sure the topic
|
data/doc/README_md.html
CHANGED
@@ -79,6 +79,8 @@
|
|
79
79
|
<li><a href="#label-Using+Existing+Standup+Files">Using Existing Standup Files</a>
|
80
80
|
<li><a href="#label-API">API</a>
|
81
81
|
<li><a href="#label-API+Examples">API Examples</a>
|
82
|
+
<li><a href="#label-Adding+an+entry+for+today">Adding an entry for today</a>
|
83
|
+
<li><a href="#label-Finding+a+past+entry">Finding a past entry</a>
|
82
84
|
<li><a href="#label-Reporting+Bugs+and+Requesting+Features">Reporting Bugs and Requesting Features</a>
|
83
85
|
<li><a href="#label-Self-Promotion">Self-Promotion</a>
|
84
86
|
</ul>
|
@@ -146,6 +148,10 @@
|
|
146
148
|
<ul><li>
|
147
149
|
<p><a href="#api-examples">API Examples</a></p>
|
148
150
|
</li><li>
|
151
|
+
<p><a href="#adding-an-entry-for-today">Adding an entry for today</a></p>
|
152
|
+
</li><li>
|
153
|
+
<p><a href="#finding-a-past-entry">Finding a past entry</a></p>
|
154
|
+
</li><li>
|
149
155
|
<p><a href="https://evanthegrayt.github.io/standup_md/doc/index.html">Documentation</a></p>
|
150
156
|
</li></ul>
|
151
157
|
</li><li>
|
@@ -162,6 +168,8 @@
|
|
162
168
|
|
163
169
|
<h2 id="label-Installation">Installation<span><a href="#label-Installation">¶</a> <a href="#top">↑</a></span></h2>
|
164
170
|
|
171
|
+
<p>If you don't have the permissions to install system-wide gems, you're probabaly also running an older version of ruby. I recommend installing <a href="https://github.com/rbenv/rbenv#installation">rbenv</a>, and then installing an up-to-date version of ruby.</p>
|
172
|
+
|
165
173
|
<h3 id="label-Via+RubyGems">Via RubyGems<span><a href="#label-Via+RubyGems">¶</a> <a href="#top">↑</a></span></h3>
|
166
174
|
|
167
175
|
<p>Just install the gem!</p>
|
@@ -188,7 +196,7 @@ rake install
|
|
188
196
|
|
189
197
|
<h3 id="label-Command+Line">Command Line<span><a href="#label-Command+Line">¶</a> <a href="#top">↑</a></span></h3>
|
190
198
|
|
191
|
-
<p>For the most basic usage,
|
199
|
+
<p>For the most basic usage, simply call the executable.</p>
|
192
200
|
|
193
201
|
<pre class="ruby"><span class="ruby-identifier">standup</span>
|
194
202
|
</pre>
|
@@ -232,7 +240,7 @@ rake install
|
|
232
240
|
|
233
241
|
<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">¶</a> <a href="#top">↑</a></span></h4>
|
234
242
|
|
235
|
-
<pre>standup --no-edit --current "Work on this thing","And another thing"
|
243
|
+
<pre>standup --no-edit --current "Work on this thing","And another thing"</pre>
|
236
244
|
|
237
245
|
<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.">¶</a> <a href="#top">↑</a></span></h4>
|
238
246
|
|
@@ -250,6 +258,8 @@ rake install
|
|
250
258
|
|
251
259
|
<h4 id="label-Available+Config+File+Options+and+Defaults">Available Config File Options and Defaults<span><a href="#label-Available+Config+File+Options+and+Defaults">¶</a> <a href="#top">↑</a></span></h4>
|
252
260
|
|
261
|
+
<p>For command-line usage, this file needs to be named <code>~/.standuprc</code>. To use in a rails project, create an initializer (<code>config/initializers/standup_md.rb</code>).</p>
|
262
|
+
|
253
263
|
<pre class="ruby"><span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">configure</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
|
254
264
|
<span class="ruby-comment"># Defaults for how the file is formatted.</span>
|
255
265
|
<span class="ruby-comment"># See https://evanthegrayt.github.io/standup_md/doc/StandupMD/Config/Cli.html</span>
|
@@ -286,25 +296,11 @@ rake install
|
|
286
296
|
<span class="ruby-keyword">end</span>
|
287
297
|
</pre>
|
288
298
|
|
289
|
-
<
|
299
|
+
<p>Any options not set in this file will retain their default values. Note that if you change <code>file_name_format</code>, and don't use a month or year, there will only ever be one standup file. This could cause issues long-term, as the files will get large over time and possibly cause performance issues.</p>
|
290
300
|
|
291
|
-
<
|
292
|
-
--previous ARRAY List of precious entry's tasks
|
293
|
-
--impediments ARRAY List of impediments for current entry
|
294
|
-
--notes ARRAY List of notes for current entry
|
295
|
-
--sub-header-order ARRAY The order of the sub-headers when writing the file
|
296
|
-
-f, --file-name-format STRING Date-formattable string to use for standup file name
|
297
|
-
-E, --editor EDITOR Editor to use for opening standup files
|
298
|
-
-d, --directory DIRECTORY The directories where standup files are located
|
299
|
-
-w --[no-]write Write current entry if it doesn't exist. Default is true
|
300
|
-
-a --[no-]auto-fill-previous Auto-generate 'previous' tasks for new entries
|
301
|
-
-e --[no-]edit Open the file in the editor. Default is true
|
302
|
-
-v, --[no-]verbose Verbose output. Default is false.
|
303
|
-
-p, --print [DATE] Print current entry.
|
304
|
-
If DATE is passed, will print entry for DATE, if it exists.
|
305
|
-
DATE must be in the same format as file-name-format</pre>
|
301
|
+
<h4 id="label-Executable+Flags">Executable Flags<span><a href="#label-Executable+Flags">¶</a> <a href="#top">↑</a></span></h4>
|
306
302
|
|
307
|
-
<p>
|
303
|
+
<p>Some of these options can be changed at runtime. They are as follows. <code> --current ARRAY List of current entry's tasks --previous ARRAY List of precious entry's tasks --impediments ARRAY List of impediments for current entry --notes ARRAY List of notes for current entry --sub-header-order ARRAY The order of the sub-headers when writing the file -f, --file-name-format STRING Date-formattable string to use for standup file name -E, --editor EDITOR Editor to use for opening standup files -d, --directory DIRECTORY The directories where standup files are located -w --[no-]write Write current entry if it doesn't exist. Default is true -a --[no-]auto-fill-previous Auto-generate 'previous' tasks for new entries -e --[no-]edit Open the file in the editor. Default is true -v, --[no-]verbose Verbose output. Default is false. -p, --print [DATE] Print current entry. If DATE is passed, will print entry for DATE, if it exists. DATE must be in the same format as file-name-format </code></p>
|
308
304
|
|
309
305
|
<h4 id="label-Using+Existing+Standup+Files">Using Existing Standup Files<span><a href="#label-Using+Existing+Standup+Files">¶</a> <a href="#top">↑</a></span></h4>
|
310
306
|
|
@@ -337,27 +333,28 @@ rake install
|
|
337
333
|
<p>Your <code>~/.standuprc</code> should contain:</p>
|
338
334
|
|
339
335
|
<pre class="ruby"><span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">configure</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
|
340
|
-
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">header_depth</span>
|
341
|
-
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">sub_header_depth</span>
|
342
|
-
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">current_header</span>
|
343
|
-
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">previous_header</span>
|
344
|
-
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">impediments_header</span>
|
345
|
-
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">bullet_character</span>
|
346
|
-
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">header_date_format</span>
|
347
|
-
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">sub_header_order</span>
|
336
|
+
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">header_depth</span> = <span class="ruby-value">2</span>
|
337
|
+
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">sub_header_depth</span> = <span class="ruby-value">3</span>
|
338
|
+
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">current_header</span> = <span class="ruby-string">'Today'</span>
|
339
|
+
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">previous_header</span> = <span class="ruby-string">'Yesterday'</span>
|
340
|
+
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">impediments_header</span> = <span class="ruby-string">'Hold-ups'</span>
|
341
|
+
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">bullet_character</span> = <span class="ruby-string">'*'</span>
|
342
|
+
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">header_date_format</span> = <span class="ruby-string">'%m/%d/%Y'</span>
|
343
|
+
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">sub_header_order</span> = <span class="ruby-node">%w[current previous impediments notes]</span>
|
348
344
|
<span class="ruby-keyword">end</span>
|
349
345
|
</pre>
|
350
346
|
|
351
347
|
<h2 id="label-API">API<span><a href="#label-API">¶</a> <a href="#top">↑</a></span></h2>
|
352
348
|
|
353
|
-
<p>The API is fully documented in the <a href="https://evanthegrayt.github.io/standup_md/doc/index.html">
|
349
|
+
<p>The API is fully documented in the <a href="https://evanthegrayt.github.io/standup_md/doc/index.html">RDoc Documentation</a>.</p>
|
354
350
|
|
355
351
|
<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>
|
356
352
|
|
357
353
|
<h3 id="label-API+Examples">API Examples<span><a href="#label-API+Examples">¶</a> <a href="#top">↑</a></span></h3>
|
358
354
|
|
355
|
+
<h4 id="label-Adding+an+entry+for+today">Adding an entry for today<span><a href="#label-Adding+an+entry+for+today">¶</a> <a href="#top">↑</a></span></h4>
|
356
|
+
|
359
357
|
<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'standup_md'</span>
|
360
|
-
<span class="ruby-identifier">require</span> <span class="ruby-string">'date'</span>
|
361
358
|
|
362
359
|
<span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">configure</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
|
363
360
|
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">current_header</span> = <span class="ruby-string">'Today'</span>,
|
@@ -372,7 +369,6 @@ rake install
|
|
372
369
|
<p>The above example was written as such to show how the different pieces of the API fit together. The code can actually be simplified to the following.</p>
|
373
370
|
|
374
371
|
<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'standup_md'</span>
|
375
|
-
<span class="ruby-identifier">require</span> <span class="ruby-string">'date'</span>
|
376
372
|
|
377
373
|
<span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">configure</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
|
378
374
|
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">current_header</span> = <span class="ruby-string">'Today'</span>,
|
@@ -382,6 +378,15 @@ rake install
|
|
382
378
|
<span class="ruby-constant">StandupMD</span><span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">find_by_date</span>(<span class="ruby-constant">Date</span>.<span class="ruby-identifier">today</span>).<span class="ruby-identifier">load</span>.<span class="ruby-identifier">write</span>
|
383
379
|
</pre>
|
384
380
|
|
381
|
+
<h4 id="label-Finding+a+past+entry">Finding a past entry<span><a href="#label-Finding+a+past+entry">¶</a> <a href="#top">↑</a></span></h4>
|
382
|
+
|
383
|
+
<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'standup_md'</span>
|
384
|
+
|
385
|
+
<span class="ruby-identifier">date</span> = <span class="ruby-constant">Date</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value">2020</span>, <span class="ruby-value">04</span>, <span class="ruby-value">15</span>)
|
386
|
+
<span class="ruby-identifier">file</span> = <span class="ruby-constant">StandupMD</span><span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">find_by_date</span>(<span class="ruby-identifier">date</span>).<span class="ruby-identifier">load</span>
|
387
|
+
<span class="ruby-identifier">entry</span> = <span class="ruby-identifier">file</span>.<span class="ruby-identifier">entries</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">date</span>)
|
388
|
+
</pre>
|
389
|
+
|
385
390
|
<h2 id="label-Reporting+Bugs+and+Requesting+Features">Reporting Bugs and Requesting Features<span><a href="#label-Reporting+Bugs+and+Requesting+Features">¶</a> <a href="#top">↑</a></span></h2>
|
386
391
|
|
387
392
|
<p>If you have an idea or find a bug, please <a href="https://github.com/evanthegrayt/standup_md/issues/new">create an issue</a>. Just make sure the topic doesn't already exist. Better yet, you can always submit a Pull Request.</p>
|
data/doc/StandupMD.html
CHANGED
@@ -91,7 +91,7 @@
|
|
91
91
|
|
92
92
|
<section class="description">
|
93
93
|
|
94
|
-
<p>The
|
94
|
+
<p>The main module for the gem. Provides access to configuration classes.</p>
|
95
95
|
|
96
96
|
</section>
|
97
97
|
|
@@ -112,11 +112,7 @@
|
|
112
112
|
|
113
113
|
<dd><p>The gem verision</p>
|
114
114
|
|
115
|
-
<p>@
|
116
|
-
|
117
|
-
<pre class="ruby"><span class="ruby-constant">StandupMD</span><span class="ruby-operator">::</span><span class="ruby-constant">VERSION</span>
|
118
|
-
<span class="ruby-comment"># => '0.3.0'</span>
|
119
|
-
</pre>
|
115
|
+
<p>@return [String]</p>
|
120
116
|
|
121
117
|
|
122
118
|
</dl>
|
@@ -145,7 +141,7 @@
|
|
145
141
|
|
146
142
|
<div class="method-description">
|
147
143
|
|
148
|
-
<p>
|
144
|
+
<p>Method for accessing the configuration.</p>
|
149
145
|
|
150
146
|
<p>@return [StanupMD::Cli]</p>
|
151
147
|
|
@@ -133,11 +133,11 @@
|
|
133
133
|
<span class="ruby-identifier">puts</span> <span class="ruby-node">"No record found for #{StandupMD.config.cli.date}"</span>
|
134
134
|
<span class="ruby-keyword">return</span>
|
135
135
|
<span class="ruby-keyword">end</span>
|
136
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-
|
137
|
-
<span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">sub_header_order</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">
|
138
|
-
<span class="ruby-identifier">tasks</span> = <span class="ruby-identifier">entry</span>.<span class="ruby-identifier">
|
136
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">header</span>(<span class="ruby-identifier">entry</span>)
|
137
|
+
<span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">sub_header_order</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">header_type</span><span class="ruby-operator">|</span>
|
138
|
+
<span class="ruby-identifier">tasks</span> = <span class="ruby-identifier">entry</span>.<span class="ruby-identifier">public_send</span>(<span class="ruby-identifier">header_type</span>)
|
139
139
|
<span class="ruby-keyword">next</span> <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">tasks</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">empty?</span>
|
140
|
-
<span class="ruby-identifier">puts</span> <span class="ruby-
|
140
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">sub_header</span>(<span class="ruby-identifier">header_type</span>)
|
141
141
|
<span class="ruby-identifier">tasks</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">task</span><span class="ruby-operator">|</span> <span class="ruby-identifier">puts</span> <span class="ruby-constant">StandupMD</span>.<span class="ruby-identifier">config</span>.<span class="ruby-identifier">file</span>.<span class="ruby-identifier">bullet_character</span> <span class="ruby-operator">+</span> <span class="ruby-string">' '</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">task</span> }
|
142
142
|
<span class="ruby-keyword">end</span>
|
143
143
|
<span class="ruby-identifier">puts</span>
|
data/doc/StandupMD/Config.html
CHANGED
@@ -198,7 +198,7 @@
|
|
198
198
|
|
199
199
|
|
200
200
|
<div class="method-source-code" id="new-source">
|
201
|
-
<pre><span class="ruby-comment"># File lib/standup_md/config.rb, line
|
201
|
+
<pre><span class="ruby-comment"># File lib/standup_md/config.rb, line 40</span>
|
202
202
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>
|
203
203
|
<span class="ruby-ivar">@cli</span> = <span class="ruby-constant">StandupMD</span><span class="ruby-operator">::</span><span class="ruby-constant">Config</span><span class="ruby-operator">::</span><span class="ruby-constant">Cli</span>.<span class="ruby-identifier">new</span>
|
204
204
|
<span class="ruby-ivar">@file</span> = <span class="ruby-constant">StandupMD</span><span class="ruby-operator">::</span><span class="ruby-constant">Config</span><span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>
|
@@ -77,7 +77,7 @@
|
|
77
77
|
|
78
78
|
<li ><a href="#method-c-new">::new</a>
|
79
79
|
|
80
|
-
<li ><a href="#method-i-
|
80
|
+
<li ><a href="#method-i-reset">#reset</a>
|
81
81
|
|
82
82
|
</ul>
|
83
83
|
</div>
|
@@ -103,6 +103,22 @@
|
|
103
103
|
|
104
104
|
|
105
105
|
|
106
|
+
<section class="constants-list">
|
107
|
+
<header>
|
108
|
+
<h3>Constants</h3>
|
109
|
+
</header>
|
110
|
+
<dl>
|
111
|
+
|
112
|
+
<dt id="DEFAULTS">DEFAULTS
|
113
|
+
|
114
|
+
<dd><p>The default options.</p>
|
115
|
+
|
116
|
+
<p>@return [Hash]</p>
|
117
|
+
|
118
|
+
|
119
|
+
</dl>
|
120
|
+
</section>
|
121
|
+
|
106
122
|
|
107
123
|
|
108
124
|
<section class="attribute-method-details" class="method-section">
|
@@ -136,7 +152,7 @@
|
|
136
152
|
|
137
153
|
<div class="method-description">
|
138
154
|
|
139
|
-
<p>The date to use to find the
|
155
|
+
<p>The date to use to find the entry.</p>
|
140
156
|
|
141
157
|
<p>@param [Date] date</p>
|
142
158
|
|
@@ -204,7 +220,7 @@
|
|
204
220
|
|
205
221
|
<div class="method-description">
|
206
222
|
|
207
|
-
<p>Should the cli print the entry?</p>
|
223
|
+
<p>Should the cli print the entry to the command line?</p>
|
208
224
|
|
209
225
|
<p>@param [Boolean] print</p>
|
210
226
|
|
@@ -238,7 +254,7 @@
|
|
238
254
|
|
239
255
|
<div class="method-description">
|
240
256
|
|
241
|
-
<p>Should the cli write the file?</p>
|
257
|
+
<p>Should the cli automatically write the new entry to the file?</p>
|
242
258
|
|
243
259
|
<p>@param [Boolean] write</p>
|
244
260
|
|
@@ -276,9 +292,9 @@
|
|
276
292
|
|
277
293
|
|
278
294
|
<div class="method-source-code" id="new-source">
|
279
|
-
<pre><span class="ruby-comment"># File lib/standup_md/config/cli.rb, line
|
295
|
+
<pre><span class="ruby-comment"># File lib/standup_md/config/cli.rb, line 96</span>
|
280
296
|
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>
|
281
|
-
<span class="ruby-identifier">
|
297
|
+
<span class="ruby-identifier">reset</span>
|
282
298
|
<span class="ruby-keyword">end</span></pre>
|
283
299
|
</div>
|
284
300
|
|
@@ -298,10 +314,10 @@
|
|
298
314
|
</header>
|
299
315
|
|
300
316
|
|
301
|
-
<div id="method-i-
|
317
|
+
<div id="method-i-reset" class="method-detail ">
|
302
318
|
|
303
319
|
<div class="method-heading">
|
304
|
-
<span class="method-name">
|
320
|
+
<span class="method-name">reset</span><span
|
305
321
|
class="method-args">()</span>
|
306
322
|
|
307
323
|
<span class="method-click-advice">click to toggle source</span>
|
@@ -313,22 +329,15 @@
|
|
313
329
|
|
314
330
|
<p>Sets all config values back to their defaults.</p>
|
315
331
|
|
316
|
-
<p>@return [
|
332
|
+
<p>@return [Hash]</p>
|
317
333
|
|
318
334
|
|
319
335
|
|
320
336
|
|
321
|
-
<div class="method-source-code" id="
|
322
|
-
<pre><span class="ruby-comment"># File lib/standup_md/config/cli.rb, line
|
323
|
-
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">
|
324
|
-
<span class="ruby-
|
325
|
-
<span class="ruby-ivar">@editor</span> = <span class="ruby-identifier">set_editor</span>
|
326
|
-
<span class="ruby-ivar">@verbose</span> = <span class="ruby-keyword">false</span>
|
327
|
-
<span class="ruby-ivar">@edit</span> = <span class="ruby-keyword">true</span>
|
328
|
-
<span class="ruby-ivar">@write</span> = <span class="ruby-keyword">true</span>
|
329
|
-
<span class="ruby-ivar">@print</span> = <span class="ruby-keyword">false</span>
|
330
|
-
<span class="ruby-ivar">@auto_fill_previous</span> = <span class="ruby-keyword">true</span>
|
331
|
-
<span class="ruby-ivar">@preference_file</span> = <span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-operator">::</span><span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">ENV</span>[<span class="ruby-string">'HOME'</span>], <span class="ruby-string">'.standuprc'</span>))
|
337
|
+
<div class="method-source-code" id="reset-source">
|
338
|
+
<pre><span class="ruby-comment"># File lib/standup_md/config/cli.rb, line 104</span>
|
339
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">reset</span>
|
340
|
+
<span class="ruby-constant">DEFAULTS</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">"@#{k}"</span>, <span class="ruby-identifier">v</span>) }
|
332
341
|
<span class="ruby-keyword">end</span></pre>
|
333
342
|
</div>
|
334
343
|
|