sheepsafe 0.2.2 → 0.2.3

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.
data/History.txt CHANGED
@@ -1,3 +1,9 @@
1
+ === 0.2.3
2
+
3
+ - Recycle the proxy server on every launch when on the Untrusted
4
+ network. Deals with moving between different untrusted networks and
5
+ responding to those changes automatically.
6
+
1
7
  === 0.2.2
2
8
 
3
9
  - Make Ruby wrapper around socks daemon that keeps trying to run ssh
@@ -38,6 +38,10 @@ module Sheepsafe
38
38
  end
39
39
  @config.last_network = @network
40
40
  @config.write
41
+ elsif !@network.trusted?
42
+ # recycle the proxy server on network changes
43
+ bring_socks_proxy 'down'
44
+ bring_socks_proxy 'up'
41
45
  end
42
46
  else
43
47
  log("AirPort is off")
data/lib/sheepsafe.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Sheepsafe
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
4
4
 
5
5
  require 'sheepsafe/config'
data/sheepsafe.gemspec CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'sheepsafe'
5
- s.version = '0.2.2'
6
- s.date = '2010-11-02'
5
+ s.version = '0.2.3'
6
+ s.date = '2010-11-09'
7
7
 
8
8
  s.rubyforge_project = %q{caldersphere}
9
9
 
@@ -50,10 +50,18 @@ describe Sheepsafe::Controller do
50
50
  config.stub :last_network => network
51
51
  end
52
52
 
53
- it "does nothing" do
53
+ it "does not touch config" do
54
+ network.stub :trusted? => true
54
55
  config.should_not_receive(:write)
55
56
  controller.run
56
57
  end
58
+
59
+ it "recycles the proxy server process when on the untrusted network" do
60
+ network.stub :trusted? => false
61
+ controller.should_receive(:bring_socks_proxy).with('down').ordered
62
+ controller.should_receive(:bring_socks_proxy).with('up').ordered
63
+ controller.run
64
+ end
57
65
  end
58
66
 
59
67
  context "network is down" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sheepsafe
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 2
10
- version: 0.2.2
9
+ - 3
10
+ version: 0.2.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Nick Sieger
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-02 00:00:00 -05:00
18
+ date: 2010-11-09 00:00:00 -08:00
19
19
  default_executable: sheepsafe
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency