vipnet_parser 0.2 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/vipnet_parser.rb +4 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6c12c7a620a2e80a808e81ef380e3c84ef4498a4
4
- data.tar.gz: b5c9c4dd56f9cc43619ea7109705e628cc3fb513
3
+ metadata.gz: e0a1997613b4a4ac1fe34f9286285f6bd836a7ba
4
+ data.tar.gz: d2cbefaed7171372af531b3dfc2409869c528f9f
5
5
  SHA512:
6
- metadata.gz: c6c2300da35ea7e80b52899f17a5ca24063ba09db10625677e22c7d198b19e4cf8bc9c729fe103ca98ff01c28313fab6c32b5db9e6d39c600bd03adb34817697
7
- data.tar.gz: 83d219af3d3cd9395db168783b08f9b14b70479849b41be6a4a3ce737bb29b04a913b626920130026bf117ebbc1582e6afdfab0675737c03d2fbb2c45d615c2b
6
+ metadata.gz: 9203be7210a078af027ed913d5f212e66706c1b8f146a3a03bf7420bf09280bd768c93ec198963154f6836ddfc8d865598e861484cedc4cf8029debb8ed237a6
7
+ data.tar.gz: 2f5b3c88ad25cf94c488fd1fecc7b3e04e81fca06a5ed4e6a8d1132f4defb20ae0fe59d903c3457760efd46cc64d1492be2d032773e4945c29f05ccac08a57b1
data/lib/vipnet_parser.rb CHANGED
@@ -71,7 +71,7 @@ module VipnetParser
71
71
 
72
72
  module_function :id, :network
73
73
 
74
- class VipnetParser
74
+ class VipnetConfig
75
75
  def ==(other)
76
76
  res = true
77
77
  @props.each do |prop|
@@ -81,7 +81,7 @@ module VipnetParser
81
81
  end
82
82
  end
83
83
 
84
- class Iplirconf < VipnetParser
84
+ class Iplirconf < VipnetConfig
85
85
  PROPS = [:content, :id, :sections]
86
86
  attr_accessor *PROPS, :last_error
87
87
  private_constant :PROPS
@@ -144,7 +144,7 @@ module VipnetParser
144
144
  private :get_section_param
145
145
  end
146
146
 
147
- class Nodename < VipnetParser
147
+ class Nodename < VipnetConfig
148
148
  PROPS = [:content, :records]
149
149
  attr_accessor *PROPS, :last_error
150
150
  private_constant :PROPS
@@ -167,7 +167,7 @@ module VipnetParser
167
167
  tmp_record[:name].rstrip!
168
168
  tmp_record[:enabled] = { "1" => true, "0" => false }[tmp_record[:enabled]]
169
169
  tmp_record[:category] = { "A" => :client, "S" => :server, "G" => :group }[tmp_record[:category]]
170
- @records[tmp_record[:id]] = tmp_record
170
+ @records[VipnetParser::id(tmp_record[:id])[0]] = tmp_record
171
171
  end
172
172
  true
173
173
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vipnet_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Morozov