dynarex-daily 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: 2970c006b607a3630b037786bab93f9ef8a5d5eb
4
- data.tar.gz: 53e8d05ff5be537b25fb69e4bbc53f99f9f773b6
3
+ metadata.gz: fcd64114420d8029f635f8f84dde6fb4a55beb58
4
+ data.tar.gz: fabccd697a4265d7c91b42fbea47463491665ff6
5
5
  SHA512:
6
- metadata.gz: cfb9a3170e22e99b121534d054a1142ee5514736117a9bcebdf812d7ff9c3c2e83833f89787844b776a58ab3d4ee409a8c98d1cb3c9ef5bf731fb6a3c89bcb8a
7
- data.tar.gz: 47bcbe90617f19d10295bb83781eacd796700abcf7e4b90d9d0c08b829b7ef4ae59d292e42f97e2fff1433615d1db5a395ba657160e88fc76d9a533fff12c47b
6
+ metadata.gz: 5502bfd1fee06d595181bc974952b6ae886ed80a3f4fe91f8f1408bbd13a38448b0ae9ee8d4bc31d894e006e72a2da2845558db894eba7614a095474796eb799
7
+ data.tar.gz: 53d2542bb72ddd896a6ab25e1f366a9fb2e0b2fa1832d07288a0e870ede17575825c7535318fa3ddda93f53780353ae525bf0bdb8cd3dd30a76bc9bd8159da73
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/dynarex-daily.rb CHANGED
@@ -16,10 +16,11 @@ class DynarexDaily < Dynarex
16
16
  @filename = filename
17
17
  @schema = 'entries[date]/entry(time, desc)'
18
18
  @default_key = 'uid'
19
-
20
- s, type = RXFHelper.read(stringx)
21
-
22
- @filename = stringx if type == :file
19
+
20
+ if stringx then
21
+ s, type = RXFHelper.read(stringx)
22
+ @filename = stringx if type == :file
23
+ end
23
24
 
24
25
  if File.exist?(@filename) then
25
26
 
@@ -33,13 +34,27 @@ class DynarexDaily < Dynarex
33
34
  end
34
35
 
35
36
  else
37
+
36
38
  super( stringx || @schema )
37
39
  @delimiter = ' # '
38
40
  create_file
39
41
  end
40
42
 
41
43
  self.xslt = xslt if xslt
42
- end
44
+ end
45
+
46
+ def create(h)
47
+
48
+ if !summary[:date].empty? and \
49
+ Date.parse(summary[:date]) != Date.today then
50
+
51
+ archive_file Date.parse(summary[:date])
52
+ create_file
53
+ end
54
+
55
+ super(h)
56
+ end
57
+
43
58
 
44
59
  def save(filename=@filename, options={})
45
60
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynarex-daily
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
@@ -31,7 +31,7 @@ cert_chain:
31
31
  n8Bh0E3DHTpf8tPOayQ37Tv3qo3/0XNLhDw6YjnlI+EMPWNG1Q1jBVyvohY6L3hW
32
32
  rIygDTi2gL1xwA==
33
33
  -----END CERTIFICATE-----
34
- date: 2017-10-15 00:00:00.000000000 Z
34
+ date: 2017-10-17 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: dynarex
metadata.gz.sig CHANGED
Binary file