junoser 0.4.1 → 0.4.4

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
  SHA256:
3
- metadata.gz: b370402809bb2214265f0dd6e692c591337882121f7f5c1f8f3653553cd29f83
4
- data.tar.gz: 72dd3c61381706e34cba7618e6402f6be59380137c3b7198747d898e17d550c0
3
+ metadata.gz: 7c6e7f0c484d2690412ecf2bc8f3154fe0ff7228c61ace8ec588ea56e234d078
4
+ data.tar.gz: 85278e68967cded8e04f1e182996b9a10dc286410dd147ba50b2f0b09a982918
5
5
  SHA512:
6
- metadata.gz: 606fec606c9882cddbef3f1cc687d00f19cf0f535acdb84da448dfea730e5c7d69f16d4837014c5b7c4b1a68fea00c957f72c867ffcdccae3773b7fbf2c76b5d
7
- data.tar.gz: d88215e1ef62177ed15e5c0e76a149ac53a96880fb19c9bfd32c275e750b2aa298bb39a6a01b6a3ee3b650592da1d843b7bb443ac9bbfa75ef620b1e2c061752
6
+ metadata.gz: 9a22aa17e1ffbbe6d1a34b345fdeecfe4a3e3013b4b5d9b44458d596a3243d7692edc9a90f020493d74cc1403ce74f23ec1636271d4e6e38aaa6a86d3151b7eb
7
+ data.tar.gz: f56ed2f48e4cc775d8110b80822794471d77049d8b89106474e1daf04d05aabf1a92cdbf992c4a6c863f55bcd947e2c35bb2c8070b3d75cbd1adceb54ae513e6
@@ -0,0 +1,30 @@
1
+ name: Test on Ubuntu
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ test:
7
+ runs-on: ${{ matrix.os }}
8
+ continue-on-error: ${{ matrix.experimental }}
9
+ strategy:
10
+ fail-fast: false
11
+ matrix:
12
+ ruby-version: ['3.0', '2.7', '2.6']
13
+ os: [ubuntu-latest]
14
+ experimental: [false]
15
+ include:
16
+ - ruby-version: head
17
+ os: ubuntu-latest
18
+ experimental: true
19
+
20
+ name: Test with ruby ${{ matrix.ruby-version }} on ${{ matrix.os }}
21
+ steps:
22
+ - uses: actions/checkout@v2
23
+ - name: Set up Ruby
24
+ uses: ruby/setup-ruby@v1
25
+ with:
26
+ ruby-version: ${{ matrix.ruby-version }}
27
+ - name: Install dependencies
28
+ run: bundle install
29
+ - name: Run tests
30
+ run: bundle exec rake test
@@ -0,0 +1,7 @@
1
+ repos:
2
+ - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
3
+ rev: v5.0.0
4
+ hooks:
5
+ - id: commitlint
6
+ stages: [commit-msg]
7
+ additional_dependencies: ['@commitlint/config-conventional']
data/CHANGELOG.md CHANGED
@@ -1,3 +1,32 @@
1
+ ## [0.4.4] - 2022-02-26
2
+
3
+ ### Fixed
4
+
5
+ * "snmp name" instead of "snmp system-name"
6
+
7
+
8
+ ## [0.4.3] - 2021-09-28
9
+
10
+ ### Fixed
11
+
12
+ * A Nokogiri's [security vulnerability](https://github.com/advisories/GHSA-2rr5-8q37-2w7h)
13
+
14
+
15
+ ## [0.4.2] - 2021-08-30
16
+
17
+ ### Added
18
+
19
+ * Newly supported syntax
20
+ * "virtual-chassis vcp-snmp-statistics"
21
+ * "application_object"
22
+
23
+ ### Fixed
24
+
25
+ * Keywords "tls", "group", "dest-nat-rule-match", "src-nat-rule-match", and "static-nat-rule-match" might be marked as invalid in some hierarchies
26
+ * "applications application xxx term xxx"
27
+ * "security"
28
+
29
+
1
30
  ## [0.4.1] - 2021-06-06
