activity-logger 0.4.0 → 0.4.1

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: cdd4661a84aa8ccea1849bf778eac14d1f292539
4
- data.tar.gz: ec646b877c6f48cdf73349c6215014202a5f4ab9
3
+ metadata.gz: f4f3dd723da91ab05b841a3c242f99446a4b5ffa
4
+ data.tar.gz: c44625f1bbc5444d050737ef65842476be2cb3a6
5
5
  SHA512:
6
- metadata.gz: ab4099fd5d56e33e9d1446bedca9bde68b5622d62fce815e56b54038c0e192ca5f5bf2712a7ffd493521481aa0e550c027cef1b0decc55a9d153ab49c90471a6
7
- data.tar.gz: 2419b34bd8efe2eb7fb6d36e84a4b45b1ef890ddf45a025c6ab43af60b7db88258c67a5a850212ffd82e564cde5601123147445edab317ab28f91f5657c139e2
6
+ metadata.gz: 4475c6617bc26c6a14dcef11b716679c288dd1739dfe136fc993befc5eb58a1f9f873e7096148f6935364189d547114b5b11ba7dd9b442656e807aec33c3793a
7
+ data.tar.gz: 116765e5c3e7f6481071d0fd62e2c57fb5c57b60bd68af1617fbb77040622a193830c31165b0b1f5205cd19b1379323ae42d5f7506590f99fb9256316e831147
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -17,9 +17,9 @@ module Library
17
17
  end
18
18
 
19
19
  class ActivityLogger
20
-
20
+ include Library
21
21
 
22
- def initialize(dir: nil, options: {}, config: nil)
22
+ def initialize(dirpath=nil, dir: dirpath, options: {}, config: nil)
23
23
 
24
24
  @options = options
25
25
  @publish_html = false
@@ -31,6 +31,8 @@ class ActivityLogger
31
31
  dir, @urlbase, @edit_url, @css_url, @xsl_path = \
32
32
  %i(dir urlbase edit_url css_url xsl_path).map{|x| h[x]}
33
33
  @publish_html = true
34
+ @options.merge! xslt: @xsl_path
35
+
34
36
  end
35
37
 
36
38
  Dir.chdir(dir) if dir
@@ -67,12 +69,14 @@ class ActivityLogger
67
69
 
68
70
  else
69
71
 
72
+ puts 'activity-logger: warning: .xsl file not found, using notices.xsl'
70
73
  fetch_file('notices.xsl')
71
-
74
+
72
75
  end
73
76
 
74
77
  # jr280416 xslt = Nokogiri::XSLT(xslt_buffer)
75
78
  # jr280416 out = xslt.transform(Nokogiri::XML(doc.xml))
79
+
76
80
  out = Rexslt.new(xslt_buffer, doc.xml).to_s
77
81
 
78
82
  File.write 'index.html', out
@@ -107,9 +111,12 @@ class ActivityLogger
107
111
 
108
112
  # save the related CSS file locally if the file doesn't already exist
109
113
 
110
- if not File.exists? 'notices.css' then
111
- File.write 'notices.css', fetch_file('notices.css')
112
- end
114
+ css_file = File.basename @css_url
115
+
116
+ if not File.exists? css_file then
117
+ File.write css_file, fetch_file('notices.css')
118
+ end
119
+
113
120
  end
114
121
 
115
122
  end
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.0
4
+ version: 0.4.1
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-04-28 00:00:00.000000000 Z
34
+ date: 2016-07-01 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: dynarex-daily
@@ -42,7 +42,7 @@ dependencies:
42
42
  version: '0.2'
43
43
  - - ">="
44
44
  - !ruby/object:Gem::Version
45
- version: 0.2.6
45
+ version: 0.2.7
46
46
  type: :runtime
47
47
  prerelease: false
48
48
  version_requirements: !ruby/object:Gem::Requirement
@@ -52,7 +52,7 @@ dependencies:
52
52
  version: '0.2'
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: 0.2.6
55
+ version: 0.2.7
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: simple-config
58
58
  requirement: !ruby/object:Gem::Requirement
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  version: '0'
101
101
  requirements: []
102
102
  rubyforge_project:
103
- rubygems_version: 2.4.8
103
+ rubygems_version: 2.5.1
104
104
  signing_key:
105
105
  specification_version: 4
106
106
  summary: Uses the Dynarex-daily gem to log notices for the day
metadata.gz.sig CHANGED
Binary file