dynarex-daily 0.1.14 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6c805554b45bac85610a2c208250ad3b9ede58a7
4
- data.tar.gz: 189d5f7567a866437554b7773d910d713e0c0363
3
+ metadata.gz: fe823a600a3cb0d11fcc779851018252fe0b2d77
4
+ data.tar.gz: bc8d135a4dfd0541a5008eb2bba716291f92b080
5
5
  SHA512:
6
- metadata.gz: cbe58ef50595c3841e34195fbd5a988e8b8a9a0631fa93113baf1d7d21622d3a779109d7528256210519356c2f4ff5d1845a513259b70e1759d9ea20cccd2a69
7
- data.tar.gz: 71362f745ac62366899b682cb975ec1d5a0692720827164cd8e22ff30ad6a58d0fc5584ac0641a2243c4b46dface205c0e8d5d3465560833445087513548e7ba
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(@filename)
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
- FileUtils.touch @filename
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
- dir, file = 'days', t.strftime("d%d%m%y.xml")
74
+ dir, file = if @opt[:dir_archive] == :days then
75
+ ['days', t.strftime("d%d%m%y.xml")]
76
76
  else
77
- dir, file = t.strftime("%Y/%b/%d").downcase, 'index.xml'
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.14
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-18 00:00:00.000000000 Z
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.2'
42
+ version: '1.5'
43
43
  - - ">="
44
44
  - !ruby/object:Gem::Version
45
- version: 1.2.90
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.2'
52
+ version: '1.5'
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: 1.2.90
55
+ version: 1.5.10
56
56
  description:
57
57
  email: james@r0bertson.co.uk
58
58
  executables: []
metadata.gz.sig CHANGED
Binary file