dynarex-daily 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/dynarex-daily.rb +15 -9
- metadata +7 -7
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 83ae36795b4409174a7625f4fde130e9f2df59c99777a480b461c981373dbe9f
|
4
|
+
data.tar.gz: df875390497e2483f4127c5fb5ceb723ebed1b7ef72bdd4bd13e8eff1c2f5786
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d625c87867d89f8cd998cc3c1cb6d3b3c14a5f986e54d6178d20a6b49e5a68aba659534c8066c6c591c9051be4c53d032467f7e89bda131e29057f894306cc3b
|
7
|
+
data.tar.gz: 5e1083363e5d006d04ce3287be05749652020d9d703b5296f0605d559bb7a2f43e8040dd38d5c6e02b81120240c1f2edd4ece5876eb906263df3341fda961fd6
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/dynarex-daily.rb
CHANGED
@@ -3,26 +3,28 @@
|
|
3
3
|
# file: dynarex-daily.rb
|
4
4
|
|
5
5
|
require 'dynarex'
|
6
|
-
require 'fileutils'
|
7
6
|
|
8
|
-
class DynarexDaily < Dynarex
|
9
7
|
|
8
|
+
class DynarexDaily < Dynarex
|
10
9
|
|
11
10
|
def initialize(stringx=nil, dir_archive: :days, xslt: '',
|
12
|
-
filename: 'dynarexdaily.xml')
|
11
|
+
filename: 'dynarexdaily.xml', debug: false)
|
13
12
|
|
14
13
|
@dir_archive = dir_archive
|
15
14
|
|
16
15
|
@filename = filename
|
17
16
|
@schema = 'entries[date]/entry(time, desc)'
|
18
17
|
@default_key = 'uid'
|
18
|
+
@debug = debug
|
19
19
|
|
20
20
|
if stringx then
|
21
21
|
s, type = RXFHelper.read(stringx)
|
22
22
|
@filename = stringx if type == :file
|
23
23
|
end
|
24
24
|
|
25
|
-
|
25
|
+
puts 'DynarexDaily::initialize @filename: ' + @filename.inspect if @debug
|
26
|
+
|
27
|
+
if FileX.exists?(@filename) then
|
26
28
|
|
27
29
|
super @filename
|
28
30
|
|
@@ -34,8 +36,9 @@ class DynarexDaily < Dynarex
|
|
34
36
|
end
|
35
37
|
|
36
38
|
else
|
37
|
-
|
38
|
-
super( stringx || @schema )
|
39
|
+
puts 'before super: stringx: ' + stringx.inspect if @debug
|
40
|
+
super( stringx || @schema , debug: debug)
|
41
|
+
puts 'after super' if @debug
|
39
42
|
@delimiter = ' # '
|
40
43
|
create_file
|
41
44
|
end
|
@@ -58,6 +61,7 @@ class DynarexDaily < Dynarex
|
|
58
61
|
|
59
62
|
def save(filename=@filename, options={})
|
60
63
|
|
64
|
+
puts 'inside DynarexDaily::save() filename: ' + filename.inspect if @debug
|
61
65
|
super(filename, options)
|
62
66
|
|
63
67
|
end
|
@@ -71,7 +75,9 @@ class DynarexDaily < Dynarex
|
|
71
75
|
private
|
72
76
|
|
73
77
|
def create_file()
|
74
|
-
|
78
|
+
|
79
|
+
puts 'inside DynarexDaily::create_file' if @debug
|
80
|
+
|
75
81
|
openx(@schema)
|
76
82
|
summary[:date] = Date.today.to_s
|
77
83
|
summary[:order] = 'descending'
|
@@ -87,8 +93,8 @@ class DynarexDaily < Dynarex
|
|
87
93
|
[t.strftime("%Y/%b/%d").downcase, 'index.xml']
|
88
94
|
end
|
89
95
|
|
90
|
-
|
91
|
-
|
96
|
+
FileX.mkdir_p dir unless FileX.exist? dir
|
97
|
+
FileX.mv(@filename, "%s/%s" % [dir, file])
|
92
98
|
|
93
99
|
end
|
94
100
|
|
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.4.0
|
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:
|
34
|
+
date: 2018-08-12 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.
|
42
|
+
version: '1.8'
|
43
43
|
- - ">="
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 1.
|
45
|
+
version: 1.8.2
|
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.
|
52
|
+
version: '1.8'
|
53
53
|
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 1.
|
55
|
+
version: 1.8.2
|
56
56
|
description:
|
57
57
|
email: james@jamesrobertson.eu
|
58
58
|
executables: []
|
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
80
|
version: '0'
|
81
81
|
requirements: []
|
82
82
|
rubyforge_project:
|
83
|
-
rubygems_version: 2.6
|
83
|
+
rubygems_version: 2.7.6
|
84
84
|
signing_key:
|
85
85
|
specification_version: 4
|
86
86
|
summary: A Dynarex flavoured log file for humans which is archived daily
|
metadata.gz.sig
CHANGED
Binary file
|