weekly_planner 0.3.5 → 0.4.0

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: 36cce987bca10012cb74f4905ab8b919e1ec5ef6
4
- data.tar.gz: 05aa83c0426867aa388165e7926741483f9cffbd
3
+ metadata.gz: 11a26d4ee874592bdd268bcf3cf51c1ece49859e
4
+ data.tar.gz: 2f50694a5b58fd2501627be75bc5f2029ca668f5
5
5
  SHA512:
6
- metadata.gz: 8990cd660c162889724a590791c59695f22c902b901336574bc363e72290d6c780b09525c5326d9a73bb190ffecc121a0dc7df688152b3928666028f0e71a403
7
- data.tar.gz: 3d71bbe7490daf14ff06f8787e63933fa46f5a47c45e0232c8eb46221174d6cebc81bbf4b5a6125c745cc59ac03ae77ce13206ff6ee92ed8c1708f262388cd71
6
+ metadata.gz: c828b7421725e0bfe1d4bc849f1ad521c225e262fe51520d1f041dfbded08f58682a1a2d63b9b6ecaf67e5ea0c29f09aaaac3590394b4e397266c4f06f623bec
7
+ data.tar.gz: 97f4dac1f82f082bf43a01a2f96776c5ab4b8fb014da0755e46c5c934ec92aaec69cbc06473448da4ae9170ee42161acdc9bae5b874ac3e2f5331eeb5bbd741f
checksums.yaml.gz.sig CHANGED
Binary file
@@ -20,9 +20,10 @@ class WeeklyPlanner
20
20
 
21
21
  attr_reader :to_s
22
22
 
23
- def initialize(filename='weekly-planner.txt', path: '.')
23
+ def initialize(filename='weekly-planner.txt',
24
+ path: File.dirname(filename), config: {})
24
25
 
25
- @filename, @path = filename, path
26
+ @filename, @path = File.basename(filename), File.expand_path(path)
26
27
 
27
28
  fpath = File.join(path, filename)
28
29
 
@@ -62,6 +63,27 @@ class WeeklyPlanner
62
63
  @dx = new_dx
63
64
  end
64
65
 
66
+ # check for monthly-planner entries which
67
+ # should be added to the weekly-planner
68
+ monthlyplanner_filepath = config[:monthlyplanner_filepath]
69
+
70
+ if monthlyplanner_filepath then
71
+
72
+ mp = MonthlyPlanner.new monthlyplanner_filepath
73
+
74
+ mp.this_week.each do |x|
75
+
76
+ i = x.date.day - Date.today.day
77
+ a = @dx.all[i].x.lines
78
+ s = "%s %s" % [x.time, x.desc]
79
+
80
+ @dx.all[i].x = (a << s + "\n").join unless a.index s
81
+
82
+ end
83
+
84
+ end
85
+
86
+
65
87
  end
66
88
 
67
89
  def dx()
data.tar.gz.sig CHANGED
Binary file
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.5
4
+ version: 0.4.0
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: 2016-07-21 00:00:00.000000000 Z
34
+ date: 2016-08-06 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: dynarex
@@ -39,20 +39,20 @@ dependencies:
39
39
  requirements:
40
40
  - - "~>"
41
41
  - !ruby/object:Gem::Version
42
- version: '1.5'
42
+ version: '1.7'
43
43
  - - ">="
44
44
  - !ruby/object:Gem::Version
45
- version: 1.5.44
45
+ version: 1.7.14
46
46
  type: :runtime
47
47
  prerelease: false
48
48
  version_requirements: !ruby/object:Gem::Requirement
49
49
  requirements:
50
50
  - - "~>"
51
51
  - !ruby/object:Gem::Version
52
- version: '1.5'
52
+ version: '1.7'
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: 1.5.44
55
+ version: 1.7.14
56
56
  description:
57
57
  email: james@r0bertson.co.uk
58
58
  executables: []
metadata.gz.sig CHANGED
Binary file