vagrant-rubydns 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -15,6 +15,7 @@ spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
+ tags
18
19
 
19
20
  .vagrant
20
21
  .vagrant_dns.json
@@ -17,6 +17,8 @@ module VagrantRubydns
17
17
  def self.run
18
18
  server = self
19
19
  RubyDNS::run_server(:listen => INTERFACES) do
20
+ logger.level = Logger::INFO
21
+
20
22
  match(/.*/, IN::A) do |transaction|
21
23
  ip = Store.get(transaction.name)
22
24
  if ip
@@ -1,5 +1,5 @@
1
1
  module Vagrant
2
2
  module Rubydns
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
data/test/test_helper.rb CHANGED
@@ -12,6 +12,11 @@ MiniTest::Unit.after_tests { VagrantRubydns::Store.clear! }
12
12
 
13
13
  require 'minitest/autorun'
14
14
 
15
+ def fake_environment(extras={})
16
+ env = Vagrant::Environment.new
17
+ { ui: FakeUI, global_config: env.config_global }.merge(extras)
18
+ end
19
+
15
20
  def fake_environment_with_machine(hostname, ip)
16
21
  provider_cls = Class.new do
17
22
  def initialize(machine)
@@ -34,5 +39,5 @@ def fake_environment_with_machine(hostname, ip)
34
39
  machine.config.vm.hostname = hostname
35
40
  machine.config.vm.network :private_network, ip: ip
36
41
 
37
- { machine: machine, ui: FakeUI }
42
+ { machine: machine, ui: FakeUI, global_config: env.config_global }
38
43
  end
@@ -5,7 +5,8 @@ module VagrantRubydns
5
5
  module Action
6
6
  describe Setup do
7
7
  it "calls the next app in the chain" do
8
- env = {called: false, ui: FakeUI}
8
+ env = fake_environment(called: false)
9
+
9
10
  app = lambda { |e| e[:called] = true }
10
11
 
11
12
  setup = Setup.new(app, nil)
@@ -5,7 +5,8 @@ module VagrantRubydns
5
5
  module Action
6
6
  describe Teardown do
7
7
  it "calls the next app in the chain" do
8
- env = {called: false, ui: FakeUI}
8
+ env = fake_environment(called: false)
9
+
9
10
  app = lambda { |e| e[:called] = true }
10
11
 
11
12
  teardown = Teardown.new(app, nil)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-rubydns
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
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-19 00:00:00.000000000 Z
12
+ date: 2013-03-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rubydns