weekly_planner 0.3.2 → 0.3.3
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/weekly_planner.rb +8 -4
- data.tar.gz.sig +1 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 132eedd4cd143b7cc41ddd27d02e68292d563dab
|
4
|
+
data.tar.gz: 0a60535ae863210bd8cd77f549206ac2d8cfc401
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2b7e4f90f22abebf1beb25ee0210b32a626fc62e5aaf55a0924aaeabd0b5b6619365a31579c4c07bbc10b0dee69f2afb7fad578ddcae00748f385dceff40334
|
7
|
+
data.tar.gz: f0e72b222525e28c2b599fbe5869a9e9476afed534cd8c66478ecf71645c37d50a012d80f6185d0518ad9bc4c4b3dc4cc0a7777ea8810ce1ad44ff77d008188f
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/weekly_planner.rb
CHANGED
@@ -31,9 +31,8 @@ class WeeklyPlanner
|
|
31
31
|
dx = import_to_dx(File.read(fpath))
|
32
32
|
@dx = refresh File.join(path, filename.sub(/\.txt$/,'.xml')), dx
|
33
33
|
sync_archive()
|
34
|
-
|
35
34
|
# purge any past dates
|
36
|
-
while Date.parse(@dx.all.first.id, "%Y%m%d") != DateTime.now.to_date \
|
35
|
+
while @dx.all.first and Date.parse(@dx.all.first.id, "%Y%m%d") != DateTime.now.to_date \
|
37
36
|
and @dx.all.length > 0 do
|
38
37
|
@dx.all.first.delete
|
39
38
|
|
@@ -42,7 +41,7 @@ class WeeklyPlanner
|
|
42
41
|
# new days to add?
|
43
42
|
len = 7 - @dx.all.length
|
44
43
|
|
45
|
-
if len > 0 then
|
44
|
+
if @dx.all.length > 0 and len > 0 then
|
46
45
|
|
47
46
|
date = Date.strptime(@dx.all.last.id, "%Y%m%d") + 1
|
48
47
|
|
@@ -53,6 +52,10 @@ class WeeklyPlanner
|
|
53
52
|
|
54
53
|
sync_archive @dx.all[-(len)..-1]
|
55
54
|
|
55
|
+
else
|
56
|
+
|
57
|
+
@dx = new_dx
|
58
|
+
|
56
59
|
end
|
57
60
|
|
58
61
|
else
|
@@ -66,7 +69,7 @@ class WeeklyPlanner
|
|
66
69
|
end
|
67
70
|
|
68
71
|
def save(filename=@filename)
|
69
|
-
|
72
|
+
#
|
70
73
|
s = File.basename(filename) + "\n" + dx_to_s(@dx).lines[1..-1].join
|
71
74
|
File.write File.join(@path, filename), s
|
72
75
|
@dx.save File.join(@path, filename.sub(/\.txt$/,'.xml'))
|
@@ -179,6 +182,7 @@ class WeeklyPlanner
|
|
179
182
|
end
|
180
183
|
|
181
184
|
row1 = dx.all.first
|
185
|
+
|
182
186
|
d = Date.strptime(row1.id, "%Y%m%d")
|
183
187
|
heading = "%s, %s %s" % [Date::DAYNAMES[d.wday], ordinal(d.day),
|
184
188
|
Date::ABBR_MONTHNAMES[d.month]]
|
data.tar.gz.sig
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
A�v�B�t浈�W"9���S6oU��9�_��~���D�\>�|I,~�C.߃��X�S�wK���A��m�zpb�of��3��sb#A�ͽ��aɩ2��>�됾�u�Z3d�$��;,{��if���Ҙ���`��f��Y��qy�zǮ�-�
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: weekly_planner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
z7gNRJqGU+m6WOC+EaEcNkm4WwRqy2Il3J8DydaFl+h20aqjFe1k7KgLU8qy8jyU
|
32
32
|
FlTqE0DQzwY5Dg==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
34
|
+
date: 2016-01-14 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: dynarex
|
metadata.gz.sig
CHANGED
Binary file
|