firewall_constraint 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +36 -0
- data/firewall_constraint.gemspec +1 -1
- data/lib/firewall_constraint/version.rb +1 -1
- metadata +5 -4
data/README.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
FirewallConstraint
|
2
|
+
========
|
3
|
+
|
4
|
+
Easy whitelist firewalling for Rails 3 route constraints
|
5
|
+
|
6
|
+
gem 'firewall_constraint'
|
7
|
+
|
8
|
+
Or:
|
9
|
+
|
10
|
+
gem install firewall_constraint
|
11
|
+
|
12
|
+
-----
|
13
|
+
|
14
|
+
config/routes.rb:
|
15
|
+
|
16
|
+
get 'dummy/index' => 'dummy#index'
|
17
|
+
get 'dummy/blocked_by_inline' => 'dummy#blocked_by_inline', :constraints => FirewallConstraint::Constraint.new
|
18
|
+
|
19
|
+
constraints FirewallConstraint::Constraint.new do
|
20
|
+
get 'dummy/blocked_by_block' => 'dummy#blocked_by_block'
|
21
|
+
end
|
22
|
+
|
23
|
+
constraints FirewallConstraint::Constraint.new(['127.0.0.1']) do
|
24
|
+
get 'dummy/blocked_by_dynamic' => 'dummy#blocked_by_dynamic'
|
25
|
+
end
|
26
|
+
|
27
|
+
----
|
28
|
+
|
29
|
+
Uses a config file if ips not present in routes
|
30
|
+
|
31
|
+
config/firewall_constraint.yml:
|
32
|
+
|
33
|
+
test:
|
34
|
+
- 10.0.0.0/8
|
35
|
+
|
36
|
+
----
|
data/firewall_constraint.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.platform = Gem::Platform::RUBY
|
9
9
|
s.authors = ["Mike Auclair"]
|
10
10
|
s.email = ["mike@mikeauclair.com"]
|
11
|
-
s.homepage = ""
|
11
|
+
s.homepage = "http://github.com/mikeauclair/firewall_constraint"
|
12
12
|
s.summary = %q{Rails 3 firewall route constraints}
|
13
13
|
s.description = %q{Rails 3 firewall route constraints}
|
14
14
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: firewall_constraint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Mike Auclair
|
@@ -106,6 +106,7 @@ extra_rdoc_files: []
|
|
106
106
|
files:
|
107
107
|
- .gitignore
|
108
108
|
- Gemfile
|
109
|
+
- README.md
|
109
110
|
- Rakefile
|
110
111
|
- firewall_constraint.gemspec
|
111
112
|
- lib/firewall_constraint.rb
|
@@ -162,7 +163,7 @@ files:
|
|
162
163
|
- spec/requests/dummy_controller_spec.rb
|
163
164
|
- spec/spec_helper.rb
|
164
165
|
has_rdoc: true
|
165
|
-
homepage:
|
166
|
+
homepage: http://github.com/mikeauclair/firewall_constraint
|
166
167
|
licenses: []
|
167
168
|
|
168
169
|
post_install_message:
|