sra2019 0.5.0 → 0.5.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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/sra2019.rb +15 -11
- metadata +22 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c218936c612857dcb565b574d4f1389b13a8c4ac38a53a37d85f0142b29db28
|
4
|
+
data.tar.gz: b0b015c92aa5edaac4b6e192280f19fb79a19bb664be5931e60d8b0b071b2631
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09f230999dd5325b870cc3d79176dc8bb021494d56772c0418fbfb22383ed3896ed615326b5499118227bca771c3d3d954a08760da5759729b785fc31ffdc321'
|
7
|
+
data.tar.gz: 375ba62df0f925740216880a929518bcf7d3346b0789fcf3e3d58d09e9c38efb16865b82b2e85100f43f03c44ccb2bc23d69b947f38fc509d2b761d78de9e3e7
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/sra2019.rb
CHANGED
@@ -6,15 +6,17 @@
|
|
6
6
|
|
7
7
|
|
8
8
|
require 'hlt'
|
9
|
-
require 'zip'
|
10
9
|
require 'rexle'
|
11
10
|
require 'base64'
|
12
11
|
require 'rxfhelper'
|
13
12
|
require 'wicked_pdf'
|
14
13
|
require 'mini_magick'
|
14
|
+
require 'archive/zip'
|
15
15
|
require 'rexle-builder'
|
16
16
|
|
17
17
|
|
18
|
+
|
19
|
+
|
18
20
|
class StepsRecorderAnalyser
|
19
21
|
using ColouredText
|
20
22
|
|
@@ -40,12 +42,11 @@ class StepsRecorderAnalyser
|
|
40
42
|
|
41
43
|
end
|
42
44
|
|
43
|
-
def to_html(
|
45
|
+
def to_html(filepath=File.join(@savepath, 'sra' + Time.now.to_i.to_s))
|
44
46
|
|
45
47
|
# save the image files to a file directory.
|
46
48
|
# name the sub-directory using the date and time?
|
47
49
|
|
48
|
-
filepath = File.join(@savepath, targetdir)
|
49
50
|
imgpath = File.join(filepath, 'images')
|
50
51
|
csspath = File.join(filepath, 'css')
|
51
52
|
|
@@ -71,7 +72,7 @@ li = "
|
|
71
72
|
|
72
73
|
end
|
73
74
|
|
74
|
-
|
75
|
+
@sliml=<<EOF
|
75
76
|
html
|
76
77
|
head
|
77
78
|
title #{@title}: #{@steps.length} Steps (with Pictures)
|
@@ -85,7 +86,7 @@ html
|
|
85
86
|
#{rows.join("\n").lstrip}
|
86
87
|
EOF
|
87
88
|
|
88
|
-
html = Rexle.new(Hlt.new(
|
89
|
+
html = Rexle.new(Hlt.new(@sliml).to_html)\
|
89
90
|
.root.element('html').xml pretty: true
|
90
91
|
File.write File.join(filepath, 'index.html'), html
|
91
92
|
|
@@ -96,6 +97,10 @@ EOF
|
|
96
97
|
|
97
98
|
end
|
98
99
|
|
100
|
+
def to_sliml()
|
101
|
+
@sliml
|
102
|
+
end
|
103
|
+
|
99
104
|
def to_pdf()
|
100
105
|
|
101
106
|
project = 'sra' + Time.now.to_i.to_s
|
@@ -114,16 +119,14 @@ EOF
|
|
114
119
|
def to_zip()
|
115
120
|
|
116
121
|
project = 'sra' + Time.now.to_i.to_s
|
117
|
-
newdir = project
|
118
|
-
zipfile = project + '.zip'
|
122
|
+
newdir = File.join(@savepath, project)
|
123
|
+
zipfile = File.join(@savepath, project + '.zip')
|
119
124
|
|
120
125
|
to_html(newdir)
|
121
126
|
|
122
|
-
Zip
|
123
|
-
x.add(project, File.join(@savepath, project))
|
124
|
-
end
|
127
|
+
Archive::Zip.archive(zipfile, File.join(@savepath, project))
|
125
128
|
|
126
|
-
'saved to ' +
|
129
|
+
'saved to ' + zipfile
|
127
130
|
|
128
131
|
end
|
129
132
|
|
@@ -173,6 +176,7 @@ EOF
|
|
173
176
|
Rexle.new(xml.to_a)
|
174
177
|
end
|
175
178
|
|
179
|
+
|
176
180
|
def extract_image(s, n)
|
177
181
|
|
178
182
|
report = Rexle.new s[/<Report>.*<\/Report>/m]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sra2019
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
YgXo0DU1HUhuKAAuA0aZdb6DV5BqgZx9e27CLIKqRk5P7TikW49mFaelQfSRi675
|
36
36
|
ugi0V/wkIOHFlKLS87IPnc09
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2019-04-
|
38
|
+
date: 2019-04-23 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: hlt
|
@@ -57,6 +57,26 @@ dependencies:
|
|
57
57
|
- - ">="
|
58
58
|
- !ruby/object:Gem::Version
|
59
59
|
version: 0.6.3
|
60
|
+
- !ruby/object:Gem::Dependency
|
61
|
+
name: archive-zip
|
62
|
+
requirement: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: 0.12.0
|
67
|
+
- - "~>"
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0.12'
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: 0.12.0
|
77
|
+
- - "~>"
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '0.12'
|
60
80
|
- !ruby/object:Gem::Dependency
|
61
81
|
name: wicked_pdf
|
62
82
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
CHANGED
Binary file
|