dynarex-daily 0.4.1 → 0.5.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
  SHA256:
3
- metadata.gz: fdb84c4955c462f7a4900599179e9932aeec181dd4da98ab5ff9a7dc99540d92
4
- data.tar.gz: 9ce75a0cf061bf9db379006f1f5d82d9cabec8d29a66c4f7595548888904826b
3
+ metadata.gz: 59be52b7780b87131cd48a8f44e5578630430b04426bf1dae6e8ed61c36c7288
4
+ data.tar.gz: 0a567c0a7f3f370ac3fe82dd4df9d9cd6aab9cb0a40b2e93915c360710c6dc2a
5
5
  SHA512:
6
- metadata.gz: a13e6d662898630db0fde6e1953443ee83e7764adae48e813834376ac63f650e466ea8324909137d54817a4b21bbc675f461fb6e69a669c2d46fc43d42f25872
7
- data.tar.gz: 4ac93fb7c9455c73034ece3c2a06ffa3dd6d7803c8f830f18336211cb9dc53eb21c73013a14cec0410c4778750b1555814a0f59879cd6c93441b0e597de38721
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
- def initialize(stringx=nil, dir_archive: :days, xslt: '',
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.1
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
- MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
14
- YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
15
- 8ixkARkWAmV1MB4XDTE3MTAxNTE2NDU1MloXDTE4MTAxNTE2NDU1MlowSDESMBAG
16
- A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
17
- EjAQBgoJkiaJk/IsZAEZFgJldTCCASIwDQYJKoZIhvcNAQE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XHeb1hivNv41l3MbKPaQYIZuQUn94qgeDuxQfcFRMpGpvoNsn
30
+ nftbZTuYptK/E2nJL24Uzr7E/X4sr/uiriqqwKX4tAZn+j9+h81u8wKtvg1fkw+i
31
+ iJwJQ3C1/6xUdw4f597JaGMlpHdvO+/2caJq41A5kgBjC6No7BR3+W8ghHGzWHG2
32
+ v9g/1Wjkc2oxfUHC2w+LBDEpws7akfTTHk7kE6uI6bclul4SZuUuzeCt6psWcCbo
33
+ SJlpQdU28Sxyk+aKq7kvP28nQtyzv3ly9KzoHPXzQrY/5ld0HzIPEJfYxSKflNJU
34
+ y1A0kX6aus0cgGs6ph8C64DTPnnhqLva+jg5fZ5KYFyWwAu6s3cfTGe383IjMxul
35
+ E/GgkjQ28u/f6qcQgMPVvPiO6Ku2M2Zp4D5AL6Pb4ipSACsLEZZHMWo/CJBLOQ7f
36
+ KYgoP6fr0Bkw0gyMZIHEwNMH
33
37
  -----END CERTIFICATE-----
34
- date: 2018-09-06 00:00:00.000000000 Z
38
+ date: 2022-02-23 00:00:00.000000000 Z
35
39
  dependencies:
36
40
  - !ruby/object:Gem::Dependency
37
41
  name: dynarex
@@ -39,22 +43,22 @@ dependencies:
39
43
  requirements:
40
44
  - - "~>"
41
45
  - !ruby/object:Gem::Version
42
- version: '1.8'
46
+ version: '1.9'
43
47
  - - ">="
44
48
  - !ruby/object:Gem::Version
45
- version: 1.8.2
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.8'
56
+ version: '1.9'
53
57
  - - ">="
54
58
  - !ruby/object:Gem::Version
55
- version: 1.8.2
59
+ version: 1.9.6
56
60
  description:
57
- email: james@jamesrobertson.eu
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
- rubyforge_project:
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
- V!��*p����2PFð�-Ɛ������f��D[~:�Ī� |45}�ʮ@n��� ���BL~-L>���hkA`�HA2D���'��{���C�ᕂ��z�y#�K��P 8���
2
- UX�Xv�3���_ơ�L� x���$�P�pt��^�ἷrĝ�B�{�;sze�FZ����=�6�|�׽9*l��B���.�HÉѮ������kȎ�&�J����_GJ}]��Y5M
1
+ 79����N���DP�v��KU��@�iŐ�4D��ۺ�u�#���ŔSޗSp���u�����vo�����
2
+ �|*��M��HZIn��,l��hD��jz�E��8q����W.����a#jK