dynarex-daily 0.4.1 → 0.5.0
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/dynarex-daily.rb +40 -27
- data.tar.gz.sig +0 -0
- metadata +32 -29
- metadata.gz.sig +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59be52b7780b87131cd48a8f44e5578630430b04426bf1dae6e8ed61c36c7288
|
4
|
+
data.tar.gz: 0a567c0a7f3f370ac3fe82dd4df9d9cd6aab9cb0a40b2e93915c360710c6dc2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5d2c19a2b5212539666d5f9529f908224fca93d76f96a4761e9279d0113c6169344dea9aeb540787d9d86011ad4069fc47c45c10fc16e3afe41cce6ccd5de51
|
7
|
+
data.tar.gz: a4551e2a227ab58effd6c3b69e0ef2bbc4cc4462556fb18cff42e1fc06475e8fea9b31e62af7cf391022cd605b7527d4d4d12c64cb218b0cbed484fcf6519fd7
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/dynarex-daily.rb
CHANGED
@@ -3,13 +3,15 @@
|
|
3
3
|
# file: dynarex-daily.rb
|
4
4
|
|
5
5
|
require 'dynarex'
|
6
|
+
require 'rxfileio'
|
6
7
|
|
7
8
|
|
8
|
-
class DynarexDaily < Dynarex
|
9
|
-
|
10
|
-
|
9
|
+
class DynarexDaily < Dynarex
|
10
|
+
include RXFileIOModule
|
11
|
+
|
12
|
+
def initialize(stringx=nil, dir_archive: :days, xslt: '',
|
11
13
|
filename: 'dynarexdaily.xml', debug: false)
|
12
|
-
|
14
|
+
|
13
15
|
@dir_archive = dir_archive
|
14
16
|
|
15
17
|
@filename = filename
|
@@ -18,30 +20,30 @@ class DynarexDaily < Dynarex
|
|
18
20
|
@debug = debug
|
19
21
|
|
20
22
|
puts 'DynarexDaily::initialize stringx: ' + stringx.inspect if @debug
|
21
|
-
|
23
|
+
|
22
24
|
if stringx then
|
23
|
-
s, type = RXFHelper.read(stringx)
|
25
|
+
s, type = RXFHelper.read(stringx)
|
24
26
|
@filename = stringx if type == :file or type == :dfs
|
25
27
|
end
|
26
|
-
|
28
|
+
|
27
29
|
puts 'DynarexDaily::initialize @filename: ' + @filename.inspect if @debug
|
28
|
-
|
30
|
+
|
29
31
|
if FileX.exists?(@filename) then
|
30
|
-
|
31
|
-
super @filename
|
32
|
-
|
32
|
+
|
33
|
+
super @filename, debug: debug
|
34
|
+
|
33
35
|
if !summary[:date].empty? and \
|
34
36
|
Date.parse(summary[:date]) != Date.today then
|
35
|
-
|
37
|
+
|
36
38
|
archive_file Date.parse(summary[:date])
|
37
39
|
create_file
|
38
|
-
end
|
39
|
-
|
40
|
+
end
|
41
|
+
|
40
42
|
else
|
41
43
|
puts 'before super: stringx: ' + stringx.inspect if @debug
|
42
44
|
super( stringx || @schema , debug: debug)
|
43
45
|
puts 'after super' if @debug
|
44
|
-
@delimiter = ' # '
|
46
|
+
@delimiter = ' # '
|
45
47
|
create_file
|
46
48
|
end
|
47
49
|
|
@@ -49,37 +51,37 @@ class DynarexDaily < Dynarex
|
|
49
51
|
end
|
50
52
|
|
51
53
|
def create(h)
|
52
|
-
|
54
|
+
|
53
55
|
if !summary[:date].empty? and \
|
54
56
|
Date.parse(summary[:date]) != Date.today then
|
55
|
-
|
57
|
+
|
56
58
|
archive_file Date.parse(summary[:date])
|
57
59
|
create_file
|
58
|
-
end
|
59
|
-
|
60
|
+
end
|
61
|
+
|
60
62
|
super(h)
|
61
63
|
end
|
62
|
-
|
63
|
-
|
64
|
+
|
65
|
+
|
64
66
|
def save(filename=@filename, options={})
|
65
67
|
|
66
68
|
puts 'inside DynarexDaily::save() filename: ' + filename.inspect if @debug
|
67
69
|
super(filename, options)
|
68
70
|
|
69
71
|
end
|
70
|
-
|
72
|
+
|
71
73
|
def schema=(s)
|
72
74
|
super(s.sub(/^\w+(?=\/)/,'\0[date]'))
|
73
75
|
summary[:date] = Date.today.to_s
|
74
|
-
summary[:order] = 'descending'
|
76
|
+
summary[:order] = 'descending'
|
75
77
|
end
|
76
78
|
|
77
79
|
private
|
78
|
-
|
80
|
+
|
79
81
|
def create_file()
|
80
|
-
|
81
|
-
puts 'inside DynarexDaily::create_file' if @debug
|
82
|
-
|
82
|
+
|
83
|
+
puts 'inside DynarexDaily::create_file' if @debug
|
84
|
+
|
83
85
|
openx(@schema)
|
84
86
|
summary[:date] = Date.today.to_s
|
85
87
|
summary[:order] = 'descending'
|
@@ -89,6 +91,8 @@ class DynarexDaily < Dynarex
|
|
89
91
|
|
90
92
|
def archive_file(t)
|
91
93
|
|
94
|
+
puts 'inside DynarexDaily::archive_file' if @debug
|
95
|
+
|
92
96
|
dir, file = if @dir_archive == :days then
|
93
97
|
['days', t.strftime("d%d%m%y.xml")]
|
94
98
|
else
|
@@ -96,7 +100,16 @@ class DynarexDaily < Dynarex
|
|
96
100
|
end
|
97
101
|
|
98
102
|
FileX.mkdir_p dir unless FileX.exist? dir
|
103
|
+
|
104
|
+
if @debug then
|
105
|
+
puts 'inside DynarexDaily::archive_file '
|
106
|
+
puts ' @filename: %s' % [@filename]
|
107
|
+
puts ' dir: %s; file: %s' % [dir, file]
|
108
|
+
puts ' FileX: %s' % [dir, FileX.pwd]
|
109
|
+
end
|
110
|
+
|
99
111
|
FileX.mv(@filename, "%s/%s" % [dir, file])
|
112
|
+
puts 'inside DynarexDaily::archive_file after FileX.mv' if @debug
|
100
113
|
|
101
114
|
end
|
102
115
|
|
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.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -10,28 +10,32 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
13
|
+
MIIEXjCCAsagAwIBAgIBATANBgkqhkiG9w0BAQsFADAsMSowKAYDVQQDDCFnZW1t
|
14
|
+
YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMjIwMjIzMTI0MTQyWhcN
|
15
|
+
MjMwMjIzMTI0MTQyWjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
|
16
|
+
cnRzb24vREM9ZXUwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQC5OZWx
|
17
|
+
pUEpHvFjiIdiIuY5fhIeew52YizZ3AWQL349rf1mUn6JwpLCFxwhteHlp5W/CNq4
|
18
|
+
HeZXt0HT1OKbHcQyfVWa1FpRBXEkSiu3oKCCdlQfcKKxcCePavZbKfpmyX2C4cQH
|
19
|
+
4xS4vozBYzfCu+cjznHHtV3pb4o5mrpHAEDhwK8nKJbn1ZIteglmCvvijv009tDZ
|
20
|
+
xtV42oF5TgPsmC/y5WZAzuVN1NeQbrls29Bp/+b5OgR90Q3/xEwMLRHf94wFf7XE
|
21
|
+
AjbFk9rIwbdDUbb5rV6kAGj7OzLKTFxYGUin3M4Zy+ZCrvgVdQmslPE1TBvgPtYR
|
22
|
+
BqKMrhipeUkxEwjeIPhC7X4oop6FGB2eaN2fbFcDVvL3MBveXHPJDP6eAHYcU3kk
|
23
|
+
NDeED+5rHB8dE8d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em::Dependency
|
37
41
|
name: dynarex
|
@@ -39,22 +43,22 @@ dependencies:
|
|
39
43
|
requirements:
|
40
44
|
- - "~>"
|
41
45
|
- !ruby/object:Gem::Version
|
42
|
-
version: '1.
|
46
|
+
version: '1.9'
|
43
47
|
- - ">="
|
44
48
|
- !ruby/object:Gem::Version
|
45
|
-
version: 1.
|
49
|
+
version: 1.9.6
|
46
50
|
type: :runtime
|
47
51
|
prerelease: false
|
48
52
|
version_requirements: !ruby/object:Gem::Requirement
|
49
53
|
requirements:
|
50
54
|
- - "~>"
|
51
55
|
- !ruby/object:Gem::Version
|
52
|
-
version: '1.
|
56
|
+
version: '1.9'
|
53
57
|
- - ">="
|
54
58
|
- !ruby/object:Gem::Version
|
55
|
-
version: 1.
|
59
|
+
version: 1.9.6
|
56
60
|
description:
|
57
|
-
email:
|
61
|
+
email: digital.robertson@gmail.com
|
58
62
|
executables: []
|
59
63
|
extensions: []
|
60
64
|
extra_rdoc_files: []
|
@@ -79,8 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
83
|
- !ruby/object:Gem::Version
|
80
84
|
version: '0'
|
81
85
|
requirements: []
|
82
|
-
|
83
|
-
rubygems_version: 2.7.6
|
86
|
+
rubygems_version: 3.2.22
|
84
87
|
signing_key:
|
85
88
|
specification_version: 4
|
86
89
|
summary: A Dynarex flavoured log file for humans which is archived daily
|
metadata.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
�79����N���DP�v��K�U��@�iŐ�4D��ۺ�u�#���ŔSޗSp���u�����vo�����
|
2
|
+
�|*��M��HZIn��,l��hD��jz�E��8q����W.����a#j�K
|