junoser 0.3.7 → 0.3.8
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/CHANGELOG.md +8 -0
- data/Gemfile.lock +1 -1
- data/Rakefile +14 -3
- data/example/vmx-17.2R1.13.rb +42342 -37231
- data/example/vsrx-18.3R1.9.rb +65984 -0
- data/lib/junoser/js_ruler.rb +3 -1
- data/lib/junoser/parser.rb +20994 -15910
- data/lib/junoser/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a59ddeec41d5ea106a1c46995501305667b3777bf875499cb8c39cb41e40744d
|
4
|
+
data.tar.gz: 2ba6e1ca647f9bf8b2533bc52926afbffc2b09a73eb2be8f56ff57db05c1f76d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a889917be31856fa914e95ed76652bdec895f1b4f0c12c813838cb6f5428fac68d051ac99aa9de110e9010176baab733c3c701b270c864f55e3cb306aea48823
|
7
|
+
data.tar.gz: 1a6c01cbfbfd03145d89a1ba5bd09a3ae6b39c229e339e16125da383be95edbd7f18e97ef85f363bc2d6d9719de77c3ec2fcf969c9bb9882fb94df8ccf5ff941
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/Rakefile
CHANGED
@@ -22,7 +22,7 @@ end
|
|
22
22
|
|
23
23
|
namespace :build do
|
24
24
|
desc 'Build an intermediate config hierarchy'
|
25
|
-
task
|
25
|
+
task :config do
|
26
26
|
open_files(xsd_path, rule_path) do |input, output|
|
27
27
|
Nokogiri::XML(input).root.remove_unused.xpath('/xsd:schema/*').each do |e|
|
28
28
|
output.puts e.to_config
|
@@ -31,20 +31,31 @@ namespace :build do
|
|
31
31
|
end
|
32
32
|
|
33
33
|
desc 'Build ruby parser'
|
34
|
-
task
|
34
|
+
task :rule do
|
35
35
|
open_files(rule_path, ruby_parser_path) do |input, output|
|
36
36
|
output.puts Junoser::Ruler.new(input).to_rule
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
40
|
desc 'Build javascript parser'
|
41
|
-
task
|
41
|
+
task :jsrule do
|
42
42
|
open_files(rule_path, js_parser_path) do |input, output|
|
43
43
|
output.puts Junoser::JsRuler.new(input).to_rule
|
44
44
|
end
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
+
task 'find-srx-methods' do
|
49
|
+
vsrx = File.read('vsrx.rb')
|
50
|
+
vmx = File.read('lib/junoser/parser.rb')
|
51
|
+
|
52
|
+
vsrx.scan(/^ +([0-9a-z_]+) *$/).flatten.uniq.sort.each do |method|
|
53
|
+
next if ['arg', 'end', 'ipaddr', 'time'].include?(method)
|
54
|
+
|
55
|
+
puts method unless vsrx =~ /rule\(:#{method}\)/m || vmx =~ /rule\(:#{method}\)/m
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
48
59
|
|
49
60
|
Rake::TestTask.new do |t|
|
50
61
|
t.libs << 'test'
|