rack-ip-authorizer 0.0.2 → 0.0.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.
- checksums.yaml +6 -14
- data/lib/rack/version.rb +1 -1
- data/lib/rack-ip-authorizer.rb +6 -8
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
NWZiYmVlZjUzM2JjYTY5ZWY1NjMwMDkwNzA3ZGMyZjA4YjEwYmY1OWM5NmFi
|
10
|
-
MTljNmNhODRlMzlmOTg4ZDdjMTRkZjAzODdiY2MyYWEyMGEwMjZlNDFhMTcz
|
11
|
-
MTM0Nzc5NDhmNWRmOTUyZTQ5Nzc0OTU4MDMzOGRjMGM0MjdhMjQ=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
MzZmY2MyY2Y5NGJhMDI4NmM1NzYxNWFjMDNhMzIyMDRmZDdmNDlhZDBkNzJh
|
14
|
-
NDRhNjk5MzU0YWRmNzc3MzQwNzgzZTJkZDU0MWRmNGI1NDA2ZmMzZGNhNDY3
|
15
|
-
MjFiZmRkZWU2ZDBmNmFlMzI3Y2NhZWY0NGJlZGYxZGIwMmExYjg=
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7276aa411d774580759f3c27e3eb32205106da5f
|
4
|
+
data.tar.gz: 43e5ae7de9fb58a0ec906d7c46d7a963aebecad3
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 14a09ff33288eb8b63bf7cbfeb6c12054013dd0e74bb4c522ba7fc3ea090b808d2699b68408bdd980a9aab1de783b8d8eae5ae997eabaf9c6c097f935a4a77ba
|
7
|
+
data.tar.gz: c2c1363f3afb39e18b023295e9d01fa73242a007e1f2501de8c49521b75dbdc0b384a51f89e17e5f84bf019f8f0364715ecf911322f46e6bff3747260fbac3c1
|
data/lib/rack/version.rb
CHANGED
data/lib/rack-ip-authorizer.rb
CHANGED
@@ -4,16 +4,14 @@ require 'yaml'
|
|
4
4
|
if defined? Rails
|
5
5
|
case Rails::VERSION::MAJOR
|
6
6
|
when 3
|
7
|
-
path = File.join(File.expand_path('config'), '/ip_authorizations.yml')
|
8
|
-
|
9
|
-
if File.exists?(path)
|
10
|
-
ip_authorizations_by_path = YAML.load_file(path)
|
11
|
-
else
|
12
|
-
raise "config/ip_authorizations.yml is missing"
|
13
|
-
end
|
14
|
-
|
15
7
|
class Rack::IpAuthorizer::Railtie < Rails::Railtie
|
16
8
|
initializer('rack-ip-authorizer.append') { |app|
|
9
|
+
path = File.join(File.expand_path('config'), '/ip_authorizations.yml')
|
10
|
+
if File.exists?(path)
|
11
|
+
ip_authorizations_by_path = YAML.load_file(path)
|
12
|
+
else
|
13
|
+
raise "config/ip_authorizations.yml is missing"
|
14
|
+
end
|
17
15
|
app.config.middleware.insert_after(ActionDispatch::RemoteIp, Rack::IpAuthorizer, ip_authorizations_by_path)
|
18
16
|
}
|
19
17
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-ip-authorizer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thibault El Zamek, Cédric Darné, Lionel Oto
|
@@ -14,14 +14,14 @@ dependencies:
|
|
14
14
|
name: rack
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
@@ -42,14 +42,14 @@ dependencies:
|
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '1.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
@@ -75,8 +75,8 @@ extra_rdoc_files: []
|
|
75
75
|
files:
|
76
76
|
- LICENSE.txt
|
77
77
|
- README.md
|
78
|
-
- lib/rack/ip_authorizer.rb
|
79
78
|
- lib/rack/version.rb
|
79
|
+
- lib/rack/ip_authorizer.rb
|
80
80
|
- lib/rack-ip-authorizer.rb
|
81
81
|
- spec/rake_ip_authorizer_spec.rb
|
82
82
|
homepage: https://github.com/c4mprod/rack-ip-authorizer
|
@@ -89,17 +89,17 @@ require_paths:
|
|
89
89
|
- lib
|
90
90
|
required_ruby_version: !ruby/object:Gem::Requirement
|
91
91
|
requirements:
|
92
|
-
- -
|
92
|
+
- - '>='
|
93
93
|
- !ruby/object:Gem::Version
|
94
94
|
version: '0'
|
95
95
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
96
96
|
requirements:
|
97
|
-
- -
|
97
|
+
- - '>='
|
98
98
|
- !ruby/object:Gem::Version
|
99
99
|
version: '0'
|
100
100
|
requirements: []
|
101
101
|
rubyforge_project:
|
102
|
-
rubygems_version: 2.
|
102
|
+
rubygems_version: 2.1.11
|
103
103
|
signing_key:
|
104
104
|
specification_version: 4
|
105
105
|
summary: Basic Rack middleware for Rails 3 to authorize access to path by IP using
|