dynarex-daily 0.1.14 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/dynarex-daily.rb +11 -11
- data.tar.gz.sig +0 -0
- metadata +6 -6
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fe823a600a3cb0d11fcc779851018252fe0b2d77
|
4
|
+
data.tar.gz: bc8d135a4dfd0541a5008eb2bba716291f92b080
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d72733617935e0be510ef9551792c9487fd6bd7078a9fdc7a278979f7892c0a2a8b28c291175f767a513e2f4683d148190b97b6fec55475eb8850fd2fe64a1f
|
7
|
+
data.tar.gz: e0e9bff32878d9baea9afc7f48c0c44b90d778af5f38220e02b8204611ddaee4754deb369062b1857c2294f8f324f9d96202fd40627794065bcb6a925f5989d7
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/dynarex-daily.rb
CHANGED
@@ -14,12 +14,11 @@ class DynarexDaily < Dynarex
|
|
14
14
|
@opt = {dir_archive: :days}.merge options
|
15
15
|
@filename = 'dynarexdaily.xml'
|
16
16
|
@schema = 'entries[date]/entry(time, desc)'
|
17
|
+
@default_key = 'uid'
|
17
18
|
|
18
|
-
super(stringx) if stringx
|
19
|
-
|
20
19
|
if File.exist?(@filename) then
|
21
20
|
|
22
|
-
super
|
21
|
+
super @filename
|
23
22
|
|
24
23
|
if !summary[:date].empty? and \
|
25
24
|
Date.parse(summary[:date]) != Date.today then
|
@@ -27,10 +26,12 @@ class DynarexDaily < Dynarex
|
|
27
26
|
archive_file Date.parse(summary[:date])
|
28
27
|
create_file
|
29
28
|
end
|
29
|
+
|
30
30
|
else
|
31
|
+
super @schema
|
31
32
|
create_file
|
32
33
|
end
|
33
|
-
end
|
34
|
+
end
|
34
35
|
|
35
36
|
def save(filename='dynarexdaily.xml', options={})
|
36
37
|
|
@@ -60,21 +61,20 @@ class DynarexDaily < Dynarex
|
|
60
61
|
private
|
61
62
|
|
62
63
|
def create_file()
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
initialize(@schema)
|
64
|
+
|
65
|
+
openx(@schema)
|
67
66
|
summary[:date] = Date.today.to_s
|
68
67
|
summary[:order] = 'descending'
|
68
|
+
|
69
69
|
save
|
70
70
|
end
|
71
71
|
|
72
72
|
def archive_file(t)
|
73
73
|
|
74
|
-
if @opt[:dir_archive] == :days then
|
75
|
-
|
74
|
+
dir, file = if @opt[:dir_archive] == :days then
|
75
|
+
['days', t.strftime("d%d%m%y.xml")]
|
76
76
|
else
|
77
|
-
|
77
|
+
[t.strftime("%Y/%b/%d").downcase, 'index.xml']
|
78
78
|
end
|
79
79
|
|
80
80
|
FileUtils.mkdir_p dir unless File.exist? dir
|
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.1
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
hCOPCYeM4Ev+BTqYV/G4WANCMYRF04QOwx/S+IVtIsoZ86YWaW6dfpIv/7vluZII
|
32
32
|
VdiR6ylJOZ6VcQ==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2015-03-
|
34
|
+
date: 2015-03-19 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.5'
|
43
43
|
- - ">="
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: 1.
|
45
|
+
version: 1.5.10
|
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.5'
|
53
53
|
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 1.
|
55
|
+
version: 1.5.10
|
56
56
|
description:
|
57
57
|
email: james@r0bertson.co.uk
|
58
58
|
executables: []
|
metadata.gz.sig
CHANGED
Binary file
|