phut 0.6.8 → 0.6.9

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
  SHA1:
3
- metadata.gz: 181e372bc2ac6c421b74ce2b453f79c73aa664ac
4
- data.tar.gz: 6ff377299788daade005648046b3722e201671b7
3
+ metadata.gz: b50203b27a14ab980a7a909f8bae162811fedd3a
4
+ data.tar.gz: 6d7ee1f2103c4e900fcc54b39b782e1fc823c0a7
5
5
  SHA512:
6
- metadata.gz: e84bbfc6ed6dbc5fd63bf0c11515c64081e7e7fc858d7fccdf54ea33fe14c3adf357f28e00ba946c29641cb12f0d6bf30e46f08aef996bdbfd2e08fc82af9335
7
- data.tar.gz: 37c94364ab404e3926124b6305644fd31149ae23d662d1c9011d47a2fb183896106d54963ebe2a706b545960083c6a38d56d66f30b9b37de0de03890879ab158
6
+ metadata.gz: 843cd07b5543f2628046ad7208484d604f27d567c2aea1fbd4c5398aef20c2fd7d18ba292e87edbcd8795bc78f85063b487d125b387be6246d9fc760107bc5ff
7
+ data.tar.gz: 9cb93c48ddcfab0104cf35eb0447813071c4f60daf5a515cfde9f6f6fba78f31f9e3bc63a4e0484250227deacf1106345bfbc0bd02225284675461db499047b1
data/CHANGELOG.md CHANGED
@@ -3,6 +3,11 @@
3
3
  ## develop (unreleased)
4
4
 
5
5
 
6
+ ## 0.6.9 (9/9/2015)
7
+ ### Changes
8
+ * Check the existance of pid, log and socket directory.
9
+
10
+
6
11
  ## 0.6.8 (9/9/2015)
7
12
  ### Changes
8
13
  * Raises Phut::vSwitch::AlreadyRunning when phut failed to start vSwitch.
data/lib/phut/setting.rb CHANGED
@@ -24,6 +24,7 @@ module Phut
24
24
  end
25
25
 
26
26
  def pid_dir=(path)
27
+ fail "No such directory: #{path}" unless FileTest.directory?(path)
27
28
  @options[:pid_dir] = File.expand_path(path)
28
29
  end
29
30
 
@@ -32,6 +33,7 @@ module Phut
32
33
  end
33
34
 
34
35
  def log_dir=(path)
36
+ fail "No such directory: #{path}" unless FileTest.directory?(path)
35
37
  @options[:log_dir] = File.expand_path(path)
36
38
  end
37
39
 
@@ -40,6 +42,7 @@ module Phut
40
42
  end
41
43
 
42
44
  def socket_dir=(path)
45
+ fail "No such directory: #{path}" unless FileTest.directory?(path)
43
46
  @options[:socket_dir] = File.expand_path(path)
44
47
  end
45
48
  end
data/lib/phut/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # Base module.
2
2
  module Phut
3
- VERSION = '0.6.8'
3
+ VERSION = '0.6.9'
4
4
  end
data/spec/phut_spec.rb CHANGED
@@ -1,6 +1,8 @@
1
1
  require 'phut/setting'
2
2
 
3
3
  describe Phut do
4
+ Given { allow(FileTest).to receive(:directory?).and_return(true) }
5
+
4
6
  describe '.pid_dir' do
5
7
  Given(:result) { Phut.pid_dir }
6
8
  Then { result == Dir.tmpdir }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phut
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.8
4
+ version: 0.6.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yasuhito Takamiya