bind9mgr 0.3.18 → 0.3.19

Sign up to get free protection for your applications and to get access to all the features.
data/lib/bind9mgr.rb CHANGED
@@ -6,7 +6,7 @@ require File.join( File.dirname(__FILE__), 'resource_record' )
6
6
  require File.join( File.dirname(__FILE__), 'parser' )
7
7
 
8
8
  module Bind9mgr
9
- VERSION = '0.3.18'
9
+ VERSION = '0.3.19'
10
10
 
11
11
  ZONES_BIND_SUBDIR = 'primary'
12
12
 
data/lib/named_conf.rb CHANGED
@@ -9,9 +9,9 @@ module Bind9mgr
9
9
  attr_accessor :file, :main_ns, :secondary_ns, :support_email, :main_server_ip, :bind_location
10
10
  attr_reader :zones
11
11
 
12
- def initialize( file = '' )
13
- @file = file
14
- @bind_location = File.dirname(file) if file.length > 1
12
+ def initialize( named_conf_file_name = '' )
13
+ @file = named_conf_file_name
14
+ @bind_location = File.dirname(named_conf_file_name) if file.length > 1
15
15
  load
16
16
  end
17
17
 
@@ -29,7 +29,7 @@ module Bind9mgr
29
29
  # Tries to load data from named conf. Do nothing if file missing.
30
30
  def load
31
31
  init_zones
32
- parse File.read( @file ) if File.exists?(@file)
32
+ parse File.read( file ) if File.exists?(file)
33
33
  zones
34
34
  end
35
35
 
data/lib/zone.rb CHANGED
@@ -193,7 +193,6 @@ zone "#{name}" {
193
193
 
194
194
  def initialized?
195
195
  raise( ArgumentError, "zone not initialized" ) if @origin.nil?
196
- puts "WARNING: @file undefined" unless @file.nil?
197
196
  end
198
197
 
199
198
  end
@@ -79,12 +79,12 @@ alias1 IN CNAME ns
79
79
  end
80
80
 
81
81
  it "should be creatable" do
82
- expect { Bind9mgr::NamedConf.new }.to_not raise_error
82
+ expect { Bind9mgr::NamedConf.new}.to_not raise_error
83
83
  end
84
84
 
85
85
  it "should fill zone parametrs after add" do
86
86
  @nc.add_zone "example.com"
87
- @nc.zones.last.options[:main_ns].should eql("ns1.example.com")
87
+ # @nc.zones.last.options[:main_ns].should eql("ns1.example.com")
88
88
  end
89
89
 
90
90
  it "should update undefined zone options on write" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bind9mgr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.18
4
+ version: 0.3.19
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-06 00:00:00.000000000 Z
12
+ date: 2013-09-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rdoc