monthly_planner 0.3.0 → 0.3.1
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
- checksums.yaml.gz.sig +0 -0
- data/lib/monthly_planner.rb +7 -2
- data.tar.gz.sig +2 -1
- metadata +1 -1
- metadata.gz.sig +2 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: eda13e6a5ae2029d5d190033e00ae424098d7c90
|
|
4
|
+
data.tar.gz: 7347d5f13ee30c0bfb2a2887d6114eb5db72d1a0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dec132c2c6995bf935ca94761d07e198fe142cc7826ae3264dc25e6231c5e6d66f2cd0ecc58e87dcc0bf7ed5f0b4e04c1bc8c903d9acc769c66b265d42eb081d
|
|
7
|
+
data.tar.gz: 88e7d84a1dd81e0e264d6c083fe9eee85c8a380ecfcede0c7b0cc9cc8af078f4fbe36618b16d4de17796c65f5c7742a49c3782af95d4089b0ac451a33c5eeb60
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/lib/monthly_planner.rb
CHANGED
|
@@ -14,12 +14,13 @@ require 'fuzzy_match'
|
|
|
14
14
|
# * create a new monthly-planner.txt file
|
|
15
15
|
# * read an existing monthly-planner.txt file
|
|
16
16
|
# * archive and synchronise entries from the monthly-planner with the archive
|
|
17
|
+
# * purge historical dates
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
class RecordX
|
|
20
21
|
|
|
21
22
|
def date
|
|
22
|
-
Chronic.parse(@date)
|
|
23
|
+
Chronic.parse(@date).to_date
|
|
23
24
|
end
|
|
24
25
|
|
|
25
26
|
end
|
|
@@ -28,7 +29,7 @@ class MonthlyPlanner
|
|
|
28
29
|
|
|
29
30
|
attr_reader :to_s
|
|
30
31
|
|
|
31
|
-
def initialize(filename='monthly-planner.txt', path: '.')
|
|
32
|
+
def initialize(filename='monthly-planner.txt', path: '.', today: Date.today)
|
|
32
33
|
|
|
33
34
|
@filename, @path = filename, path
|
|
34
35
|
|
|
@@ -38,6 +39,10 @@ class MonthlyPlanner
|
|
|
38
39
|
|
|
39
40
|
@dx = import_to_dx(File.read(fpath))
|
|
40
41
|
sync_archive(@dx.all)
|
|
42
|
+
|
|
43
|
+
# purge any past dates
|
|
44
|
+
@dx.all.reject! {|x| x.date < today}
|
|
45
|
+
|
|
41
46
|
else
|
|
42
47
|
@dx = new_dx
|
|
43
48
|
end
|
data.tar.gz.sig
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
d��?V���`U�w^��1^��A�~f#_Mݱp�D����j���fb�W����M��Y�GsF/��h��$X���>��g�M�ybߎ(�݁�ʠT��X�b�,�(o�|��?���^���VpN����~[���ȭ3�`���SRʣ]�2
|
|
2
|
+
��k+m�&,y��\����;,p�+��ք\eMo�'kl�O�_܈K��H���#��Vh=�pBOƞ������s�LL�<�����w���McT�d:8���
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
P���0�
|
|
1
|
+
k�y=>�#�-��e�C��>�U4�?L��wɿW>�W0�)���g�3��`t�g��5��j7���2_�?q�Y�Y|
|
|
2
|
+
�F9 �5
|