2
31
 
3
32
  ### Added
@@ -7,7 +36,7 @@
7
36
 
8
37
  ### Fixed
9
38
 
10
- * "scpf-link", "https", "inet6", "icmp6", "icmpv6", "ospf3", and "snmptrap" keywords might be marked as invalid in some hierarchies
39
+ * Keywords "scpf-link", "https", "inet6", "icmp6", "icmpv6", "ospf3", and "snmptrap" might be marked as invalid in some hierarchies
11
40
  * "policy-options community xxx members"
12
41
  * "policy-options route-distinguisher xxx members"
13
42
  * "routing-options confederation members"
data/Gemfile.lock CHANGED
@@ -1,21 +1,21 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- junoser (0.4.1)
4
+ junoser (0.4.4)
5
5
  parslet
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- mini_portile2 (2.5.3)
11
- nokogiri (1.11.7)
12
- mini_portile2 (~> 2.5.0)
10
+ mini_portile2 (2.8.0)
11
+ nokogiri (1.13.3)
12
+ mini_portile2 (~> 2.8.0)
13
13
  racc (~> 1.4)
14
14
  parslet (2.0.0)
15
- power_assert (2.0.0)
16
- racc (1.5.2)
17
- rake (13.0.3)
18
- test-unit (3.4.4)
15
+ power_assert (2.0.1)
16
+ racc (1.6.0)
17
+ rake (13.0.6)
18
+ test-unit (3.5.3)
19
19
  power_assert
20
20
 
21
21
  PLATFORMS
@@ -29,4 +29,4 @@ DEPENDENCIES
29
29
  test-unit
30
30
 
31
31
  BUNDLED WITH
32
- 2.2.16
32
+ 2.2.26
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Junoser
2
2
 
3
- [![Build Status](https://travis-ci.org/codeout/junoser.svg)](https://travis-ci.org/codeout/junoser)
3
+ [![Test on Ubuntu](https://github.com/codeout/junoser/actions/workflows/test-linux.yaml/badge.svg)](https://github.com/codeout/junoser/actions/workflows/test-linux.yaml)
4
4
  [![Code Climate](https://codeclimate.com/github/codeout/junoser.png)](https://codeclimate.com/github/codeout/junoser)
5
5
  [![Inline docs](http://inch-ci.org/github/codeout/junoser.svg)](http://inch-ci.org/github/codeout/junoser)
6
6
 
data/Rakefile CHANGED
@@ -19,12 +19,22 @@ def open_files(input, output, &block)
19
19
  o.close
20
20
  end
21
21
 
22
+ def move_wildcards(element)
23
+ ['ipaddr', 'ipv6addr', 'ipprefix'].each do |pattern|
24
+ element.xpath(%[.//xsd:element[@type="#{pattern}"]/xsd:annotation/xsd:appinfo/flag[text()="nokeyword"]/../../..]).each do |wildcard|
25
+ parent = wildcard.parent
26
+ removed = wildcard.remove
27
+ parent << removed
28
+ end
29
+ end
30
+ end
22
31
 
23
32
  namespace :build do
24
33
  desc 'Build an intermediate config hierarchy'
25
34
  task :config do
26
35
  open_files(xsd_path, rule_path) do |input, output|
27
36
  Nokogiri::XML(input).root.remove_unused.xpath('/xsd:schema/*').each do |e|
37
+ move_wildcards e # Move wildcard elements to the end of siblings as they capture keywords unexpectedly
28
38
  output.puts e.to_config
29
39
  end
30
40
  end
@@ -56,7 +66,6 @@ task 'find-srx-methods' do
56
66
  end
57
67
  end
58
68
 
59
-
60
69
  Rake::TestTask.new do |t|
61
70
  t.libs << 'test'
62
71
 
@@ -0,0 +1,5 @@
1
+ module.exports = {
2
+ extends: ["@commitlint/config-conventional"],
3
+ rules: {
4
+ },
5
+ };