junoser 0.5.6 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +6 -0
- data/.github/workflows/test-linux.yaml +2 -2
- data/CHANGELOG.md +14 -0
- data/Gemfile.lock +5 -5
- data/Rakefile +14 -2
- data/lib/junoser/development.rb +1 -0
- data/lib/junoser/js_ruler.rb +5 -0
- data/lib/junoser/parser.rb +4933 -3646
- data/lib/junoser/rule_tree/node.rb +24 -0
- data/lib/junoser/rule_tree/parser.rb +66 -0
- data/lib/junoser/rule_tree.rb +2 -0
- data/lib/junoser/ruler.rb +9 -4
- data/lib/junoser/version.rb +1 -1
- data/sig/junoser/rule_tree/node.rbs +17 -0
- data/sig/junoser/rule_tree/parser.rbs +21 -0
- data/sig/junoser/ruler.rbs +9 -7
- metadata +9 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a73208784003b23a9dc996cf06ef4941a3da1ad35143848885c3e37a0e921e84
|
4
|
+
data.tar.gz: ae1ded9c7e208d3af98a96cf4c9fe5839b51d79447f1921fb36807f4202017ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ac8d0ca12b3dada5bea555115c5ac172cc7dd3123c3fb5b85ab01e7f7e116daed5b2e9faebfc6237569719ad363c182522359a0cb1d1f1892f3bb85cfb5cc47
|
7
|
+
data.tar.gz: c37c95e729cdbf60a517845c0561c80b5bbb6e43f5b1dfd0c6ed8a8f49e431028c12ffb6dd0b081e8ce15ce829af599e246635a60df8d7f528d567835271e154
|
@@ -9,7 +9,7 @@ jobs:
|
|
9
9
|
strategy:
|
10
10
|
fail-fast: false
|
11
11
|
matrix:
|
12
|
-
ruby-version: ['3.
|
12
|
+
ruby-version: ['3.3', '3.2', '3.1']
|
13
13
|
os: [ubuntu-latest]
|
14
14
|
experimental: [false]
|
15
15
|
include:
|
@@ -19,7 +19,7 @@ jobs:
|
|
19
19
|
|
20
20
|
name: Test with ruby ${{ matrix.ruby-version }} on ${{ matrix.os }}
|
21
21
|
steps:
|
22
|
-
- uses: actions/checkout@
|
22
|
+
- uses: actions/checkout@v4
|
23
23
|
- name: Set up Ruby
|
24
24
|
uses: ruby/setup-ruby@v1
|
25
25
|
with:
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
## [0.6.0] - 2024-09-15
|
2
|
+
|
3
|
+
### Added
|
4
|
+
|
5
|
+
* Update vSRX syntax to 22.4R1.10
|
6
|
+
* "security"
|
7
|
+
* "chassis cluster"
|
8
|
+
* Newly supported syntax
|
9
|
+
* "interfaces xxx enable"
|
10
|
+
* "interfaces xxx unit xxx enable"
|
11
|
+
* Rake task
|
12
|
+
* `rule:tree` to show the dependency tree of rules
|
13
|
+
|
14
|
+
|
1
15
|
## [0.5.6] - 2024-05-01
|
2
16
|
|
3
17
|
### Fixed
|
data/Gemfile.lock
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
junoser (0.
|
4
|
+
junoser (0.6.0)
|
5
5
|
parslet
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
mini_portile2 (2.8.
|
11
|
-
nokogiri (1.16.
|
10
|
+
mini_portile2 (2.8.7)
|
11
|
+
nokogiri (1.16.7)
|
12
12
|
mini_portile2 (~> 2.8.2)
|
13
13
|
racc (~> 1.4)
|
14
14
|
parslet (2.0.0)
|
15
15
|
power_assert (2.0.3)
|
16
|
-
racc (1.
|
16
|
+
racc (1.8.1)
|
17
17
|
rake (13.2.1)
|
18
18
|
test-unit (3.6.2)
|
19
19
|
power_assert
|
@@ -29,4 +29,4 @@ DEPENDENCIES
|
|
29
29
|
test-unit
|
30
30
|
|
31
31
|
BUNDLED WITH
|
32
|
-
2.
|
32
|
+
2.5.9
|
data/Rakefile
CHANGED
@@ -20,7 +20,7 @@ def open_files(input, output, &block)
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def move_wildcards(element)
|
23
|
-
[
|
23
|
+
%w[ipaddr ipv6addr ipprefix].each do |pattern|
|
24
24
|
element.xpath(%[.//xsd:element[@type="#{pattern}"]/xsd:annotation/xsd:appinfo/flag[text()="nokeyword"]/../../..]).each do |wildcard|
|
25
25
|
parent = wildcard.parent
|
26
26
|
removed = wildcard.remove
|
@@ -60,12 +60,24 @@ task 'find-srx-methods' do
|
|
60
60
|
vmx = File.read('lib/junoser/parser.rb')
|
61
61
|
|
62
62
|
vsrx.scan(/^ +([0-9a-z_]+) *$/).flatten.uniq.sort.each do |method|
|
63
|
-
next if [
|
63
|
+
next if %w[arg end ipaddr time].include?(method)
|
64
64
|
|
65
65
|
puts method unless vsrx =~ /rule\(:#{method}\)/m || vmx =~ /rule\(:#{method}\)/m
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
69
|
+
namespace :rule do
|
70
|
+
desc 'Show rule tree'
|
71
|
+
task :tree, [:path] do |_, args|
|
72
|
+
if args.path
|
73
|
+
raise "File not found: #{args.path}" unless File.exist?(args.path)
|
74
|
+
Junoser::RuleTree::Parser.new(File.read(args.path)).print
|
75
|
+
else
|
76
|
+
Junoser::RuleTree::Parser.new($stdin.read).print
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
69
81
|
Rake::TestTask.new do |t|
|
70
82
|
t.libs << 'test'
|
71
83
|
|
data/lib/junoser/development.rb
CHANGED
data/lib/junoser/js_ruler.rb
CHANGED