xlo 0.0.0 → 0.0.0.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
- data/bin/xlo +7 -0
- data/lib/xlo.rb +8 -11
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7377477ee407161473d28cc2c3f274ed78d87006
|
4
|
+
data.tar.gz: e39d15e5c2ff4a1e6c066199b234659a95b09235
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6be9c0aada7cbbc277a528fb695c10e88b55e52c18a99a48f66b1be633d0cdeccc234460f6de870e20e31bd78492e0c432b8288c97df68aea812fa51021e06e2
|
7
|
+
data.tar.gz: c102d394a735d47f866752c85d00bb12085530d73f9de1833dc9283cb46b5573b7cfafd7f954c641cfca5612b2e21102642cec88ff80fc3031fd09c259fdcb72
|
data/bin/xlo
ADDED
data/lib/xlo.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
class Xlo
|
2
2
|
|
3
|
-
def fill_list (_dir)
|
3
|
+
def self.fill_list (_dir)
|
4
4
|
list = []
|
5
5
|
Dir[_dir + "/" + "*.log"].each do |file|
|
6
6
|
p file
|
@@ -15,7 +15,7 @@ class Xlo
|
|
15
15
|
return list
|
16
16
|
end
|
17
17
|
|
18
|
-
def create_error_dict (_list)
|
18
|
+
def self.create_error_dict (_list)
|
19
19
|
error = {}
|
20
20
|
_list.each do |el|
|
21
21
|
type = el.split("error")[1].split(" ")[1]
|
@@ -31,7 +31,7 @@ class Xlo
|
|
31
31
|
return error
|
32
32
|
end
|
33
33
|
|
34
|
-
def xmllint_error (_file,_error_dict)
|
34
|
+
def self.xmllint_error (_file,_error_dict)
|
35
35
|
list = []
|
36
36
|
File.open(_file).each do |line|
|
37
37
|
if (!line.include?("^\n"))
|
@@ -53,20 +53,17 @@ class Xlo
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
-
def self.main
|
57
|
-
rnv_arg = ARGV.shift
|
58
|
-
xmllint_arg = ARGV.shift
|
59
|
-
raise "missing argument" unless rnv_arg
|
56
|
+
def self.main(_rnv_arg,_xmllint_arg)
|
60
57
|
|
61
58
|
f = File.new("error.csv", "w+")
|
62
59
|
f.write("type; error; freq; files \n")
|
63
|
-
error = create_error_dict(fill_list(
|
60
|
+
error = self.create_error_dict(self.fill_list(_rnv_arg))
|
64
61
|
|
65
|
-
if (
|
66
|
-
xmllint_error(
|
62
|
+
if (_xmllint_arg != nil)
|
63
|
+
xmllint_error(_xmllint_arg, error)
|
67
64
|
end
|
68
65
|
error.each do |entry|
|
69
|
-
freq = entry[1].split("
|
66
|
+
freq = entry[1].split(" ").length.to_s
|
70
67
|
f.write(entry.insert(1, freq).join("; ")[0..-2] + "\n" )
|
71
68
|
end
|
72
69
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xlo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.0
|
4
|
+
version: 0.0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Meoni
|
@@ -10,12 +10,14 @@ bindir: bin
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2016-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
|
-
description:
|
13
|
+
description: An aggregator of xml log for rnv and xmllint error
|
14
14
|
email: simonmeoni@aol.com
|
15
|
-
executables:
|
15
|
+
executables:
|
16
|
+
- xlo
|
16
17
|
extensions: []
|
17
18
|
extra_rdoc_files: []
|
18
19
|
files:
|
20
|
+
- bin/xlo
|
19
21
|
- lib/xlo.rb
|
20
22
|
homepage: http://rubygems.org/gems/xlo
|
21
23
|
licenses:
|
@@ -40,5 +42,5 @@ rubyforge_project:
|
|
40
42
|
rubygems_version: 2.2.2
|
41
43
|
signing_key:
|
42
44
|
specification_version: 4
|
43
|
-
summary:
|
45
|
+
summary: xml log overview
|
44
46
|
test_files: []
|