fog-bouncer 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -56,7 +56,7 @@ module Fog
56
56
  end
57
57
 
58
58
  def match(source)
59
- "#{name}@#{user_id}" == source || name == source
59
+ "#{name}@#{user_id}" == source || "#{name}@#{user_alias}" == source || name == source
60
60
  end
61
61
 
62
62
  def user_id
@@ -1,5 +1,5 @@
1
1
  module Fog
2
2
  module Bouncer
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -41,5 +41,12 @@ describe Fog::Bouncer do
41
41
  source.user_id.must_equal ENV['AWS_ACCOUNT_ID']
42
42
  source.name.must_equal "douchebag"
43
43
  end
44
+
45
+ it "doesn't create duplicate sources" do
46
+ guido = @doorlist.groups.find { |g| g.name == "guido" }
47
+
48
+ guido.sources.size.must_equal 4
49
+ guido.sources.select { |s| s.source == "douchebag@jersey_shore" }.size.must_equal 1
50
+ end
44
51
  end
45
52
  end
@@ -9,6 +9,10 @@ Fog::Bouncer.security :private do
9
9
  tcp 22
10
10
  end
11
11
 
12
+ define :multiple_sources, "douchebag@jersey_shore" do
13
+ tcp 70
14
+ end
15
+
12
16
  use :ssh
13
17
 
14
18
  group "douchebag", "Don't let them in!" do
@@ -24,6 +28,8 @@ Fog::Bouncer.security :private do
24
28
  end
25
29
 
26
30
  group "guido", "Definitely don't let them in!" do
31
+ use :multiple_sources
32
+
27
33
  source "douchebag@jersey_shore" do
28
34
  tcp 7070..8080
29
35
  udp 8081
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fog-bouncer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
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: 2012-04-20 00:00:00.000000000 Z
12
+ date: 2012-05-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: clamp