network-utility 1.1.34 → 1.1.36

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/document/config.md +11 -11
  3. data/network.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 50d1777bb5c45279d6c89a58090782da20eac56854a5cbe8f60cd6001fe841ca
4
- data.tar.gz: 03a22af38e0dbef4e4cf8517d3d150aa73f266b9755b99b5bea9b3cad3116243
3
+ metadata.gz: 65716ca5467b8a54ee81c0ce88e292751add2763c7a9eae97271a3bc62bdce1f
4
+ data.tar.gz: 5968c31b641681cbe0e2e6facd6b4011c5fcf5a14cf3fdd64c6eb60aab2918d1
5
5
  SHA512:
6
- metadata.gz: 2ff2532ca1192170219d5157748a9fe48c8fd6f6a9e0098e126af0840bb157368b443f9b61ac59a5a516160fab800914cec47744921d801cd9a9bd2584dd89af
7
- data.tar.gz: a9c7ab1c3349c7951515db15708cdcc4dc8e816db3390334bceb0a7772cacad2b7eda62686b1ccefa2dc90e41b3f225c2323cc4de9c7353280f603974e2c2642
6
+ metadata.gz: 4e8408045681d38b137b8a515638e75084799fcc8c04d3c783a65c80134258d23aa7f17a542b98997323be12cfc083b0707d300fd82434f7489df01e6c4a6046
7
+ data.tar.gz: 98d3d6ffad4352ad92ab1393d1d6517b58ad3b4ffcade4663562b748e2e075edfe4459b13f0263d13d45f5120c6ba790da14e8f5a50b90bd84f563694559102c
data/document/config.md CHANGED
@@ -225,9 +225,9 @@ module NE40E
225
225
  def 配置解析 raw,*guards
226
226
  cfg = {}
227
227
  hostname = guards[0] || raw.split("\n").find{|line|line.include?("sysname ")}.to_s.split("sysname ")[1]
228
- prepart = raw.split(/#{hostname}>( )*display current-configuration( )*\n/)[1]
229
- return cfg unless prepart
230
- content = prepart.split(/<#{hostname}>( )*\n/)[0]
228
+ # prepart = raw.split(/#{hostname}>( )*display current-configuration( )*\n/)[1]
229
+ # return cfg unless prepart
230
+ content = raw#prepart.split(/<#{hostname}>( )*\n/)[0]
231
231
  pretent = "\n"+content
232
232
  while pretent.include?("\n#\n#"); pretent = pretent.gsub("\n#\n#","\n#") end
233
233
  pieces = pretent.split("\n#\n").select{|pc|pc.strip != ''}
@@ -254,9 +254,9 @@ module NE80E
254
254
  def 配置解析 raw,*guards
255
255
  cfg = {}
256
256
  hostname = guards[0] || raw.split("\n").find{|line|line.include?("sysname ")}.to_s.split("sysname ")[1]
257
- prepart = raw.split(/#{hostname}>( )*display current-configuration( )*\n/)[1]
258
- return cfg unless prepart
259
- content = prepart.split(/<#{hostname}>( )*\n/)[0]
257
+ # prepart = raw.split(/#{hostname}>( )*display current-configuration( )*\n/)[1]
258
+ # return cfg unless prepart
259
+ content = raw#prepart.split(/<#{hostname}>( )*\n/)[0]
260
260
  pretent = "\n"+content
261
261
  while pretent.include?("\n#\n#"); pretent = pretent.gsub("\n#\n#","\n#") end
262
262
  pieces = pretent.split("\n#\n").select{|pc|pc.strip != ''}
@@ -294,11 +294,11 @@ module ME60_16
294
294
  end
295
295
  cfg = {}
296
296
  hostname = guards[0] || raw.split("\n").find{|line|line.include?("sysname ")}.to_s.split("sysname ")[1]
297
- prepart = raw.split(/#{hostname}>( )*display current-configuration( )*\n/)[1]
298
- prepart = raw.split("#{hostname}>display current-configuration\n")[1] unless prepart
299
- return cfg unless prepart
300
- content = prepart.split(/<#{hostname}>( )*/)[0]
301
- content = prepart.split("\nreturn")[0] unless content
297
+ # prepart = raw.split(/#{hostname}>( )*display current-configuration( )*\n/)[1]
298
+ # prepart = raw.split("#{hostname}>display current-configuration\n")[1] unless prepart
299
+ # return cfg unless prepart
300
+ content = raw#prepart.split(/<#{hostname}>( )*\n/)[0]
301
+ # content = prepart.split("\nreturn")[0] unless content
302
302
  pretent = "\n"+content
303
303
  while pretent.include?("\n#\n#"); pretent = pretent.gsub("\n#\n#","\n#") end
304
304
  pieces = pretent.split("\n#\n").select{|pc|pc.strip != ''}
data/network.rb CHANGED
@@ -22,5 +22,5 @@
22
22
  ].each{|mod|require mod}
23
23
 
24
24
  module Network
25
- VERSION = '1.1.34'
25
+ VERSION = '1.1.36'
26
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: network-utility
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.34
4
+ version: 1.1.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt