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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/activity-logger.rb +8 -8
- metadata +2 -2
- 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: 9676c9eab6e0a27619445a87505b0b7b47555a02
|
4
|
+
data.tar.gz: 574c346e6a102e49a98b2b817aa2f3c9fc005513
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfc327203ec77de49d50af320c547109da700ab8e5b9846d098fce7692d6042edc3e277ea4eb5c74778ef137ae11a55de773abe4c429e1c2ef06c9eb0134962b
|
7
|
+
data.tar.gz: 34bd6e2909befd66355e9db1ed6b8bbe8f59378a904ab63893d10e742376155c7a393f0608f8f0760eec3290c836ec24b2cea08d4ecbe75792733682ad3a8110
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/activity-logger.rb
CHANGED
@@ -19,19 +19,17 @@ end
|
|
19
19
|
class ActivityLogger
|
20
20
|
include Library
|
21
21
|
|
22
|
-
def initialize(dirpath=nil, dir: dirpath,
|
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,
|
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,
|
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.
|
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-
|
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
|