rack-ip-authorizer 0.0.1 → 0.0.2
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 +14 -6
- data/README.md +8 -6
- data/lib/rack/ip_authorizer.rb +1 -1
- data/lib/rack/version.rb +2 -2
- metadata +13 -12
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NGI3ZjFkZWVhZmI3NTE1YzAzZDhkOWU2NmE5ODdkMzY4NWNhODBlNA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
Y2VjMjFkNWQwOTg5MmNlZmE3N2Y5NjQ1NjgwZjkxYjNhMTQ4ZjQ0Ng==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NWZiYmVlZjUzM2JjYTY5ZWY1NjMwMDkwNzA3ZGMyZjA4YjEwYmY1OWM5NmFi
|
10
|
+
MTljNmNhODRlMzlmOTg4ZDdjMTRkZjAzODdiY2MyYWEyMGEwMjZlNDFhMTcz
|
11
|
+
MTM0Nzc5NDhmNWRmOTUyZTQ5Nzc0OTU4MDMzOGRjMGM0MjdhMjQ=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MzZmY2MyY2Y5NGJhMDI4NmM1NzYxNWFjMDNhMzIyMDRmZDdmNDlhZDBkNzJh
|
14
|
+
NDRhNjk5MzU0YWRmNzc3MzQwNzgzZTJkZDU0MWRmNGI1NDA2ZmMzZGNhNDY3
|
15
|
+
MjFiZmRkZWU2ZDBmNmFlMzI3Y2NhZWY0NGJlZGYxZGIwMmExYjg=
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Rack::Ip::Authorizer
|
2
2
|
|
3
|
-
Basic Rack middleware for
|
3
|
+
Basic Rack middleware for Rails 3 to authorize access to path by IP
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -20,8 +20,8 @@ Or install it yourself as:
|
|
20
20
|
|
21
21
|
### Rails 3 apps
|
22
22
|
|
23
|
-
1. Create a file named "ip_authorizations.yml" in
|
24
|
-
2. Fill it with
|
23
|
+
1. Create a file named "ip_authorizations.yml" in config directory
|
24
|
+
2. Fill it with paths (keys) and IPs (values) see example below
|
25
25
|
|
26
26
|
```yaml
|
27
27
|
admin:
|
@@ -33,18 +33,20 @@ superadmin:
|
|
33
33
|
- 192.168.0.2
|
34
34
|
```
|
35
35
|
|
36
|
-
Environment filter
|
36
|
+
### Environment filter
|
37
37
|
|
38
|
-
Create an initializer and
|
38
|
+
Create an initializer and add:
|
39
39
|
|
40
40
|
```ruby
|
41
41
|
Rack::IpAuthorizer.env_to_check = ['staging','development']
|
42
42
|
```
|
43
43
|
|
44
|
+
Based on the file names in 'config/environments' you can use any of them including Rails defaults.
|
45
|
+
|
44
46
|
## Contributing
|
45
47
|
|
46
48
|
1. Fork it
|
47
49
|
2. Create your feature branch
|
48
50
|
3. Commit your changes
|
49
51
|
4. Push to the branch
|
50
|
-
5. Create new Pull Request
|
52
|
+
5. Create new Pull Request
|
data/lib/rack/ip_authorizer.rb
CHANGED
data/lib/rack/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
module RackIpAuthorizer
|
2
|
-
VERSION = "0.0.
|
3
|
-
end
|
2
|
+
VERSION = "0.0.2"
|
3
|
+
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.2
|
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
|
@@ -66,7 +66,7 @@ dependencies:
|
|
66
66
|
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 0.6.2
|
69
|
-
description: Basic Rack middleware for
|
69
|
+
description: Basic Rack middleware for Rails 3 to authorize access to path by IP
|
70
70
|
email:
|
71
71
|
- thibault.elzamek@c4mprod.com, cedric.darne@c4mprod.com, lionel.oto@c4mprod.com
|
72
72
|
executables: []
|
@@ -75,11 +75,11 @@ extra_rdoc_files: []
|
|
75
75
|
files:
|
76
76
|
- LICENSE.txt
|
77
77
|
- README.md
|
78
|
-
- lib/rack/version.rb
|
79
78
|
- lib/rack/ip_authorizer.rb
|
79
|
+
- lib/rack/version.rb
|
80
80
|
- lib/rack-ip-authorizer.rb
|
81
81
|
- spec/rake_ip_authorizer_spec.rb
|
82
|
-
homepage:
|
82
|
+
homepage: https://github.com/c4mprod/rack-ip-authorizer
|
83
83
|
licenses:
|
84
84
|
- MIT
|
85
85
|
metadata: {}
|
@@ -89,19 +89,20 @@ 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.0.8
|
103
103
|
signing_key:
|
104
104
|
specification_version: 4
|
105
|
-
summary: Basic Rack middleware for
|
105
|
+
summary: Basic Rack middleware for Rails 3 to authorize access to path by IP using
|
106
|
+
YML config file
|
106
107
|
test_files:
|
107
108
|
- spec/rake_ip_authorizer_spec.rb
|