activity-logger 0.4.1 → 0.4.2

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
  SHA1:
3
- metadata.gz: f4f3dd723da91ab05b841a3c242f99446a4b5ffa
4
- data.tar.gz: c44625f1bbc5444d050737ef65842476be2cb3a6
3
+ metadata.gz: 9676c9eab6e0a27619445a87505b0b7b47555a02
4
+ data.tar.gz: 574c346e6a102e49a98b2b817aa2f3c9fc005513
5
5
  SHA512:
6
- metadata.gz: 4475c6617bc26c6a14dcef11b716679c288dd1739dfe136fc993befc5eb58a1f9f873e7096148f6935364189d547114b5b11ba7dd9b442656e807aec33c3793a
7
- data.tar.gz: 116765e5c3e7f6481071d0fd62e2c57fb5c57b60bd68af1617fbb77040622a193830c31165b0b1f5205cd19b1379323ae42d5f7506590f99fb9256316e831147
6
+ metadata.gz: dfc327203ec77de49d50af320c547109da700ab8e5b9846d098fce7692d6042edc3e277ea4eb5c74778ef137ae11a55de773abe4c429e1c2ef06c9eb0134962b
7
+ data.tar.gz: 34bd6e2909befd66355e9db1ed6b8bbe8f59378a904ab63893d10e742376155c7a393f0608f8f0760eec3290c836ec24b2cea08d4ecbe75792733682ad3a8110
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -19,19 +19,17 @@ end
19
19
  class ActivityLogger
20
20
  include Library
21
21
 
22
- def initialize(dirpath=nil, dir: dirpath, options: {}, config: nil)
23
-
24
- @options = options
25
- @publish_html = false
22
+ def initialize(dirpath=nil, dir: dirpath, xsl_path: nil, config: nil)
26
23
 
24
+ @publish_html = false
27
25
 
28
26
  if config then
29
27
 
30
28
  h = SimpleConfig.new(config).to_h
31
- dir, @urlbase, @edit_url, @css_url, @xsl_path = \
29
+ dir, @urlbase, @edit_url, @css_url, xsl = \
32
30
  %i(dir urlbase edit_url css_url xsl_path).map{|x| h[x]}
31
+ @xsl_path = xsl_path || xsl
33
32
  @publish_html = true
34
- @options.merge! xslt: @xsl_path
35
33
 
36
34
  end
37
35
 
@@ -40,12 +38,13 @@ class ActivityLogger
40
38
 
41
39
  def create(desc='', time=Time.now, id: id=nil)
42
40
 
43
- ddaily = DynarexDaily.new(nil, options: @options)
41
+ ddaily = DynarexDaily.new(nil, xslt: @xsl_path)
44
42
 
45
43
  ddaily.create(time: time.to_s, desc: desc, id: id)
46
44
  ddaily.save
47
45
 
48
46
  if @publish_html then
47
+
49
48
  File.write 'index.txt', ddaily.to_s
50
49
  save_html()
51
50
  end
@@ -90,13 +89,14 @@ class ActivityLogger
90
89
 
91
90
  summary = doc.root.element('summary')
92
91
 
92
+
93
93
  date = Date.today.strftime("%d-%b-%Y").upcase
94
94
  add summary, 'title', date + ' Notices'
95
95
  add summary, 'edit_url', @edit_url
96
96
  summary.element('date').text = date
97
97
  add summary, 'css_url', @css_url
98
98
  add summary, 'published', Time.now.strftime("%d-%m-%Y %H:%M")
99
-
99
+
100
100
  doc.root.xpath('records/entry') do |entry|
101
101
 
102
102
  e = entry.element('time')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activity-logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  mtRjShaIYplelhkvlvR3KW1tYYumHi1mLSHuRvChNgpA0p/nQvwmNAyFBtqa+KK9
32
32
  BZQKg6VGzirONA==
33
33
  -----END CERTIFICATE-----
34
- date: 2016-07-01 00:00:00.000000000 Z
34
+ date: 2016-07-17 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: dynarex-daily
metadata.gz.sig CHANGED
Binary file