monthly_planner 0.3.0 → 0.3.1

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
  SHA1:
3
- metadata.gz: 580a1fea8fcf9d33782c3dd37d1bc511b8de8076
4
- data.tar.gz: b7c207d482f9f2afd515fd3e0eac3e61d208b7f6
3
+ metadata.gz: eda13e6a5ae2029d5d190033e00ae424098d7c90
4
+ data.tar.gz: 7347d5f13ee30c0bfb2a2887d6114eb5db72d1a0
5
5
  SHA512:
6
- metadata.gz: 8eaf7dbf857eca23aad06f7967948db46504946f1e10902fa57665f8dfcd7752294b77aa05cc9105a20ae37f84c6364d3642cdf881937728694ef0db0c988c3f
7
- data.tar.gz: 2db2bbfaa30344b5f8029d4d158e294d5a7c05591bc47588a99a9980ead84eac503b6a99bb8ea14590cc0325351c48b09432fc0c7adc1e842a4cef56144336c2
6
+ metadata.gz: dec132c2c6995bf935ca94761d07e198fe142cc7826ae3264dc25e6231c5e6d66f2cd0ecc58e87dcc0bf7ed5f0b4e04c1bc8c903d9acc769c66b265d42eb081d
7
+ data.tar.gz: 88e7d84a1dd81e0e264d6c083fe9eee85c8a380ecfcede0c7b0cc9cc8af078f4fbe36618b16d4de17796c65f5c7742a49c3782af95d4089b0ac451a33c5eeb60
checksums.yaml.gz.sig CHANGED
Binary file
@@ -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
- U���n�;�*�Jn�1��j*�M':�,E|��n!�O�2qI�&%���Y�\���L,p4��o}A��F�C�̻��A���B^�y?;ZF��C(]5��\�9)���>�|��+����B�&y궑��^�BЁ�����6������"H}���� ��71ۃR ��ӿ3.Xm�Z.�;��^�C�D�Jp�1�C��]0;��eoل �tG�^��
1
+ d��?V���`U�w^��1^��A�~f#_MݱpD����j���fb�W����M��Y�GsF/��h��$X���>��gM �ybߎ(�݁�ʠT��Xb�,�(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
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: monthly_planner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
@@ -1,3 +1,2 @@
1
- lq̃�9)9�<)�1������]l;18,��h�`���im6Eϗ(��mą�@>'/
2
- }�$m����e����! g���ƹ�|�1oF��n�5v:+��{�'�w$] ���S�}�Bl����]�n�� ���ҧ\{�ㄲx������U>d��|l�_��4J��6a��Ql)0��vt ���Z���Ig��[����L���T� ��a'Fۨ+����iI��f:.�fcm
3
- P���0�
1
+ k�y =>�# �-��eC��>�U4�?L��wɿW>�W0�)���g3 ��`t�g��5��j7���2_�?q�Y�Y|
2
+ F95